Tribe__Tickets_Plus__Commerce__WooCommerce__Orders__Refunded::reset_count_cache( null|int $ticket_id = null )

Reset the count cache for a specific ticket ID or all tickets.


Parameters

$ticket_id

(null|int) (Optional) The ticket ID to reset or null to reset all.

Default value: null


Top ↑

Source

File: src/Tribe/Commerce/WooCommerce/Orders/Refunded.php

	public function reset_count_cache( $ticket_id = null ) {
		if ( null === $ticket_id ) {
			$this->count_cache = [];

			return;
		}

		if ( isset( $this->count_cache[ $ticket_id ] ) ) {
			unset( $this->count_cache[ $ticket_id ] );
		}
	}

Top ↑

Changelog

Changelog
Version Description
5.9.3 Updated caching logic.
5.1.0 Introduced.