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 1097 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. 😉