与标题一样。
通过插件,或者通过向functions.php文件添加过滤器,是否可以引导特定woocommerce产品类型的电子邮件通知?
即。产品A将始终接收模板A,而产品B始终接收模板B,其余产品继续接收其标准新订单客户通知等。
任何答案都不一定是一个完整的深入操作方法,如果你能指出我正确的文档或其他可能导致我开始工作的例子,我会接受它!我的google-fu让我失望了,只找到了几十款优质的WP插件,这些插件的收入很少。
答案 0 :(得分:0)
根据使用的结帐付款类型向电子邮件发送一些有用的付款说明。
add_action( 'woocommerce_before_email_order', 'add_order_instruction_email', 10, 2 );
function add_order_instruction_email( $order, $sent_to_admin ) {
if ( ! $sent_to_admin ) {
if ( 'cod' == $order->payment_method ) {
// cash on delivery method
echo '<p><strong>Instructions:</strong> Full payment is due immediately upon delivery: <em>cash only, no exceptions</em>.</p>';
} else {
// other methods (ie credit card)
echo '<p><strong>Instructions:</strong> Please look for "Madrigal Electromotive GmbH" on your next credit card statement.</p>';
}
}
}
我发现以下链接希望它对您有所帮助
https://www.cloudways.com/blog/how-to-customize-woocommerce-order-emails/