Created
August 4, 2020 09:32
-
-
Save dangoodman/bcbacf69e513f5c7ac914a5dcae1794c to your computer and use it in GitHub Desktop.
WooCommerce: Replace free shipping label
This file contains hidden or 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 | |
// Paste everything below this line to your child-theme's functions.php file. | |
// Change the free shipping label to 'Free shipping'. | |
add_filter('woocommerce_cart_shipping_method_full_label', static function ($label, $method) { | |
if ($method->cost == 0) { | |
$label = 'Free shipping'; | |
} | |
return $label; | |
}, 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment