I want to send an email to custom email address when order status changed to processing along with customer email ID.
Asked
Active
Viewed 4,324 times
2
Raunak Gupta
- 9,719
- 3
- 49
- 86
Tushar Khanna
- 39
- 1
- 10
-
what u have tried so far???? – Maha Dev Mar 10 '17 at 06:30
1 Answers
1
You can use a custom function hooked in
woocommerce_email_recipient_{$this->id}filter hook, targeting 'customer_processing_order' email notification, this way:
add_filter('woocommerce_email_recipient_customer_processing_order', 'wh_OrderProcessRecep', 10, 2);
function wh_OrderProcessRecep($recipient, $order)
{
// Set HERE your email adresses
$custom_email = 'mycustomemail@domain.com';
$recipient = $recipient . ', ' . $custom_email;
return $recipient;
}
Code goes in function.php file of your active child theme (or theme). Or also in any plugin php files.
Reference:
- Adding a second email address to a completed order in WooCommerce
- Customising WooCommerce notification emails with hooks and filters
- WooCommerce email notifications: different email recipient for different cities
Hope this helps!
Community
- 1
- 1
Raunak Gupta
- 9,719
- 3
- 49
- 86