简体   繁体   English

WooCommerce订单状态处理然后将电子邮件与客户一起发送到自定义电子邮件

[英]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: 参考:

  1. Adding a second email address to a completed order in WooCommerce 向WooCommerce中已完成的订单添加第二个电子邮件地址
  2. Customising WooCommerce notification emails with hooks and filters 使用挂钩和过滤器自定义WooCommerce通知电子邮件
  3. WooCommerce email notifications: different email recipient for different cities WooCommerce电子邮件通知:不同城市的不同电子邮件收件人

Hope this helps! 希望这可以帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 发送有关保留的Woocommerce订单的客户处理订单电子邮件通知 - Send customer processing order email notification for on-hold Woocommerce orders 以处理状态顺序在 WooCommerce 中发送额外的 email (functions.php) - Send additional email in WooCommerce in a processing status order (functions.php) 在 Woocommerce 中添加自定义订单状态并发送有关状态更改的电子邮件 - Add custom order status and send email on status change in Woocommerce WooCommerce - 发送自定义订单状态更改的自定义电子邮件 - WooCommerce - send custom email on custom order status change 在WooCommerce中向订单上的客户发送电子邮件 - Send Email To The Customer On Order Complete in WooCommerce 在 Woocommerce 3 中向客户发送取消和失败的订单电子邮件 - Send cancelled and failed order email to customer in Woocommerce 3 WooCommerce向客户发送新订单电子邮件 - WooCommerce send new order email to customer 在 Woocommerce 中根据客户处理订单电子邮件通知有条件地添加帐户电子邮件 - Add account email conditionally on Customer processing Order email notification in Woocommerce 在 WooCommerce 中自定义订单状态更改时发送“保留”email - Send "on hold" email on custom order status change in WooCommerce 客户处理订单电子邮件通知中的 Woocommerce 订单日期时间 - Woocommerce order date-time in customer processing order email notification
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM