Support

Home Forums Event Espresso Premium Stop automatic email?

Stop automatic email?

Posted: November 1, 2017 at 4:16 am

Viewing 9 reply threads


jrotz

November 1, 2017 at 4:16 am

Can I stop normal default email messages from being sent automatically? In other words I want to email our customers with one of the normal default messages but I just don’t want to send it the moment they register I don’t want it to be automatic.

Thank you


jrotz

November 1, 2017 at 12:26 pm

I found part of the answer here:
https://eventespresso.com/topic/turning-off-notifications-for-event-creator/

So, I now I want to send the message manually, is this possible?


Josh

  • Support Staff

November 1, 2017 at 1:28 pm

Actually that other topic had information for stopping the mail everywhere. Since you want to still send the messages manually you’ll take a different approach.

All of the triggers happen in EED_Messages.

So one of the actions hooked into is for triggering messages from registrations completed in the frontend (or the admin).

But a separate action is used for when messages are manually triggered from the registration list table (or registration details page when changing registration status).

So feasibly, you could remove the action set for automatic registration message sending.

You can try the following in a functions plugin. Depending on which types of messages you have activated one or both of the remove_action()’s should be used.

add_action('init','my_deactivate_messages');
function my_deactivate_messages() {
    remove_action(
        'AHEE__EE_Payment_Processor__update_txn_based_on_payment', 
        array('EED_Messages', 'payment'),
        10,
        2
    );
    remove_action(
        'AHEE__EE_Registration_Processor__trigger_registration_update_notifications',
        array('EED_Messages', 'maybe_registration'), 
        10, 
        2
    );
}


jrotz

November 1, 2017 at 3:06 pm

The messages we need to stop automatic sending for is just the Ticket and Ticket notice. We are entering seat numbers to the registration so we can’t have them go out automatically when they book their tickets. Is it possible to have all the other messages go out automatically like they are now and just have the ticket ones be manual? Would we use the same process you outlined above?


Josh

  • Support Staff

November 1, 2017 at 3:21 pm

Tickets aren’t actually sent (they’re downloaded via a link), so you’d only actually stop the Ticket notice, and you’d do a remove_action on its callback to remove its automated email. e.g.

remove_action(
    'AHEE__EE_Registration_Processor__trigger_registration_update_notifications',
    array('EED_Ticketing', 'maybe_ticket_notice'),
    10,
    2
);


jrotz

November 2, 2017 at 11:40 am

Hi Josh,
I copied the above code in my functions plugin, but we got another order and the ticket notice went out automatically still. Is there something else I need to do?

Thanks


Josh

  • Support Staff

November 2, 2017 at 12:04 pm

The code alone will not work. You’ll nee to add the remove_action to a function, then do a callback on the init hook. Just like in the first example.


jrotz

November 3, 2017 at 3:46 am

Hi Josh,
We are not PHP developers can you help us with the code that’s needed. I tried the above example still to no avail.
Thanks


Tony

  • Support Staff

November 3, 2017 at 3:59 am

The first example Josh shared is a callback on the init hook.

Inside of that callback you need to tell EE which messages you don’t want to trigger, the second example is how you would tell EE not to trigger the ticket notice email. So that goes within the callback:

add_action('init','my_deactivate_messages');
function my_deactivate_messages() {
    remove_action(
      'AHEE__EE_Registration_Processor__trigger_registration_update_notifications',
      array('EED_Ticketing', 'maybe_ticket_notice'),
      10,
      2
    );
}

Note that the first example removes other messages, so the above is all you need.


jrotz

November 6, 2017 at 4:12 am

Thank you Tony. We’ll give it a shot.

Viewing 9 reply threads

The support post ‘Stop automatic email?’ 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