WooCommerce Rename The Sale Badge

WooCommerce product and archive page showing custom sale badge text


There are no pre-requisites in order for you to be able to implement this solution.

How To Implement This Solution?

Simply copy the pre-coded solution to your active theme’s functions.php or preferably the Code Snippets Plugin.

About this Solution

In some contexts, the default “Sale!” badge shown on WooCommerce Product Arhive pages, single product pages, and on cross-sells and upsells may need to be changed. This quick guide shows you how to change this text to something completely custom to meet your business requirements. In this particular example, we have changed the text to “Price Cut!”.

* Snippet Name:     Change the WooCommerce sale badge.
* Snippet Author:   ecommercehints.com

add_filter( 'woocommerce_sale_flash', 'ecommercehints_rename_sale_badge', 10, 2 );

function ecommercehints_rename_sale_badge( $badge_html, $post ) {
	return '<span class="onsale">Price Cut!</span>';


Snippet Benefits

  • Customise text to be inline with your business branding and wording.
  • Change the on sale badge text to literally anything you like – changing it in this one place, will change it everywhere it is displayed.
WooCommerce Conversion Rate Optimisation (CRO) eBook
100 WooCommerce Conversion Rate Optimisation Tips

Leave a Reply

If you are going to write code in the comments, please wrap it between code tags.

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

Other Recent Guides

Subscribe To Emails

Get exclusive WooCommerce tips that I only share with email subscribers

Join hundreds of other subscribers