Tribe__Tickets_Plus__Commerce__WooCommerce__Main::uses_global_stock( int $post_id )

Determine if the event is set to use global stock for its tickets.


Parameters

$post_id

(int) (Required)


Top ↑

Return

(bool)


Top ↑

Source

File: src/Tribe/Commerce/WooCommerce/Main.php

	public function uses_global_stock( $post_id ) {
		// In some cases (version mismatch with Event Tickets) the Global Stock class may not be available
		if ( ! class_exists( 'Tribe__Tickets__Global_Stock' ) ) {
			return false;
		}

		$global_stock = new Tribe__Tickets__Global_Stock( $post_id );

		return $global_stock->is_enabled();
	}