Created
March 11, 2014 05:43
-
-
Save justinstern/9480084 to your computer and use it in GitHub Desktop.
Put this code snippet at the bottom of your theme's functions.php to modify the flat rate shipping label from (Free) to (will be calculated)
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
<?php | |
add_filter( 'woocommerce_cart_shipping_method_full_label', 'woocommerce_flat_rate_custom_label', 10, 2 ); | |
function woocommerce_flat_rate_custom_label( $label, $method ) { | |
if ( 'flat_rate' == $method->id && 0 == $method->cost ) { | |
$label = $method->label . ' (will be calculated)'; | |
} | |
return $label; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment