# Change the “Sale!” Text of the WooCommerce Sale Badge

**Last modified:** Sep 21, 2021  
**Difficulty:** Beginner  
**Language:** PHP  
**Category:** [WooCommerce](https://wpzone.co/blog/snippet-category/woocommerce/)

To customize the text displayed on the WooCommerce Sale badge, you can use the following PHP snippet. Place this snippet in your theme's `functions.php` file or a custom plugin.

```php
add_filter( 'woocommerce_sale_flash', 'custom_sale_text' );
function custom_sale_text() {
    return 'On Sale!';  // Change this to whatever text you want
}
```

This code uses the `woocommerce_sale_flash` filter to modify the default sale badge text. After adding this code, the badge on sale items will display "On Sale!" instead of the default "Sale!".
