Ticket from price

This topic contains 1 reply, has 2 voices, and was last updated by  Stephen Harris 5 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #31799

    I have set up a number of different tickets for an event:

    • Earlybird £100 (5 spaces)
    • Standard – £150 (100 space)

    I have created an index page which lists the events and would like to display the from price. This was working as I used the eo_get_event_tickets() function and found the lowest ticket price which has more than zero spaces.

    BUT …

    Now that the 5 earlybird spaces have been sold its still taking the earlybird ticket price as the ‘from’ price as it doesnt know that ticket has ‘0 capacity’. The eo_get_event_tickets function only returns the ‘spaces‘ NOT ‘capacity

    Please can some help?!

    Tom Beavan
    #31810

    Hi Tom,

    There’s a function that’s officially been marked as private, but I don’t anticipate making any changes to it:

    eo_get_the_occurrences_tickets( $event_id = '', $occurrence_ids = array() ) {
    

    If selling by series you can ignore the second argument, otherwise specify an array of occurrence IDs you are interested in (or ignore to get all occurrences).

    The response is an array indexed by occurrence ID (0 if selling by series) – the values are arrays with keys

    • date: (string) representaton of the occurrence date in Y-m-d format (when ‘book_series’ is to false)
    • available: (integer) Acts as a status. 0 = no tickets available. 1 = tickets available.
    • tickets: (string) An array of form (ticket_id => number available)

    The tickets property is indexed by ticket ID which is the ID returned by eo_get_event_tickets()

    Stephen Harris
Viewing 2 posts - 1 through 2 (of 2 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.