[ad_1]
Hi,
Thank you for reaching out to us.
You can use this code below:
add_filter( 'woocommerce_email_headers', function ( $headers, $email_id, $obj ) {
if ( $email_id === 'customer_invoice' && $obj->has_status( [ 'completed' ] ) ) {
$headers .= "Cc: your_email@domain \r\n";
}
return $headers;
}, 10, 3 );Please change the email in the your_email@domain
With this code, whenever the order status changes to “Completed”, the email will be sent to both the customer and the email(s) in this code.
But if you want to CC the email exactly only when the order is from “Pending” to “Completed”, we can only support custom code for this function in the premium version.
Best regards.
