2017-04-12 39 views

回答

2

你可以試試這個代碼與woocommerce_email_recipient_new_order過濾鉤子鉤住的自定義函數:

add_filter('woocommerce_email_recipient_new_order', 'adding_vendor_email', 10, 2); 
function adding_vendor_email($recipient, $order) { 

    // Your code or conditions to get the vendor email (if needed) 

    $recipient .= ",[email protected]"; 
    return $recipient; 
} 

您將需要定製此自定義掛鉤函數動態獲取的電子郵件......

代碼會出現在您的活動子主題(或主題)的function.php文件中,或者也包含在任何插件文件中。

該代碼測試和工程

你也可以使用woocommerce_email_attachments過濾鉤子......看到this related thread

+0

非常感謝盧瓦克的支持我真的認識你是最棒的謝謝。 –