WooCommerce: Remove Shipping Labels @ Cart (e.g. “Flat Rate”)

WooCommerce functions add the shipping method label on the Cart totals, on the left hand side of the price. This ruins the price amounts alignment (subtotal, shipping, taxes, total) and many clients have asked me to remove it completely. Also, it could be that sometimes you don’t want to show the name of a shipping rate on the front-end. So, here’s how you do it!

WooCommerce: remove the shipping labels on the cart page
WooCommerce: remove the shipping labels on the cart page

PHP Snippet: Remove Non-free Shipping Rate Labels @ WooCommerce Cart & Checkout

For example these:

  • 5 Day Delivery: €25.00
  • Local pickup
  • Free shipping

…will show as:

  • €25.00
  • Local pickup
  • Free shipping

What the snippet does is that it goes looking for a “:” and remove that and whatever is before that. Paid shipping methods are always in the format “LABEL: COST” so this will leave out just the cost. For methods that are free, there is no “:” and therefore the string stays as it is.

 * @snippet       Removes shipping method labels @ WooCommerce Cart / Checkout
 * @how-to        Get CustomizeWoo.com FREE
 * @author        Rodolfo Melogli
 * @testedwith    WooCommerce 3.9
 * @donate $9     https://businessbloomer.com/bloomer-armada/
