【发布时间】:2021-05-02 21:40:50
【问题描述】:
当向订单添加备注时,我正在尝试向发送给客户的通知添加不同的回复电子邮件。 到目前为止,我有:
add_filter( 'woocommerce_email_headers', 'add_replyto_emails_header', 10, 4 );
function add_replyto_emails_header( $headers, $email_id) {
$replyto_email = 'store_owner@gmail.com';
$email_status = array( 'wc_email_customer_note', 'customer_note');
if ( in_array( $email_id, $email_status)) {
$headers .= "Reply-To: " . $replyto_email . "\r\n";
}
error_log( print_r( $headers, true ) );
return $headers;
}
电子邮件已发送,但标题未修改。我猜 email_status 数组中的状态不正确,我找不到任何其他对这封电子邮件 ID 的引用。
【问题讨论】:
标签: php wordpress woocommerce header email-notifications