• Skip to primary navigation
  • Skip to main content
OsomCode

OsomCode

Awesome code tutorials for WordPress and Genesis

  • Subscribe
  • My account
    • Edit profile
    • Favorites
    • Update credit card
  • Login

Hide discount coupon field from checkout in WooCommerce

Learn in this tutorial how to hide the discount field on the checkout page in WooCommerce with code.

WooCommerce allows you to use discount codes, which is great for promotional campaigns.

But what if you only want them to be applied automatically or via URL?

In those cases you’d probably prefer to hide the “Got a coupon?” field on the checkout page to prevent the visitor from leaving in search of the discount code.

Here’s how to do it:

Snippet to hide the checkout discount code field in WooCommerce

Add the following code at the end of functions.php or in your functionality plugin:

To see this and another 847 code snippets of this website, login or subscribe here.

In this case you remove the woocommerce_checkout_coupon_form function to prevent the field from being displayed.

Conclusion

As you can see, with a few lines of code you can hide the discount coupon field on the WooCommerce checkout page.

Any questions? Let me know in the comments.

And if you want to give me any suggestion for future tutorials, leave it in the contact form. Advantages of being a subscriber. 😉

PHP WooCommerce

To leave read and make questions about this code, you can login or register.

  • About OsomCode
  • FAQ
  • Contact

Legal Notice · Privacy Policy · Cookie Policy · Terms and conditions
Copyright © 2023

Lost your password?