Support

Home Forums Event Espresso Premium Custom Confirmation Email based on Category?

Custom Confirmation Email based on Category?

Posted: November 5, 2013 at 2:01 pm


marketing

November 5, 2013 at 2:01 pm

Hi All,

I just had a request to send registrants an email registration based on the category of the event that they choose… is this possible through custom code? If so where would I start? Basically I am looking for conditional confirmation emails.


Josh

  • Support Staff

November 5, 2013 at 2:29 pm

Hi Deborah,

At this time Event Espresso doesn’t have this feature, but it does allow you to select from pre-defined custom emails that are set up in the Email manager.


marketing

November 5, 2013 at 3:16 pm

Hmm is there any actions or hook in to the emailing process? It really needs to be specific to an event category, not the event itself. Say I have 3 events. Two are in the same category, and one is in another. The two with the same category should receive one confirmation and the other should get a different confirmation. I suppose its very specific to this case so it’s a little hard to explain. The categories actually become part of my registration form, and the user chooses one (there could be up to 30 or more choices) from a select field. I need the confirmation to be sent based on that fields value.


Dean

November 6, 2013 at 1:15 am

Hi Deborah,

The only hook I’m aware of is the email after payment hook – https://eventespresso.com/wiki/event-espresso-3-1-action-hooks/#action_hook_espresso_email_after_payment

Depending on the gateway and EE version, this hook may solely be in the process_payments.php file, rather than the individual gateways.

Filters: https://eventespresso.com/wiki/event-espresso-3-1-filters/
Hooks: https://eventespresso.com/wiki/event-espresso-3-1-action-hooks


marketing

November 6, 2013 at 12:12 pm

Hi Dean,

I think what I really want to edit is in the function:

espresso_prepare_email_data

which is located in the includes/email.php file. The other hook doesn’t seem expose the data that I need to change, at least not in anyway that I’ve been able to test. Also my events are free, im not sure if that makes a difference.


Dean

November 7, 2013 at 3:03 am

Hi,

OK, if the hook I suggested isn’t suitable, the best I can do is make a request for an additional action hook in the espresso_prepare_email_data function, but I can’t guarantee if or when it would be added.

Apart from that unless you modify core files (which we don’t recommend nor support) it may not be possible to do what you are looking to do.


marketing

November 7, 2013 at 1:26 pm

Hi Dean,

Thanks, how can I make a feature request to add an action hook there? I would essentially need to grab the email content, add some text to it, then return the data back to the function to continue through the process.

I think for now we can go without out it, but it would be a nice addition to the list of hooks if possible ๐Ÿ™‚


Dean

November 8, 2013 at 1:22 am

Hi,

“Thanks, how can I make a feature request to add an action hook there? ”

I’ve already done it, but as mentioned I can’t guarantee it will be added.


Josh

  • Support Staff

November 8, 2013 at 9:50 am

Hi there,

In this case you might not need a hook in espresso_prepare_email_data. What you can do is copy espresso_prepare_email_data into your custom plugin or into /wp-content/uploads/espresso/custom_functions.php and rename the function to something like my_custom_espresso_prepare_email_data. After that you may need to do the same thing if you’re relying on email_by_attendee_id.

Then you can copy the entire event_espresso_email_confirmations function (it’s a pluggable function) to your custom functions file and change it so it calls your modified my_custom_email_by_attendee_id function.


marketing

November 8, 2013 at 11:47 am

Hi Josh,

Thanks, that seems like a good idea. I didn’t realize I could override those specific functions in my custom_functions.php file. I will try it out.

Also thanks for submitting my feature request ๐Ÿ™‚

The support post ‘Custom Confirmation Email based on Category?’ 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