Last active
December 16, 2017 03:33
-
-
Save webdados/a66c1815d4bfebd13586f5ec11927e31 to your computer and use it in GitHub Desktop.
WooCommerce Cancelled orders sent to client also
This file contains 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_filter( 'woocommerce_email_recipient_cancelled_order', 'cancelled_order_add_customer_email', 10, 2 ); | |
function cancelled_order_add_customer_email( $recipient, $order ) { | |
if ( $order ) { | |
return $recipient . ',' . ( version_compare( WC_VERSION, '3.0', '>=' ) ? $order->get_billing_email() : $order->billing_email ); | |
} else { | |
return $recipient; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment