2017-04-12 115 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

非常感谢卢瓦克的支持我真的认识你是最棒的谢谢。 –