Ticket meta data in list of attendees

WordPress Event Management, Calendars & Registration Forums General Question Ticket meta data in list of attendees

This topic contains 2 replies, has 2 voices, and was last updated by  Peter Daengeli 9 years, 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #11335

    Hi Stephen,

    I would like to display a list of attendees of one particular event on the front-end. The output of the name of the bookees and the number of tickets booked works fine using eo_get_bookings and eo_get_booking_meta.

    Is there a possibility to add the chosen types of tickets (i.e. ticket names) for each booking in a similar manner?

    Peter Daengeli
    #11338

    Hi Peter,

    Yes, you can use eo_get_booking_tickets() (see codex).

    You pass the booking ID as the first argument, and then optionally a boolean value as the second argument to toggle whether tickets should be grouped by ticket ID.

    The function returns an array of objects (tickets), and if you’ve opted to group tickets by ticket type, then each object will have a quantity property – indicating the number of tickets of that type in the booking. If you don’t group the tickets you can access the booking_ticket_id property – which is a unique ID associated with each ticket sold, and ticket_reference – the reference number for the ticket.

    Stephen Harris
    #11343

    Hi Stephen,

    many thanks, eo_get_booking_tickets() does the trick. I had missed that one in the codex.

    Peter Daengeli
Viewing 3 posts - 1 through 3 (of 3 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.