/**
  * Adds ticket data to the offers property of the event object.
  */
 protected function add_ticket_offers()
 {
     foreach (TribeEventsTickets::get_all_event_tickets($this->event_id) as $this->ticket) {
         $this->add_individual_offer();
     }
 }
Beispiel #2
0
/**
 * Returns true if the event contains one or more tickets which are not
 * subject to any inventory limitations.
 *
 * @param null $event
 *
 * @return bool
 */
function tribe_events_has_unlimited_stock_tickets($event = null)
{
    if (null === ($event = tribe_events_get_event($event))) {
        return 0;
    }
    foreach (TribeEventsTickets::get_all_event_tickets($event->ID) as $ticket) {
        if (TribeEventsTicketObject::UNLIMITED_STOCK === $ticket->stock) {
            return true;
        }
    }
    return false;
}