tribe_tickets_orders( string $repository = 'default' )

Builds and returns the correct Order repository.


Parameters

$repository

(string) (Optional) The slug of the repository to build/return.

Default value: 'default'


Top ↑

Return

(Tribe__Repository__Interface) The Order repository object.


Top ↑

Source

File: src/template-tags/tickets.php

	function tribe_tickets_orders( $repository = 'default' ) {
		$map = [
			'default' => 'tickets.repositories.order',
		];

		/**
		 * Filters the map relating Order repository slugs to service container bindings.
		 *
		 * @since 5.1.0
		 *
		 * @param array  $map        A map in the shape [ <repository_slug> => <service_name> ].
		 * @param string $repository The currently requested implementation.
		 */
		$map = apply_filters( 'tribe_tickets_repositories_order_map', $map, $repository );

		return tribe( Tribe__Utils__Array::get( $map, $repository, $map['default'] ) );
	}

Top ↑

Changelog

Changelog
Version Description
5.1.0 Introduced.