Shopping Cart
How To Change Sale Badge Text In WooCommerce?

How To Change Sale Badge Text In WooCommerce?

WooCommerce adds sale badge to the items that are on sale, means product sale price is lower than the actual price. By default WooCommerce Sale badge text is "Sale!"

Default sale text, looks like this:

 woocommerce-sale-text

Now open function.php file of your theme located located in wp-content/themes/your-theme-name/ and add this code at the end of it:

add_filter('woocommerce_sale_flash', 'vs_change_sale_content', 10, 3);
function vs_change_sale_content($content, $post, $product){
   $content = '<span class="onsale">'.__( 'On Sale', 'woocommerce' ).'</span>';
   return $content;
}

After adding above filter in function.php theme files:

woocommerce-sale-badge-text
Note: You can replace "On Sale" text with your text, sale badge design will inherit from your theme style.