Last active
November 22, 2021 03:33
-
-
Save AmeliaBriscoe/0a5a9aa36c2c0d7824049535fdc2240e to your computer and use it in GitHub Desktop.
Send WooCommerce cancelled or failed order email to customers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* add the customer to the recipient field for the WooCommerce Failed and Cancelled Order email | |
*/ | |
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 ); | |
add_filter( 'woocommerce_email_recipient_failed_order', 'wc_cancelled_order_add_customer_email', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment