Exibir frete grátis em vez do preço zerado no frete
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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