2017-08-31 13 views
0

WooCommerceのオーダーステータスがの場合、から処理にメールを送信できます。しかし、顧客のデフォルトアドレスの代わりにカスタム電子メールアドレスにのみ電子メールを送信する必要があります。WooCommerce処理オーダーの電子メール通知受信者をカスタムアドレスに変更する

ファイルfunctions.phpのフックまたはフィルタはありますか?

add_filter('woocommerce_email_recipient_customer_processing_order', 'processing_order_replacement_email_recipient', 10, 2); 
function processing_order_replacement_email_recipient($recipient, $order) { 
    // Set HERE your replacement recipient email(s)… (If multiple, separate them by a coma) 
    $recipient = '[email protected]'; 
    return $recipient; 
} 

コードがアクティブなのfunction.phpファイルに行く:

enter image description here

答えて

1

woocommerce_email_recipient_customer_processing_orderフィルターフックに引っかけこのカスタム関数、(それに交換用の電子メールを設定して)仕事を行います子供のテーマ(またはテーマ)、またはすべてのプラグインファイルに保存されます。

はテストの結果、顧客の電子メールにカスタム受信者を追加するには


働く、あなたはこれを使用する必要があります代わりに(必要な場合)

$recipient .= ',[email protected]';