Posted: September 6, 2024 at 4:19 am
I have a problem where old tickets show up in the ticket selector and my current solution is to modify event-espresso-core-reg/modules/ticket_selector/TicketSelectorStandard.php I’m adding this: At line 107, like this: This works perfectly but of course it’s not a proper solution because it has to be re-applied every time Event Espresso is updated. Is there a way i can hook into this from my functions.php or a custom plugin (I already use one for adding some translations and so on) so that i’m not hacking about in the core Event Espresso files? |
|
Hi there, Can you not just set EE not to display expired tickets? Event Espresso -> Events -> Templates (tab above the table) -> Ticket Selector Template Settings -> Show Expired Tickets? Set that to No and remove all expired tickets from the ticket selector in one go. Side note an ‘expired ticket’ is one where the tickets end date is in the past. |
|
Hi Tony, Unfortunately that doesn’t work because we want some expired tickets to be visible. For example, on the second weeks of courses, it’s good for the users to see tickets from the first week as ‘sold out’. |
|
In that case you can use the Rather than looping over the tickets and working out the dates for those tickets you’ll likely find it more efficient to just query the DB for correct tickets and return to the filter. We have some details on how to querying datetime fields (the So just add your own where condition to |
|
Hi Tony, Thank you, but i get a 404 from that link. |
|
Hi Tony, And then forwards to where you were pointing me and got to the document i needed, thank you. |
|
Oh… weird! Its the Heres the link:
|
|
Haha yes, that’s definitely a weird one. |
|
I’m curious now, did you manage to get this working how you were wanting it to? |
|
Apologies Tony for the lack of reply. This is a large project and so i have been covering lots of different aspects. This one, although important is not a show stopper (in that we have a patch we can use as a temporary fix until a proper one is created). So no, i’ve not managed to get this working yet but I will get back to you if / when i do and i’ll post the solution here too, in case it can help somebody else in the future. |
|
No problem, thanks for keeping us updated 🙂 |
|
The support post ‘Hide old tickets in Ticket Selector’ 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.