Tribe__Tickets__Tickets::clear_attendees_cache( int|WP_Post $post_id )

Clears the attendees cache for a given post


Parameters

$post_id

(int|WP_Post) (Required) The parent post or ID


Top ↑

Return

(bool) Was the operation successful?


Top ↑

Source

File: src/Tribe/Tickets.php

		public function clear_attendees_cache( $post_id ) {
			if ( $post_id instanceof WP_Post ) {
				$post_id = $post_id->ID;
			}

			/** @var Tribe__Post_Transient $post_transient */
			$post_transient = tribe( 'post-transient' );

			$cache_key = (int) $post_id;

			return $post_transient->delete( $cache_key, self::ATTENDEES_CACHE );
		}