Skip to content

Instantly share code, notes, and snippets.

@grola grola/functions.php
Last active Jan 27, 2018

What would you like to do?
Send new order email to additional reciepient wher coupon applied
add_filter( 'woocommerce_email_recipient_new_order', 'studiowp_woocommerce_email_recipient_new_order', 10, 2 );
function studiowp_woocommerce_email_recipient_new_order( $recipient, $order ) {
$coupon_code = 'XXXXXXXX';
$add_recipient = '';
if ( in_array( strtolower( $coupon_code ), $order->get_used_coupons() ) ) {
$recipient .= ',' . $add_recipient;
return $recipient;

This comment has been minimized.

Copy link
Owner Author

grola commented Jan 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.