We actually only have two different courses at the moment and offer theme regularly, always at the same venue.
Depending on which one a client registers to, I want to send a complete different email.
In both cases there is something like “thank you for registering to the course %event_title% on %event_date% at %event_starttime%
The course will be held at %event_venue% bla bla….
And then comes a totally different block depending on the course category
Is is possible to accomplish this, maybe with including a dynamically called text or a custom field or something.

Christian Zumbrunnen
There’s no UI for this, but it is possible to change the booking confirmation e-mail dynamically:
add_filter( 'eventorganiser_booking_confirmed_email_body', 'my_booking_confirmation_email', 10, 2 );
function my_booking_confirmation_email( $message, $booking_id ){
$event_id = eo_get_booking_meta( $booking_id, 'event_id' );
//$event_id is the (post) ID of the event
//$message is the HTML mark-up of the e-mail.
//Alter $message based on event category.
return $message;
}
What you could do is use a custom placeholder, and then use str_replace()
to replace it with a dynamic block of text. From version 1.11.0 they’ll be an API for registering custom e-mail placeholders, so you won’t need to use the str_replace()
method.

Stephen Harris
Hi,
I need exactly the same fonctionality …
the possibility to send different emails for events by category.
I read the your answer above but i did not understand how you apply it.
Could you be a bit more precise for non-dev people?
Thank’s
Vincent

Vincent
… OOPS sorry… i found a clearer answer here:
http://wp-event-organiser.com/forums/topic/customise-email-depending-on-event-category/
I got it and understood the “utility plug-in ” concept…
Anyway… still thank’s for your job
Best
Vincent
-
This reply was modified 9 years, 6 months ago by
Vincent.

Vincent