• Resolved bunjip

    (@bunjip)


    Hi,

    While tribe_events_count_available_tickets() returns the number of currently (still) available tickets and tribe_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__Tickets and Tribe__Tickets__RSVP classes 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 ticket

    However, variables / methods like qty_sold have obviously been declared protected with 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.

Viewing 1 replies (of 1 total)
  • Barry

    (@barryhughes-1)

    Hi @bunjip,

    Great question!

    Unfortunately, though, we’re unable to offer help with custom dev issues like this one here in the wordpress.org forums (simply because we really need to prioritize helping our premium customers and we’re currently under a lot of demand there).

    Hopefully a fellow community member will be able to chime in with some knowledge that might be helpful to you here, though.

    Good luck with the project 🙂

Viewing 1 replies (of 1 total)

The topic ‘Retrieve stock & sold ticket quantities?’ is closed to new replies.