Skip to content

Instantly share code, notes, and snippets.

@deeman
Created June 30, 2019 12:37
Show Gist options
  • Select an option

  • Save deeman/7f407edf8e5c9478bf0991d8cd9b65e2 to your computer and use it in GitHub Desktop.

Select an option

Save deeman/7f407edf8e5c9478bf0991d8cd9b65e2 to your computer and use it in GitHub Desktop.
WooCommerce - Change Salesbadge Text
//Add Custom text for salesbadge//
add_filter( 'woocommerce_sale_flash', 'wc_custom_replace_sale_text' );
function wc_custom_replace_sale_text( $html ) {
return str_replace( __( 'Sale!', 'woocommerce' ), __( 'My sale text!', 'woocommerce' ), $html );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment