Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_qty_pending( int $ticket_id, bool $refresh = false )

Lazily calculates the quantity of pending sales for the specified ticket.


Parameters

$ticket_id

(int) (Required)

$refresh

(bool) (Optional)

Default value: false


Top ↑

Return

(int)


Top ↑

Source

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

	public function get_qty_pending( $ticket_id, $refresh = false ) {
		if ( $refresh || empty( $this->pending_orders_by_ticket[ $ticket_id ] ) ) {
			$pending_totals                               = $this->count_order_items_by_status( $ticket_id, 'incomplete' );
			$this->pending_orders_by_ticket[ $ticket_id ] = $pending_totals['total'] ? $pending_totals['total'] : 0;
		}

		return $this->pending_orders_by_ticket[ $ticket_id ];
	}