I’m trying to programmatically change a “Buy Tickets” button to “Sold Out”. I don’t want to use the Span that get’s outputted from espresso_event_status() function. Is there a similar function or value I can use in PHP to check against whether the event is Sold Out, Inactive or Expired?
Along the same question. Is there a way to get just the ticket amount and not the name of the ticket or the HTML tags? I need to display the ticket price like “$45”. Thanks!
Once you have the EE_Event object, you’ll need to grab the tickets associated with it. Then on each EE_Ticket, you would need to grab it’s base price or all it’s prices. Once you have the EE_Price, you could get the pretty price or the price without the currency symbol.
The example I showed you earlier should be sufficient. If it’s not, can you work with a developer on your team on this?
Viewing 5 reply threads
The support post ‘EE4: Array instead of Span with espresso_event_status()’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.