Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hello Luis,
    This is covered in the FAQ under “How can I get a copy of the invoice emailed to the shop manager?”

    Let me know if there are any questions!

    Ewout

    Thread Starter zubeldialuis

    (@zubeldialuis)

    Ewout. Thansk for quick reply. Always good support for your part.

    The idea is a copy for the user(customer) not for admin.

    Perhaps adding a new filed for the user like Email copy, and then that this email also recive all notifications included invoices?

    some companies want recive the invoice in other email different to the email account.

    Regards!

    Plugin Contributor Ewout

    (@pomegranate)

    I see, but you’d have to store that alternative email address in the order somehow.

    If you manage to do that, then this code should do what you want (replace _alternative_email_field by your alternative email address field):

    add_filter( 'woocommerce_email_headers', 'wcpdf_email_cc_alternative', 10, 3);
    
    function wcpdf_email_cc_alternative( $headers, $email_id, $order ) {
    	if ($email_id == 'customer_completed_order') {
    		$alternative_email = get_post_meta( $order->id, '_alternative_email_field', true)
    		if ( $alternative_email ) {
    			$headers .= 'CC: ' . $alternative_email . "\r\n"; //just repeat this line again to insert another email address in BCC
    		}
    	}
    
    	return $headers;
    }

    (not tested)

    Doing what you describe is way above my pay grade at present.
    I am reading this discussion in an attempt to notify a particular supplier of incoming orders related to their products. I created a category for that supplier, and perhaps there is a better option. Broadwell Hill Forest Sanctuary And Learning Center

    Plugin Contributor Ewout

    (@pomegranate)

    Hi! Send us an email at [email protected] and we’ll work something out!

    Ewout

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Add second or CC recipient email for invoices’ is closed to new replies.