Okay
  Public Ticket #3666487
add email recipient
Closed

Comments

  •  4
    John started the conversation

    How can I add a recipient to a system email that currently only goes to the customer.  The system email is for "account Approved".  I need to able to cc in my bookkeeper on this to set them up in Quickbooks.

  •  2,219
    WebWizards replied

    Hi John,

    I understand you're looking at the "account approved" email, sent to the customer when their account registration is approved.

    You can add a CC to that email, by adding this PHP code snippet to your site:

    add_filter('woocommerce_email_headers', 'add_cc_to_b2bking_approved_email', 10, 3);
    function add_cc_to_b2bking_approved_email($headers, $email_id, $order) {
        if ($email_id === 'b2bking_your_account_approved_email') {
            $cc_email = '[email protected]';
            $headers .= 'Cc: ' . $cc_email . "\r\n";
        }
        return $headers;
    }
    

    In this code, replace [email protected] with the address of your bookkeeper.


    This code snippet can be added to functions.php, or by following our guide here: https://woocommerce-b2b-plugin.com/docs/how-to-add-a-snippet-php-or-js/


    Kind regards,

    Stefan