Support » Plugin: WooCommerce » Woocommerce cancelled order e-mail notification for my clients

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Mike Jolley


    These emails are for admin benefit to know that an order has been cancelled. Since cancellation is triggered by the user, they don’t really need one.

    You could add your own custom email on the order status hooks outside of WooCommerce. e.g. custom code to listen for woocommerce_order_status_cancelled action then send mail.

    Thread Starter mathew07


    Hey Mike, thank you for your response.

    Unfortunatelly, I am using those notifications for customers because in my site orders will be cancelled by Shop Manager and that is why I would like to let customer know about this.

    I will use this custom hook but can you please tell me if I can “call” random cancelled order template? (child theme / woocommerce / email / canceled-order.php ). I already adjust this page and it will be really nice if I will be able to use it.


    Plugin Author Mike Jolley


    Why not use a customer note instead? If you add one when you handle the cancellation, the user gets an email.

    Thread Starter mathew07


    It’s because I would like to change order status also 🙂

    Plugin Author Mike Jolley


    You can do that as well, just takes two requests 😉 Saves coding – if you need something built you’ll need to consider

    Thread Starter mathew07


    Ok, thank you very much 🙂



    Mike Jolley: This is the third or fourth request that I’ve seen for this exact function (on WordPress and on StackOverflow). On the admin page, ( right out of the box, “Customer” is on the email recipients list for an order cancelling. But then on the page that shows the settings for email (, customer is always removed. So “Customer” is saved on the back end but filtered out by the plugin authors choice. So it’s possible to do this by changing the filter for email recipient. A simple change if you are the author but complicated if you are one of the many WP users who is not a skilled PHP developer.

    So in answer to the OP’s question, put this code in your site’s theme functions.php. It worked for me and I’m not even a plugin author.

     * Add customer email to Cancelled Order recipient list
    function wc_cancelled_order_add_customer_email( $recipient, $order ){
       return $recipient . ',' . $order->billing_email;
    add_filter( 'woocommerce_email_recipient_cancelled_order', 'wc_cancelled_order_add_customer_email', 10, 2 );

    Hello pixelboy,

    I added this code.But,no use.

    Mail not send to customer…

    Hi Guys, I worked on a solution for this.

    Here in Brazil when an order is rejected by the payment gateway, Their plugin automatically cancel the order within the woo platform.

    The customer is waiting for an email with the response of the process of his payment, so we must inform the status (canceled) When it happens.

    And no. I cant do it 100 times on a day manually.

    So here is the code:

    Add it on your child theme, archive functions and have fun.

    It would be so easier for add this functionality on the next versions of the platform.

     * Adds the customer email on the receipient list for cancelled orders notifications.
     * */
    function cancelled_order_add_customer_email($emails)
    	class My_WC_Email_Cancelled_Order extends WC_Email_Cancelled_Order 
    		public function trigger($order_id) {
    			$this->recipient .= (empty($this->recipient) ? '' : ',').wc_get_order($order_id)->billing_email;
    			return parent::trigger($order_id);	
    	$emails['WC_Email_Cancelled_Order'] = new My_WC_Email_Cancelled_Order();
    	return $emails;
    add_filter('woocommerce_email_classes', 'cancelled_order_add_customer_email', 10);

    Hi Mike,

    You said: “These emails are for admin benefit to know that an order has been cancelled. Since cancellation is triggered by the user, they don’t really need one.”

    By that logic, the admin doesn’t really need an email when he cancels an order, yet that email is sent. After the admin cancels an order, the Notes section indicates:
    “Cancelled order email notification manually sent.” Sadly, that really means it was only sent to the admin… the admin who just canceled it.

    In another thread (slightly different topic*) you said: “If unpaid, the user may cancel and restore the cart from the My Account page. Once its paid for, an admin needs to handle it.”

    Conclusion: Since either the customer or the admin can cancel an order, BOTH should receive a confirmation email when an order is canceled.

    I realize this is somewhat subjective, so I guess it’s not a bug. But, I’ll look forward to the improvement in a future release. Thanks in advance!

    nancorrea, thanks for the code. It looks good. I’ll probably give it a try if woo decides not to make the change.


    Hi guys,
    Attaching a plugin which works great with emails and have an option to customize custom email templates for WooCommerce..
    Plugin will be updated today with automatic “order canceled” email action as well.

    Any question , problems or suggestion with this plugin you can contact to


    @nancorrea does your script work with woocommerce 2.4.10? I dried it but nothing happend.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Woocommerce cancelled order e-mail notification for my clients’ is closed to new replies.