Hello Caroline,
No, Booking Activities and WooCommerce emails display different data.
However, you can choose to send WC emails only, or both Booking Activities and WC emails.
Turn ON / OFF the “Send when an order is …” option in Booking Activities > Settings > Notifications tab > your notification settings.
For example,
– turn ON “Send when an order is processing” in the “Booking status turns to “Pending”” notification settings.
– turn ON “Send when an order is completed” in the “Booking status turns to “Booked”” notification settings.
(to send only Booking Activities email, deactivate WC notifications in WC settings)
Thanks @yoancutillas,
What I specifically want to do is to send nicely branded emails to customers, so I had hoped it would be a simple filter to use the WC email template header and footer for the bookings emails.
I will try adding HTML within the email editor instead.
Thank you for the clarifications.
Unfortunately, there is no option to add the WC’s header and footer to Booking Activities’ emails.
Indeed, you can create your HTML header and footer and add it the editor of each in Booking Activities’ notification settings.
If it can help, I found out that there is a function in WooCommerce to wrap any email in WC template. So you can simply apply it on the bookacti_email_notification_data hook.
// Wrap Booking Activities' emails in WC template
function my_theme_wrap_bookacti_emails_in_wc_template( $email, $notification, $tags, $locale ) {
if( ! defined( 'WC_ABSPATH' ) ) { return $email; }
if( ! class_exists( 'WC_Emails' ) ) { include_once WC_ABSPATH . 'includes/class-wc-emails.php'; }
if( ! class_exists( 'WC_Emails' ) ) { return $email; }
if( $locale ) { bookacti_switch_locale( $locale ); }
$wc_emails = WC_Emails::instance();
$email[ 'message' ] = $wc_emails->wrap_message( $email[ 'subject' ], $email[ 'message' ], false );
return $email;
}
add_filter( 'bookacti_email_notification_data', 'my_theme_wrap_bookacti_emails_in_wc_template', 100, 4 );
You can add this code in your child theme functions.php or with a plugin such as Code Snippets.
This code is an example, for reference only, I cannot provide support for custom code.