Recently, one of my old customers asked me to add the customer’s email to the recipient list in the canceled order notification (woocommerce). I was surprised that this simple option is not there by default. I wrote such a hook, which works great and fulfills its function 100%. This snippet should be added to functions.php (child theme).
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 );
Leave a Reply