Skip to content

Instantly share code, notes, and snippets.

@younes-dro
Created January 17, 2020 04:25
Show Gist options
  • Save younes-dro/7544e8d62a0ffcb3e00860cccbe27485 to your computer and use it in GitHub Desktop.
Save younes-dro/7544e8d62a0ffcb3e00860cccbe27485 to your computer and use it in GitHub Desktop.
Change the default Sale badge woocommerce
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