add_filter( 'woocommerce_cart_shipping_method_full_label', 'bbloomer_remove_shipping_label', 9999, 2 );
function bbloomer_remove_shipping_label( $label, $method ) {
    $new_label = preg_replace( '/^.+:/', '', $label );
    return $new_label;

Where to add custom code?

You should place PHP snippets at the bottom of your child theme functions.php file and CSS at the bottom of its style.css file. Make sure you know what you are doing when editing such files - if you need more guidance, please take a look at my guide "Should I Add Custom Code Via WP Editor, FTP or Code Snippets?" and my video tutorial "Where to Place WooCommerce Customization?"

Does this snippet (still) work?

Please let me know in the comments if everything went as expected. I would be happy to revise the snippet if you report otherwise (please provide screenshots). I have tested this code with Storefront theme, the WooCommerce version listed above and a WordPress-friendly hosting.

If you think this code saved you time & money, feel free to join 17,000+ WooCommerce Weekly subscribers for blog post updates and 250+ Business Bloomer supporters for 365 days of WooCommerce benefits. Thank you in advance!

Need Help with WooCommerce?

Check out these free video tutorials. You can learn how to customize WooCommerce without unnecessary plugins, how to properly configure the WooCommerce plugin settings and even how to master WooCommerce troubleshooting in case of a bug!

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.

72 thoughts on “WooCommerce: Remove Shipping Labels @ Cart (e.g. “Flat Rate”)

  1. I am trying to achieve the same with Woocommerce Subscriptions plugin, but I just cannot find appropriate hook! In “Recurring Totals” shipping is always “Shipping via SHIPPING LABEL”.
    Any chance you have a solution for this? Thanks for all your help, your website is very useful!

    1. Hello Milan, 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. Doesn’t work when a product has a shipping class with “0,00” – Instead it shows the label of the shipping method. Any ideas how to fix this?

    Thank you!

    1. Could you show me a screenshot please?

  3. Hi, thanks for that. One question. How to remove a colon before the price? Thanks.

    1. Hi Marek, this should remove the colon too

  4. I just tried this and it works like a charm! Thanks so much for this 🙂

  5. Thanks a lot! This snippet still works and saved a lot of headaches!

    1. Cool

  6. thank you so much

    1. you are welcome

  7. thank you great

    1. Cheers!

  8. how can I remove it from order received page

    1. Hi Mohammed, 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!

  9. Aloha, I have a strange request, I have two integrated APIs (plugins for fulfillment), which seem to be at a conflict. If an item is added from each fulfillment location the split seems to double down and mix up and post as Shipping, Shipping 2, Shipping 3, and Shipping 4. I would like to remove two of these shipping aspects.

    such as when a tote bag and a latte mug are added in a single order.
    Can you please help?

    1. Hi Averianna, 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!

  10. Hi there, im looking for something similar, my “store pickup” option in configuration makes me select a cost, if i set it to “$0” then a label appears “store pickup – Free shipping!”. Do you know how can i remove that free shipping, its confusing!

    1. Hello Ian! Can you set it to an “empty” value instead?

  11. Výborně funguje pro mou změnu, děkuji! Děláš skvelou práci!

    WordPress Verze 5.2.3 a WooCommerce Verze 3.7.0

    1. Great!

  12. want to remove

    Shipping | Free shipping

    is it possible?

    1. Hello Rocky, 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!

  13. Thank you so much! 🙂

    1. You’re welcome!

  14. Hi!

    Thank you for the code. I’m using WooCommerce 3.5.5.

    If I use this code line, it works, but:
    – if the shipping is cost free, the cost free label is also hidden and there is nothing in this line
    – if the shipping costs ex. 5 USD, the shipping method label is hidden and the cost is showing up

    1. Hey Frank, just retested and my “Free Shipping” and “Local Pickup” rates show correctly even if they are free. Try disabling all plugins and switch theme to see if something is interfering

  15. Still works. How can I apply it to the woocommerce order emails as well?

    1. Thanks for your comment Sergeh! You’ll need to find the filter that the order email template uses 🙂

  16. Worked for me 🙂

    Thank you very much!

  17. This should go into the plugins folder, in a new folder (remove-shipping-labels) and a new file /remove-shipping-labels.php) unless you only want to apply this to your current theme

    1. Casper, thanks for your comment 🙂 I definitely don’t recommend that though!

  18. Seems to do the job for me too. Thanks a lot, really haven’t found any other solution that is working (->senseless feature from the plugin by the way)!

    1. Great, thanks Anna 🙂

  19. I was so hopeful but sadly this didn’t work for us. Do you have any other ideas?

    1. Hey Lauren, it seems it worked for almost all those who left a comment 🙂 Can you try on a default, latest version of Woo (without plugins and with a default theme)?

  20. This worked for me. Thanks for sharing!

  21. Thanks! Still working on march 2017!

  22. Thank you Sir, you saved my evening 🙂

    1. My pleasure Pat! Thanks for your feedback 🙂

  23. Hi rodolfo, thanks for this snippet, it works perfect, how ever im looking not to hide the shipping method, but showing it after shipping price. In other words change the order… Example: Shipping $10 (Flat Rate). Thanks in advance.

    1. Hey Juan, thanks for your comment! Unfortunately this is custom and I cannot provide a free fix in the blog comments 🙂 Thanks for your understanding!

  24. Your function is working fine in cart and checkout page .
    When user complete the checkout process. there is a thank you page and shipping label still visible on that page.
    Also an email of order shipping label is also visible in it. can you please let me know how ca i remove shipping label from thank you page and an email.

    Many thanks in advamce

    1. Sahil, thanks for your comment! Yes this is possible, however it’s custom work and I can’t offer you a complementary fix. I looked through the files to see if there was a filter you can use to disable that “via Flat Rate” label, and I found it:

      $shipping .= apply_filters( 'woocommerce_order_shipping_to_display_shipped_via', '&nbsp;<small class="shipped_via">' . sprintf( __( 'via %s', 'woocommerce' ), $this->get_shipping_method() ) . '</small>', $this );

      You can take advantage if this to disable the label on the thank you and emails 🙂

  25. Thanks for this! This works on the checkout page & I saw you mention that it doesn’t work in customer emails, but I was wondering if it can be changed within the My Accounts tab (after the customer has purchased). Currently, it still shows when I go to My Accounts. Thanks!

  26. Hello,

    How can I show the chosen shipping option in the basket totals?

    1. Hello Soyful, thanks for your message! Can you send me a screenshot / mock-up to explain graphically what you’re trying to achieve? Thank you in advance!

  27. Hello, sir in which file i have to set thise code…for removel shipping and handling option from cart page.

    1. Hello Ganesh! You can place this in your child theme’s functions.php file – if you need more guidance, please take a look at this video tutorial: “How to Customize WooCommerce with PHP Snippets (even if you don’t know PHP)“. Hope this helps!

  28. Hello, thank you for your code. It’s work for me. However the code only applied for shipping cost with fee only, it does not work for Free Shipping method. My cart page and checkout page still display “Free Shipping (Free)” and Free via “Free Shipping”. Can I hide Free shipping label also. Thank you for your sharing.

    1. Hello Loi, thanks so much for your comment! I’m afraid I don’t see the “Free Shipping (Free)” label. What version of WooCommerce are you using?

      I tried my snippet on StoreFront and WooCommerce 2.5.5 and it works: https://screencast.com/t/WncaH01jOY (removing “Free Shipping” would give you an empty label… not great!)

      Let me know 🙂

  29. Thanks you!

    1. You’re welcome Yati!

  30. Hello! Is it possible to only hide the labels on checkout page but still display them on cart page?

    1. Hey Sebastian, thanks for your comment 🙂 Of course – you can use the conditional tag is_checkout() and make the function run on the checkout only:

      // Removes shipping method labels
      add_filter( 'woocommerce_cart_shipping_method_full_label', 'remove_label', 10, 2 );
      function remove_label($label, $method) {
      if (is_checkout()) {
      $new_label = preg_replace( '/^.+:/', '', $label );
      } else {
      $new_label = $label;
      return $new_label;
      1. Hello Rodolfo,

        Thank you so much for your explanations. I assume I am supposed to add this function into my functions.php file in my theme correct?

        If so, I did but it seems that its not working for me for some reason. Would you please help me on this?

        Thank you a lot!

        1. Hey Hashim, thanks so much for your comment! I just tested this snippet in Woo 2.6.2 and it still works correctly – and yes, I added this to my current theme’s (child theme) functions.php file. Try clearing the cache if you have a cache plugin 🙂

  31. Hey! Does this code get rid of the shipping method label in the customer’s billing email? If so, then this is exactly what I need.

    Also, where do I exactly insert this code? In my theme’s functions.php?

    1. Meleah, unfortunately this code only works on Cart and Checkout pages. Doing the same in an email can be done but it’s custom and cannot cover this in this post. In case, get in touch 🙂 R

  32. Hello, this doesnt work for me (www.electromes.gr/shop)

    1. Hey Christopher, thank you for this. I’m trying to add a product to cart but I don’t see an Add to Cart button – can you help? Thank you

      1. Thanks for the comment,
        Unfortunately in this clients page you have to be a member to add to cart.

        1. I see – if you want to send me login details I’ll see if I can fix the snippet for you. In case email me at infoATbusinessbloomer.com. R

  33. Hi Rodolfo : I had try to add this , but it seems like My shipping method dropdop section is cart page not getting hide , I am using wp 4.1.5.
    Please check this screenshot : http://www.awesomescreenshot.com/image/370924/647434e661b89b83b042a1da81f633a0

    1. Sorry for a late , your code works awsome , My shipping lable get hidden , But is it possible to hide the whole shipping information in cart page , so that customer will get focused on shipping information only at checkout , Is this is possible .
      Now i add my changes like
      ” .cart_totals table tbody tr.shipping{display:none;} ” In css,
      But for this i need to set my default shipping to free of cost . Is there any way to do this?

      1. Hey Karthick, thanks for your inquiry! Yes – you can set the default shipping via the Woocommerce / Settings / Shipping and by “ticking” the default shipping method at the bottom of the page. Hope this helps!

  34. Very good and working for me 🙂

Questions? Feedback? Support? Leave your Comment Now!

If you are writing code, please wrap it between shortcodes: [php]code_here[/php]. Failure to complying with this (as well as going off topic, not writing in English, etc.) will result in comment deletion. 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 BloomerArmada to get blog comment reply priority, ask me 1-to-1 WooCommerce questions and enjoy many more perks. Thank you :)

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