[英]WooCommerce order status processing then send an email to custom email along with customer
当订单状态更改为“处理中”时,我想向自定义电子邮件地址发送电子邮件,以及客户电子邮件ID。
You can use a custom function hooked in
woocommerce_email_recipient_{$this->id}
filter hook, targeting 'customer_processing_order' email notification, this way: 您可以使用挂接到woocommerce_email_recipient_{$this->id}
过滤器挂钩中的自定义函数,以“ customer_processing_order”电子邮件通知为目标,方法是:
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). 代码进入您的活动子主题(或主题)的function.php文件中。 Or also in any plugin php files. 或在任何插件php文件中。
Reference: 参考:
Hope this helps! 希望这可以帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.