有没有办法向 woocommerce 发票邮件添加其他收件人。
我尝试使用“woocommerce_email_headers”挂钩,但它不起作用:
add_filter( 'woocommerce_email_headers', 'mycustom_headers_filter_function', 10, 2);
function mycustom_headers_filter_function($headers, $object) {
$headers = array();
$headers[] = 'Bcc: My Name <[email protected] /cdn-cgi/l/email-protection>';
$headers[] = 'Content-Type: text/html';
return $headers;
}
有什么建议吗?
您还可以扩展该函数以包含订单:
add_filter( 'woocommerce_email_headers', 'woo_cc_emails', 10, 3 );
function woo_cc_emails( $headers, $status, $object ) {
return 'Bcc: [email protected] /cdn-cgi/l/email-protection' . "\r\n";
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)