• I had a few orders come through as cancelled. The given reason on Order Notes was:

    Unpaid order cancelled – time limit reached. Order status changed from Pending payment to Cancelled.

    I didn’t receive a cancelled order email. They are enabled in settings. I installed WP Mail Logging Log and there’s no sign of a cancellation email being generated (either to me or the customer).

    It’s a shame cancelled order emails weren’t sent, as in this instance a plugin conflict was causing the cancelled orders. It was a quick fix, but I only picked up on the problem after logging into the website. By that point a dozen orders had been cancelled this way. If an cancellation email had come through I would have picked up on it much sooner.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Stef

    (@serafinnyc)

    By default this doesn’t really get sent. I don’t know why. Not that I’ve ever seen anyway. You need a script to run that email. Depending on who you want to receive the canceled you can write it this way. I’ve added a Canceled script be sent to the both the admin and the customer. You’ll have to change the message in settings for the customer.

    Add this to your functions.php file in your child theme. If you don’t know how to add this. Look for a developer that can.

    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 );
    
    Thread Starter chevaline

    (@chevaline)

    Thanks for this @serafinnyc

    If I only want to send it to myself and not the customer would I change it to…

    function wc_cancelled_order_add_customer_email( $recipient, $order ){
         return $recipient . ',' . $order->billing_email;
     }
     add_filter( 'woocommerce_email_recipient_cancelled_order', 10, 2 );
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Cancelled order emails not generated’ is closed to new replies.