Retrieve stock & sold ticket quantities?
-
Hi,
While
tribe_events_count_available_tickets()returns the number of currently (still) available tickets andtribe_tickets_get_ticket_stock_message()returns a message string, there’s obviously no official way to retrieve the individual quantities per ticket and / or event via template tags, is there?I used to help myself with a glimpse in the code of the
Tribe__Tickets__TicketsandTribe__Tickets__RSVPclasses by applying class functions like$Event_Tickets = Tribe__Tickets__RSVP::get_all_event_tickets( $Event->ID );
$num_tickets_sold->$Event_Tickets[0]->qty_sold(); // There's only one ticketHowever, variables / methods like
qty_soldhave obviously been declaredprotectedwith the latest release. The code above will now throw an error. Anyway, I assume there should be a much better way to retrieve those figures programmatically in custom template or plugin code, right?Appreciate any help a lot.
The topic ‘Retrieve stock & sold ticket quantities?’ is closed to new replies.