Change Coupon Position On Checkout Page, Show it Before Order Table

Quick Summary

  • jQuery's insertBefore moves the coupon form from the top of the classic checkout to just above h3#order_review_heading, the Your order heading.
  • CSS keeps .checkout_coupon visible with display block and hides the Have a coupon notice that normally reveals the form.
  • The .woocommerce-info rule hides every WooCommerce info notice sitewide, so target .woocommerce-form-coupon-toggle .woocommerce-info to hide only the coupon notice.

On the classic WooCommerce checkout, the coupon form sits at the top of the page, hidden behind a “Have a coupon? Click here to enter your code” notice. These two snippets move the form down to just above the order summary and keep it open, so customers see it right before they review their order.

Move the coupon form with jQuery

Add this inside your jQuery ready function, in your theme’s JavaScript file.

JavaScript
//coupon on checkout page position start
var coupon2 = $(".checkout_coupon.woocommerce-form-coupon");
coupon2.insertBefore('h3#order_review_heading');
//coupon on checkout page position end

.checkout_coupon.woocommerce-form-coupon selects the coupon form, and insertBefore() moves it in front of h3#order_review_heading, the “Your order” heading above the order summary table. The code uses $, so in WordPress your ready function must map $ to jQuery, as explained in fixing the $ is not a function error.

Show the form and hide the notice

Add this CSS to your child theme’s style.css or the Customizer’s Additional CSS panel.

CSS
/*unhide copuon code checkout*/
.checkout_coupon {
 display: block !important;
}
/*hide message have a coupon?*/
.woocommerce-info {
display:none;
}
/*coupon code checkout style*/
.checkout_coupon button.button{
background-color: #insert button color here;
}
  • display: block !important keeps the coupon form visible, because WooCommerce hides it until the notice is clicked.
  • The .woocommerce-info rule hides the “Have a coupon?” notice. All WooCommerce info notices use that class, including the returning customer login prompt, so this hides them everywhere on the site. To limit it to the coupon notice, target .woocommerce-form-coupon-toggle .woocommerce-info instead.
  • Replace #insert button color here with a real color value such as #333333. Until you do, the browser ignores that rule.

The snippets are written for the shortcode-based checkout. The Checkout block has its own coupon field.

If the whole checkout needs rearranging rather than one moved block, see my WooCommerce development services.

Share on X (opens in a new tab) Share on LinkedIn (opens in a new tab) Share on Facebook (opens in a new tab)

ChatGPT (opens in a new tab) Claude (opens in a new tab) Gemini (opens in a new tab) Perplexity (opens in a new tab) Grok (opens in a new tab)

More Insights

See More