Skip to content

Instantly share code, notes, and snippets.

@mitchellkrogza
Created May 15, 2022 11:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mitchellkrogza/3956dde8d2c6a919ccb64e5f906590c4 to your computer and use it in GitHub Desktop.
Save mitchellkrogza/3956dde8d2c6a919ccb64e5f906590c4 to your computer and use it in GitHub Desktop.
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