【发布时间】:2018-06-26 11:49:58
【问题描述】:
当客户选择送货zone id = 0(世界其他地区)时,我需要发送电子邮件说明。
我在下面找到了代码,但它基于付款方式:
add_action( 'woocommerce_email_before_order_table', 'add_order_email_instructions', 10, 2 );
function add_order_email_instructions( $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>';
}
}
}
请问如何将其更改为特定的运输区域?
如何在 WooCommerce 中根据送货区域设置特定的电子邮件说明?
我们将不胜感激。
【问题讨论】:
标签: php wordpress woocommerce shipping email-notifications