Having different email templates for different events

WordPress Event Management, Calendars & Registration Forums General Question Having different email templates for different events

This topic contains 1 reply, has 2 voices, and was last updated by  Stephen Harris 6 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #31586

    I can see that the only place where I can have an email template is the reservation tab of the main settings, but I have several events at the same time and can’t have the same template sent to everyone. I didn’t find any other solution than emailing bookees manually…

    Fadwa Gmiden
    #31600

    Hi Fadwa,

    There is a hook for changing the email content:

    add_filter('eventorganiser_booking_confirmed_email_body', function($message, $booking_id) {
       //Optionally alter $messsage, which is the body of the email
       $message = eventorganiser_email_template_tags('... new mesage...', $booking_id);
       return $message;
    }, 10, 2);
    

    You can change the body of the email by specifying the text / HTML you want. The booking ID is provided so you can target which bookings you want to change the text for. If you want to change the booking ID for a particular event, you can get the event ID with the following:

    $event_id = eo_get_booking_meta($booking_id, 'event_id', true);
    
    Stephen Harris
Viewing 2 posts - 1 through 2 (of 2 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.