Flexible_Tickets::filter_events_virtual_show_to_content( boolean $has_ticket, WP_Post $event, int $user_id )

Filters the content of the virtual event show page.


Parameters

$has_ticket

(boolean) (Required) Whether the current user has a ticket for the event.

$event

(WP_Post) (Required) The post object or ID of the viewed event.

$user_id

(int) (Required) ID of the current user.


Top ↑

Return

(bool) Whether the current user can view the content.


Top ↑

Source

File: src/Tribe/Compatibility/Event_Tickets/Flexible_Tickets.php

	public function filter_events_virtual_show_to_content( bool $has_ticket, WP_Post $event, int $user_id ): bool {
		/**
		 * Filter whether to render the show to content for series passes.
		 *
		 * @since 1.15.6
		 *
		 * @param boolean $allowed Whether to render the show to content for series passes.
		 */
		$allowed = apply_filters( 'tec_events_virtual_render_show_to_content_for_series_passes', true );

		// If series passes are allowed or ticket access is already false, we don't need to do anything.
		if ( $allowed || ! $has_ticket ) {
			return $has_ticket;
		}

		if ( ! $this->user_has_non_series_pass_tickets( $user_id, $event->ID ) ) {
			return false;
		}

		return $has_ticket;
	}

Top ↑

Changelog

Changelog
Version Description
1.15.6 Introduced.