1
お客様がこの注文を何も使用していない場合は、電子メールオーダーにクーポンメッセージを表示していますが、that codeです。完了した注文ステータスの電子メールにクーポンメッセージを表示
このクーポンメッセージは、にのみ、すべてのメールでの注文を完了した状態で表示したいと考えています。
add_action('woocommerce_email_before_order_table', 'processing_order_mail_message', 20);
function processing_order_mail_message($order) {
if (empty($order->get_used_coupons()) && ($order->post_status == 'wc-on-hold' || $order->post_status == 'wc-processing'))
echo '<h2 id="h2thanks">Get 20% off</h2><p id="pthanks">Thank you for making this purchase! Come back and use the code "<strong>Back4More</strong>" to receive a 20% discount on your next purchase! Click here to continue shopping.</p>';
}
どうすれば実現できますか?
おかげ