I don’t think there’s a hook for this in EE3, because what will happen is when you in the admin or your customers on the front end load the events up, the system at that point determines if the event is active or not by comparing the dates.
As such I think the only way to fire something off would be to run a cron job daily and check for events that expire that day or the next day. wp_cron could be used but unless you have daily traffic it can be unreliable. An actual server cron job is usually more reliable, if nothing else, you could set it to ping the website forcing wp_cron to fire.
Thanks for the response. The site I’m working with is fairly active so I’m going to hook into ‘action_hook_espresso_insert_event_success’ and ‘action_hook_espresso_update_event_success’ to create or update a cron job that is scheduled for the event expire time which will then kick a function to do what needs doing.
Thanks for the tips…
–AJ
Viewing 2 reply threads
The support post ‘EE3 Event Expire Process and/or Action Hook?’ 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.