Skip to content

Instantly share code, notes, and snippets.

@fernandoacosta
Last active October 24, 2018 19:54
Embed
What would you like to do?
Exibir frete grátis em vez do preço zerado no frete
add_filter( 'woocommerce_cart_shipping_method_full_label', 'fa_add_free_shipping_label', 10, 2 );
function fa_add_free_shipping_label( $label, $method ) {
if ( $method->get_cost() == 0 ) {
$label = str_replace( wc_price( 0 ), '', $label );
$label .= ' Frete grátis';
}
return $label;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment