Send new order email to additional address when coupon applied

To send new order email when coupon applied to additional address you can use code below. Add this code to functions.php in your theme.  Modify $coupon_code and $add_recipient variables to you requirements.

get_used_coupons() ) ) {
        $recipient .= ',' . $add_recipient;
    return $recipient;

View the code on Gist.

If you do not use the child theme, remember that changes made to the functions.php file will be overwritten when the theme is updated.

While copying code to functions.php file it is not nessesary to copy <?php opening tag.

About grola

Passionate about Wordpress and WooCommerce for many years. Author of plugins and short snippets improving Wordpress and WooCommerce.

View all posts by grola →