Send the cancelled booking email notification to multiple addresses

,

By default WooCommerce Bookings sends the cancelled booking notification email only to the customer who purchased the booking.

In some cases could be useful to send this notification to the admin too so he is aware of this change, expecially if the site does not get so much purchases and you do not usually check the admin every day.

To do this, open your functions.php file located in wp-content/themes/your-theme-name/ and add this code at the end of it:

6 replies
  1. phyllis
    phyllis says:

    hey there, i’ve been looking for this! This is great thank you so much! I’ve tried, and when customer cancels frontend, admin now receives an email! However, if admin cancels backend, i get directed to another page which says this:

    We are sorry to say that your booking could not be confirmed and has been cancelled. The details of the cancelled booking can be found below.
    Booked Product
    Fatal error: Call to a member function get_title() on a non-object in /home/sgpetser/public_html/wp-content/themes/listify-child/woocommerce-bookings/emails/customer-booking-cancelled.php on line 22

    I hope you can help me out! =)

    thanks in advance!

    Reply
  2. John
    John says:

    Hello. You have a great blog. Helped me a lot of times. I was wondering how I can send the REMINDER email to the admin as well

    Reply
  3. John
    John says:

    Hi Nicola. Thanks for the answer. But I want to send the Reminder mail to the administrator. I thought this is for the Cancellation email.

    Thanks in advance.

    Reply
    • Nicola Mustone
      Nicola Mustone says:

      Sorry John, you are right!

      Just change the last line of the snippet to this:

      add_filter( 'woocommerce_email_recipient_booking_reminder', 'wc_send_booking_cancelled_multiple_addresses' );
      

      Please notice that I didn’t change the function name, if you want, you can do it here, its the second argument of the function. Also, change it on line 7 before to use the snippet.

      Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply