Home > OS >  Trying to move the coupon form after "woocommerce_review_order_before_payment"
Trying to move the coupon form after "woocommerce_review_order_before_payment"

Time:11-18

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

CodePudding user response:

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' );

CodePudding user response:

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

  • Related