Skip to content

Instantly share code, notes, and snippets.

@fernandoacosta
Created October 22, 2018 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fernandoacosta/2a2406972972893e93e5e5953db85625 to your computer and use it in GitHub Desktop.
Save fernandoacosta/2a2406972972893e93e5e5953db85625 to your computer and use it in GitHub Desktop.
Simulador de Frete: Exibir 'grátis' ao invés de R$ 0,00
add_filter( 'wc_simulador_frete_method_cost', 'wc_simulador_frete_show_text_when_free', 10 );
function wc_simulador_frete_show_text_when_free( $html_cost ) {
if ( wc_price( 0 ) === $html_cost ) {
return 'Grátis!';
}
return $html_cost;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment