How to remove the sale tag on discounted products in WooCommerce.

woo expert

WooCommerce, by default, will always display a notice that a product is on sale if you set a discounted price in the product settings.

But what if you don’t want those sale banners to be displayed even if you have discounted products?

Nothing, nothing happens, it’s just another choice, which with WooCommerce is very easy to achieve.

Just add the following code to the functions.php file of your active theme (child theme, remember) or to a customization plugin if you have one:

/* Hide sale button */
add_filter( 'woocommerce_sale_flash', 'wphelp_hide_sale' );
function wphelp_hide_sale( $sale_badge ){
return '';
}Code language: PHP (php)

Save the changes and the buttons, banners, offer messages or whatever you call them, will disappear from both the product detail page and the product catalog of the store.

Sale product without sale tag

How useful was this post?

Click on a smiley to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top