Tribe__Tickets__Tickets_Handler::get_event_unlimited_tickets( $post = null )
Get an array list of unlimited tickets for an event.
Contents
Parameters
-
(int|object) (Required) (null) $post Post or Post ID tickets are attached to
Return
(array) List of unlimited tickets for an event.
Source
File: src/Tribe/Tickets_Handler.php
public function get_event_unlimited_tickets( $post = null ) {
$post_id = Tribe__Main::post_id_helper( $post );
$tickets = Tribe__Tickets__Tickets::get_event_tickets( $post_id );
$ticket_list = array();
if ( empty( $tickets ) ) {
return $ticket_list;
}
foreach ( $tickets as $ticket ) {
if ( ! $this->is_unlimited_ticket( $ticket ) ) {
continue;
}
$ticket_list[] = $ticket;
}
return $ticket_list;
}
Changelog
| Version | Description |
|---|---|
| 4.6 | Introduced. |