tribe_payouts( string $repository = 'default' )

Builds and returns the correct payout repository.


Parameters #

$repository

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

Default value: 'default'


Top ↑

Return #

(TribeCommunityTicketsRepositoriesPayout)


Top ↑

Source #

File: src/functions/template-tags.php

function tribe_payouts( $repository = 'default' ) {
	$map = [
		'default' => 'community-tickets.repositories.payout',
	];

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

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

Top ↑

Changelog #

Changelog
Version Description
4.7.0 Introduced.