Created
November 2, 2024 14:40
-
-
Save stuartduff/40fa18aceae09adbed65209838ba1b05 to your computer and use it in GitHub Desktop.
CC Email into WooCommere Customer Invoice Email
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function add_cc_to_invoice_email($headers, $email_id, $order) { | |
if ($email_id === 'customer_invoice') { | |
$cc_email = '[email protected]'; // Replace with the email you want to CC | |
$headers .= 'Cc: ' . $cc_email . "\r\n"; | |
} | |
return $headers; | |
} | |
add_filter('woocommerce_email_headers', 'add_cc_to_invoice_email', 10, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment