Tribe__Tickets__Data_API::get_providers_for_post( int $post_id )

Get the Providers for a Post


Parameters

$post_id

(int) (Required) the id of the post


Top ↑

Return

(array) an array of providers


Top ↑

Source

File: src/Tribe/Data_API.php

	public function get_providers_for_post( $post_id ) {
		$providers = [];
		$modules = $this->ticket_class;

		foreach ( $modules as $class => $module ) {
			$obj              = call_user_func( [ $class, 'get_instance' ] );
			$provider_tickets = $obj->get_tickets( $post_id );

			if ( ! empty( $provider_tickets ) ) {
				$providers[ $module['slug'] ] = $class;
			}
		}

		return $providers;
	}

Top ↑

Changelog

Changelog
Version Description
4.11.0 Introduced.