WooCommerce: Remove (free) in Shipping Method Label @ Cart

A very annoying thing this is. If one of your WooCommerce shipping methods is Free, a label (Free) will appear next to it. It cannot be deleted via CSS as some WooCommerce function adds it via code to the shipping method label. So how do we deactivate it?

The (free) text for a free shipping method in WooCommerce
The (free) text for a free shipping method in WooCommerce

The snippet: Remove (Free) from the shipping method labels


// removes (free) from free shipping methods

add_filter( 'woocommerce_cart_shipping_method_full_label', 'remove_free_label', 10, 2 );

function remove_free_label($full_label, $method) {
$full_label = str_replace("(Free)","",$full_label);
return $full_label;
}

Where to add custom code?

You should place custom PHP in functions.php and custom CSS in style.css of your child theme: where to place WooCommerce customization?

This code still works, unless you report otherwise. To exclude conflicts, temporarily switch to the Storefront theme, disable all plugins except WooCommerce, and test the snippet again: WooCommerce troubleshooting 101

Related content

Rodolfo Melogli

Business Bloomer Founder

Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as an independent WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza. Follow @rmelogli

4 thoughts on “WooCommerce: Remove (free) in Shipping Method Label @ Cart

  1. Hi, very helpful. By the way, I also like to remove that shipping method label at new-order email template. Could you give me a help with code?

    1. Hi KJ, thanks so much for your comment! Yes, this is definitely possible, but I’m afraid it’s custom work. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding!

  2. I would like to remove the line thats says : “shipping : free shipping” at the bottom of the order in the checkout page, above the privacy policy checkout box. I tried with the code you presented here, and it did not work as expected.
    Please advice. Thank you.

    1. This could be an outdated tutorial. Can you please retest this on 2017 theme and send me a screenshot of the shipping methods @ checkout?

Questions? Feedback? Customization? Leave your comment now!
_____

If you are writing code, please wrap it like so: [php]code_here[/php]. Failure to complying with this, as well as going off topic or not using the English language will result in comment disapproval. You should expect a reply in about 2 weeks - this is a popular blog but I need to get paid work done first. Please consider joining the Business Bloomer Club to get quick WooCommerce support. Thank you!

Your email address will not be published. Required fields are marked *