Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Event attendee threshold / limit notification | Event Espresso - Staging Server

Support

Home Forums Event Espresso Premium Event attendee threshold / limit notification

Event attendee threshold / limit notification

Posted: November 6, 2013 at 3:37 am

Viewing 4 reply threads


Renier

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 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

Thanks in advance for any help!


Dean

  • Support Staff

November 6, 2013 at 5:31 am

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/
http://staging.eventespresso.com/wiki/event-espresso-3-1-action-hooks/


Renier

November 6, 2013 at 6:01 am

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!


Josh

November 6, 2013 at 11:47 am

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.


Sidney Harrell

  • Support Staff

November 6, 2013 at 12:01 pm

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.

Event Espresso - Staging Server