Hi,
My client has two events (let’s say Event A and Event B), once a booking has been confirmed they need to send the attendee a different confirmation email, which different content, depending on which event has been booked.
I’ve had a look through the docs/codex and the only function I can find is – eventorganiser_booking_notification_email although I think this only lets me alter the email address that the standard booking notification is sent to.
Is what I need to do possible?
Thanks
C

Charlie Kirby
Hi Charlie,
Yes, this is possible, the booking confirmation message is filtered using the eventorganiser_booking_confirmed_email_body
filter. This passes a booking ID from which you can retrieve the corresponding event ID.
So you can do the following:
add_filter( 'eventorganiser_booking_confirmed_email_body', 'my_booking_confirmed_email', 10, 2 );
function my_booking_confirmed_email( $message, $booking_id ) {
$event_id = eo_get_booking_meta( $booking_id, 'event_id' );
//change $message based on $event_id - you can use the email template tags
$message = eventorganiser_email_template_tags( $message, $booking_id );
$message = wpautop( $message );
return $message;
}

Stephen Harris