Flexible_Tickets::user_has_non_series_pass_tickets( int $user_id, int $event_id )
Checks if the user has tickets other than series passes for the event.
Contents
Parameters
- $user_id
-
(int) (Required) ID of the current user.
- $event_id
-
(int) (Required) ID of the event.
Return
(bool) Whether the user has tickets other than series passes for the event.
Source
File: src/Tribe/Compatibility/Event_Tickets/Flexible_Tickets.php
public function user_has_non_series_pass_tickets( int $user_id, int $event_id ): bool {
$args = [
'provider__not_in' => 'rsvp',
'user' => $user_id,
'event' => $event_id,
'ticket_type__not_in' => Series_Passes::TICKET_TYPE,
];
$ticketed_attendees = tribe_attendees()->by_args( $args )->count();
return (bool) $ticketed_attendees;
}
Changelog
| Version | Description |
|---|---|
| 1.15.6 | Introduced. |