and I saw in another post (I can’t find it now) where someone gave the original code to filter sold out events.
I wish to hide all events that are expired and sold out. I know that I am meant to edit this line. Are you able to let me know how I go about working this out?
$SQL .= ' AND Ticket.TKT_end_date > "' . current_time( 'mysql', true ) . '" AND Ticket.TKT_deleted=0';
You shouldn’t need to edit that line. Instead, you can add an additional line of code. So right after the line that does the comparison on the Ticket sale end date, you add this code that does an extra comparison on the amount of tickets available:
Thanks for your help. I had a try of inserting that line as per following github code but it appears not to work. The test sold out event is still displaying. Any ideas on what could be going on?
Can you check what’s set for the Ticket QTY for the event?
Viewing 3 reply threads
The support post ‘Events Table – hide disabled and sold out events’ 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.