Tribe__Tickets__Ticket_Object::global_stock_mode( string $mode = null )

Sets or gets the current global stock mode in effect for the ticket.

Typically this is one of the constants provided by TribeTicketsGlobal_Stock:

GLOBAL_STOCK_MODE if it should draw on the global stock
CAPPED_STOCK_MODE as above but with a limit on the total number of allowed sales
OWN_STOCK_MODE if it should behave as if global stock is not in effect

Parameters

$mode

(string) (Optional)

Default value: null


Top ↑

Return

(string)


Top ↑

Source

File: src/Tribe/Ticket_Object.php

		public function global_stock_mode( $mode = null ) {
			if ( ! is_null( $mode ) ) {
				$this->global_stock_mode = $mode;
			}

			if ( empty( $this->global_stock_mode ) ) {
				$this->global_stock_mode = get_post_meta( $this->ID, Tribe__Tickets__Global_Stock::TICKET_STOCK_MODE, true );
			}

			return $this->global_stock_mode;
		}