• Resolved omarkoza

    (@omarkoza)


    If I create an additional field for a second email address, is there a way (i.ee. function call) to have that second email address be CCed on Order confirmation emails?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author ThemeHigh

    (@themehigh)

    We believe that you would like to add a CC to another email to send the admin order email. If so, unfortunately, this feature is not available in our plugin. However, you can try the below code in your theme’s functions.php.

    add_filter('woocommerce_email_recipient_new_order', 'additional_email_checkout', 10, 2);  
    function additional_email_checkout($emails, $object){  
    $aditional_email = get_post_meta($object->id, 'field_name', true);
    if($aditional_email){
     $emails .= ','.$aditional_email;  
    }
    return $emails;
    }

    In the above code, you need to provide your field name in the place of field_name.

    We hope this will help 🙂

    Thank you!

    • This reply was modified 4 years, 8 months ago by ThemeHigh.
    Thread Starter omarkoza

    (@omarkoza)

    That seemed to work. Thanks!!!

    Plugin Author ThemeHigh

    (@themehigh)

    Great!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add 2nd Email Add to Order confirmations’ is closed to new replies.