Reply 336562 to: How to move sale percentage to the beginning

Avatar: Tony Rodriguez
Tony Rodriguez
Support staff
October 16, 2022 at 06:56

Hello, @Mavi Ekran,

In order to solve your issue please copy and paste the below-given Code for your theme >> functions.php file:

add_filter( 'woocommerce_sale_flash', 'misha_change_on_sale_badge', 99, 3 );

function misha_change_on_sale_badge( $badge_html, $post, $product ) {
	return '<span class="onsale">%50 Sale</span>';
}

Note:you can change the text %50 Sale in the code as per your needs.

Regards 8Themes Team.

Go To The Whole Conversation In Topic
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.