Support

Home Forums Event Espresso Premium EE3 Event Expire Process and/or Action Hook?

EE3 Event Expire Process and/or Action Hook?

Posted: May 13, 2015 at 7:22 pm


Eric Amundson

May 13, 2015 at 7:22 pm

Have a need to trigger an action when an event changes to an expired status. Is there an action hook that gets called during this process?

If not can you provide some information on how/where this happens in the code?

Thanks,
AJ


Dean

May 14, 2015 at 2:52 am

Hi AJ,

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.


Eric Amundson

May 14, 2015 at 2:51 pm

Hey Dean,

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

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.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Eric Amundson 4 years, 7 months ago ago

Topic Tags

Tagged: , ,

Notifications

This topic is: resolved
Do NOT follow this link or you will be banned from the site!