Site logo

Archived topic

Move coupon field in checkout (WooCommerce)

11 replies · Started by Pedro on February 25, 2019

Viewing posts 1–12 of 12

Hello! I hope you are well.

I would like you to please help me with the following:

I would like to move the coupon field from before the billing information to before the order summary (on the checkout page)

If it is possible to show it as text, great!

I know it can be done by adding code in the functions.php file, but I do not know how to do it.

I hope you can help me, thanks!

Hi there,

not 100% sure but give this PHP snippet a shot:

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

https://docs.generatepress.com/article/adding-php/

Unfortunately by moving the coupon, it removes the necessary HTML required to trigger the toggle. That would take custom development which is out of our scope.

I can provide some CSS to hide the News Alert and style the "Si tienes un código de cupón, por favor, aplícalo abajo." - let me know

Hello david!

I would like you to please help me with the CSS code, I would appreciate it.

Any chance you can move the coupon field back to where you want it? Hard to provide the necessary CSS with it up above the columns.

Let me know :)

Hello Tom! Thanks for answering.

What I really want is to move the coupon field to another place that is not the beginning of the checkout.

Since what is achieved with this is to prevent customers from abandoning the purchase.

I hope you can help me, thanks.

Did the code David provide not move the field as you needed? Looks like you just need some CSS to remove the blue notice box?

Hello Tom!

Yes, I need to hide the blue block with CSS. You can help?

Thank you!

Hi there,

looks like you changed the checkout - i can't see the blue notification? Let us know.

Try this CSS:

.woocommerce-form-coupon-toggle {
    display: none;
}
This archived topic is closed to new replies.