add_filter( 'woocommerce_email_recipient_customer_processing_order', 'processing_order_replacement_email_recipient', 10, 2 );
function processing_order_replacement_email_recipient( $recipient, $order ) {
if ( ! is_a( $order, 'WC_Order' ) ) return $recipient;
// Set HERE your replacement recipient email(s)… (If multiple, separate them by a coma)
$recipient = 'name@example.com';
return $recipient;
}
1 回答
这个自定义函数挂钩在
woocommerce_email_recipient_customer_processing_order
过滤器钩子中,将完成这项工作(在其中设置您的替换电子邮件):代码放在活动子主题(或主题)的function.php文件中,或者放在任何插件文件中 .
经过测试和工作