Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Flatsome theme Change Sale Button Text
add_filter( 'flatsome_product_labels', function ( $text, $post, $product, $badge_style ) {
if ( $product->is_on_sale() ) {
$text = '<div class="badgeonsale callout badge-label"><div class="badge-inneronsale callout-onsale-bg is-small onsale-bubble">ON SALE</div></div>' . $text;
return $text;
}, 10, 4 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment