Website Building » WooCommerce » How Do I Change the Sales Badge Text in WooCommerce?

How Do I Change the Sales Badge Text in WooCommerce?

Last updated on December 20, 2022 @ 8:12 am

Are you looking to change the sales badge text in WooCommerce? Maybe you want to style the text to make it stand out more? In this article, we’ll show you how to do both.

In your WordPress dashboard, go to “Appearance” > “Theme Editor”.

Click on Theme Editor Under Appearance of WordPress

On the right-hand side, you will see “Theme Functions” under “Theme Files”; click on “Theme Functions”.

Click on Theme Functions under Theme Files WordPress

Add the code below to your “functions.php” file.

function ds_change_sale_text() {
	return '<span class="onsale">Limited Time Offer</span>';
}

If you want to style the text, you can do so by using HTML tags. For example, if you want to make the text bold, you would use the tag. If you want to underline the text, you would use the tag.

Here’s an example of how you would style the “On Sale” badge text:

On Sale

And here’s an example of how you would style the “Featured” badge text:

Featured

Once you’ve made your changes, be sure to click the “Update File” button at the bottom of the page.

Click on Update File WordPress

That’s all there is to it! Now you know how to change the sales badge text in WooCommerce and how to style it using HTML tags.

PRO TIP: If you are not comfortable with code, we recommend that you seek help from a developer before proceeding. Changing the sales badge text in WooCommerce can be done by editing the functions.php file or by using a plugin.
Dale Leydon

Dale Leydon

Sysadmin turned Javascript developer. Owner of 20+ apps graveyard, and a couple of successful ones.