Hey Stephen,
I can’t seem to figure out where the email template for notifications that come to the admin is generated. I’m talking about the ones that I receive (New Event Booking and Booking Confirmed) when someone registers.
I don’t allow user accounts, and the emails I get don’t notify me of the registrant’s name or any meta info that I’ve asked to have included in the registration form.
I’d like to modify them to include those fields.
Any help is appreciated!
Thanks!
Joe

Joe Iadanza
Hi Joe,
Admin (and bookee) emailing is handled in includes/booking-actions.php
. In particular there is this function eventorganiser_notify_confirmed_booking()
which sends an email out to the bookee (and maybe the admin too depending on the settings).
You can hook into eventorganiser_notify_confirmed_booking
and completely over-ride the function (it’s a filter, return false
to over-ride).
Unfortunately you can’t filter the email message to the admin in the same way you can the bookee (email is hardcoded inside that function), so you’ll need to essentially copy the contents of that function and change what you need to, and hook it on to the above mentioned filter:
add_filter( 'eventorganiser_notify_confirmed_booking', 'joe_handle_confirmation_emails', 10, 2 );
function joe_handle_confirmation_emails( $bool, $booking_id ){
//Email user and admin
//Return false to abort the default function
return false;
}
-
This reply was modified 11 years, 3 months ago by
Stephen Harris.

Stephen Harris
Stephen,
I was trying to use the code snippet you included above but found that the add_filter statement should really be:
add_filter( 'eventorganiser_notify_confirmed_booking', 'joe_handle_confirmation_emails', 10, 2 );
i.e., add the filter with a priority of 10 and receiving two arguments. The remainder of the code is OK.
All the best – Phil

Phil Meades
Thanks Phil!
You’re right – and I’ve updated my post to correct this.

Stephen Harris