Skip to content

Instantly share code, notes, and snippets.

@Acephalia
Created August 12, 2024 23:38
Show Gist options
  • Save Acephalia/a9c0a8073a26561ea95723e2c10dab9b to your computer and use it in GitHub Desktop.
Save Acephalia/a9c0a8073a26561ea95723e2c10dab9b to your computer and use it in GitHub Desktop.
WooCommerce Add CC Address To Order Processing Email
/*
* @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: hello@manufacturing.com' . "\r\n";
}
return $headers;
}
@Acephalia
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment