Posted: November 6, 2013 at 3:37 am
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 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 Thanks in advance for any help! | |
Hi, What about the http://staging.eventespresso.com/wiki/event-espresso-3-1-action-hooks/#action_hook_espresso_email_after_payment hook? You could check what the attendee count is and then email you if its too low. http://staging.eventespresso.com/wiki/event-espresso-3-1-filters/ | |
Hi Dean Thanks for helping. I have setup EFT- and a custom payment method and it seems to be working for both. However, this doesn’t work for free events. I guess that is fine for now because I don’t think there’ll be free events in the near future. Is there anyway to do this for free payments? Thanks again for your help! | |
Hi Renier, 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. | |
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.