Tribe__Tickets__Commerce__PayPal__Tickets_View::is_tpp_ticket_restricted( int $event_id = null, int $ticket_id = null, int $user_id = null )
Verifies if the Given Event has Ticket participation restricted
Contents
Parameters
- $event_id
-
(int) (Optional) The Event/Post ID (optional)
Default value: null
- $ticket_id
-
(int) (Optional) The Ticket/RSVP ID (optional)
Default value: null
- $user_id
-
(int) (Optional) An User ID (optional)
Default value: null
Return
(boolean)
Source
File: src/Tribe/Commerce/PayPal/Tickets_View.php
public function is_tpp_ticket_restricted( $event_id = null, $ticket_id = null, $user_id = null ) {
// By default we always pass the current User
if ( is_null( $user_id ) ) {
$user_id = get_current_user_id();
}
/**
* Allow users to filter if this Event or Ticket has Restricted Tickets
*
* @since 4.7.1
*
* @param boolean $restricted Is this Event or Ticket Restricted?
* @param int $event_id The Event/Post ID (optional)
* @param int $ticket_id The Ticket/RSVP ID (optional)
* @param int $user_id An User ID (optional)
*/
return apply_filters( 'event_tickets_is_tpp_ticket_restricted', false, $event_id, $ticket_id, $user_id );
}
Changelog
| Version | Description |
|---|---|
| 4.7.1 | Introduced. |