wordpressevent-calendartribe-event-tickets

WP - get the ticket list from tribe event calendar tickets


I use the event calendar plugin with its tickets extension. I want to get a list of the emitted tickets. like:

array(
  0 => ticket 1,
  1 => ticket 2
)

I looked for a solution in the doc https://docs.theeventscalendar.com/ but impossible to find the answer.

When I try tribe_tickets_get_attendees() I get my attendees list with the tickets they bought but I only get the ones that has been bought, not the rest of the tickets available. i.e if people have bought ticket 2 I won't see any mention of the ticket 1 with tribe_tickets_get_attendees().

Any ideas? its driving me crazy..


Solution

  • Tribe__Tickets__Tickets::get_all_event_tickets( $event )

    works for me.