Skip to content

Instantly share code, notes, and snippets.

@dangoodman
Created August 4, 2020 09:32
Show Gist options
  • Save dangoodman/bcbacf69e513f5c7ac914a5dcae1794c to your computer and use it in GitHub Desktop.
Save dangoodman/bcbacf69e513f5c7ac914a5dcae1794c to your computer and use it in GitHub Desktop.
WooCommerce: Replace free shipping label
<?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