I want to be notified when a event reaches a certain threshold or limit. Say there’s 50 seats available I want to get notified via email when 40 people have registered.
I’ve browsed through the code but find no action hook that I can utilize for this purpose.
For example, after a user registers for an event, a check should run and see how many spaces are left and if it’s < 10, send an email.
I can write the code, I just want the best place to hook this in.
I’ve thought about putting it somewhere in the includes/process-registration/add_attendees_to_db.php file. But what about when I edit the attendee in the back end?
Ideally I don’t want to touch any core files but just a hook in there, somewhere.
Am I overlooking something?
I’m using Event Espresso is 3.1.35.2.P and WP version 3.5.2
If you want to do something similar for free events there’s a template file where you can add your code or even another do_action hook. If you look in /templates/payment_page.php where it checks for the $total_cost and if it’s 0 where it displays some information, that’s a place where a do_action could be added.
We’re adding some hooks there for the .37 release as well.
There’s also the ‘action_hook_espresso_save_attendee_data’ hook in add_attendee_to_db.php that gets called every time an attendee is saved to the db.
Viewing 4 reply threads
The support post ‘Event attendee threshold / limit notification’ 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.