Support

Home Forums WP User Integration Cancelation Email: Add date of event in message to attendee

Cancelation Email: Add date of event in message to attendee

Posted: May 20, 2014 at 9:04 pm


Trevis

May 20, 2014 at 9:04 pm

In the cancellation email that is sent to an attendee, the event name is included in the message body, but not the date of the event. I’ve edited the body in the my_events_page.php file previously, but can’t figure out how to get the date of the event included. Instead of reading

“Hello (first name),

You have successfully cancelled your registration for (event name).”

I’d like to add the date of the event after the event name so it reads something like

“Hello (first name),

You have successfully cancelled your registration for (event name) on (event date).”


Tony

  • Support Staff

May 21, 2014 at 2:28 am

Hi Trevis,

The event date for the attendee is currently not pulled for use within the Cancellation email. This would need to be added to query used to pull the data.

Within the espresso_send_attendee_cancel_notification() function. (within my_events_pages.php) you’ll find:

$sql = "SELECT ed.id event_id, ed.event_name, ea.email, ea.fname, ea.lname, ea.id att_id, ea.registration_id ";

Change that to

$sql = "SELECT ed.id event_id, ed.event_name, ea.email, ea.fname, ea.lname, ea.id att_id, ea.registration_id, ea.start_date ";

*Notice the ‘, ea.start_date ‘ add to the end of the query.

Then just include a call to that on the line that creates the email text for the attendee:

$att_email_body = sprintf(__('%sHello %s,%s You have successfully cancelled your registration for %s on %s.%s', 'event_espresso'), '<p>', $data->event->fname, '</p><p>', $data->event->event_name, $data->event->start_date, '</p>');

*I have not given line numbers as I know you have previously editing this file, and so they would not match up anyway.

Hope that helps.


Trevis

May 21, 2014 at 11:20 am

Hey Tony, thanks so much! That did the trick and is very useful to my clients. I was missing that query pull when I was trying to set it up.

Much appreciated!
-Trevis

The support post ‘Cancelation Email: Add date of event in message to attendee’ 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