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>';
}
어떻게 구현할 수 있습니까? 그것은 단지 "완전한"주문 상태를 들면, if
문 2 조건과 이메일에 사용자 정의 메시지를 표시 할 쉽게 수