Skip to content

Snippet: Change The WooCommerce Onsale Text

Important: In Total 5.0+ you can find a setting in the Customizer to alter the text.

function my_alter_sale_text() {
	return '<span class="onsale">'. __( 'MY CUSTOM TEXT', 'wpex' ) .'</span>';
add_filter( 'woocommerce_sale_flash', 'my_alter_sale_text', 20, 3 );
All PHP snippets should be added via child theme's functions.php file or via a plugin. We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top