Tickets_View::is_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/Tickets/Commerce/Tickets_View.php
public function is_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( 'tec_tickets_commerce_is_ticket_restricted', false, $event_id, $ticket_id, $user_id );
}
Changelog
| Version | Description |
|---|---|
| 5.1.9 | Introduced. |