0

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

Site Lab
  • 35
  • 5

2 Answers2

0

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' );
Junky
  • 958
  • 7
  • 17
  • Is there a way to move the coupon form to the bottom of the page without CSS? – Site Lab Nov 16 '21 at 08:38
  • If you mean you want to remove or change the style, you could use custom CSS to change the appearance by modifying .woocommerce-form-coupon and/or other classes and ids. – Junky Nov 16 '21 at 13:53
0

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

Site Lab
  • 35
  • 5