skip to Main Content

I have tried to move the coupon code to the bottom of the checkout page at hook "woocommerce_review_order_before_payment" with this code:

remove_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form', 10 );
add_action( 'woocommerce_review_order_before_payment', 'woocommerce_checkout_coupon_form', 5 );

The coupon code doesn’t submit, I even tried this code and it didn’t solved the issue, does anyone know how to work with it?

Thanks

2

Answers


  1. Chosen as BEST ANSWER

    I have solved it by moving the coupon code with gift card field into the table and it worked


  2. You can’t nest the coupon form inside the checkout form. This will move the coupon form below the checkout form.

    remove_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form');
    add_action( 'woocommerce_after_checkout_form', 'woocommerce_checkout_coupon_form' );
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search