Created
August 12, 2024 23:38
-
-
Save Acephalia/a9c0a8073a26561ea95723e2c10dab9b to your computer and use it in GitHub Desktop.
WooCommerce Add CC Address To Order Processing Email
This file contains 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
/* | |
* @snippet WooCommerce Add CC Address To Order Processing Email | |
* @description This snippet will allow you to send the order processing email to a secondary email as a CC | |
* @author u/acephaliax | |
* @caffeinate https://buymeacoffee.com/acephaliax | |
*/ | |
add_filter('woocommerce_email_headers', 'add_cc_to_processing_order_email', 10, 3); | |
function add_cc_to_processing_order_email($headers, $email_id, $order) { | |
// Check if the email being sent is the processing order email | |
if ($email_id === 'customer_processing_order') { | |
// Add your CC email address | |
$headers .= 'Cc: [email protected]' . "\r\n"; | |
} | |
return $headers; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For reddit thread: https://www.reddit.com/r/woocommerce/s/AuqWfLwAox
Support the support: https://buymeacoffee.com/acephaliax