When you only offer one shipping option in WooCommerce then you may want to show only the shipping cost in the column of the order totals. If you’re using my Advanced Shipping plugin you’ll notice that when you leave the ‘Shipping title’ field empty it will fall back to a standard ‘Shipping’ as a title.

This is done purposefully because WooCommerce doesn’t handle it nicely when no shipping title has been entered. For example at the cart/checkout it will remain showing a colon (:) in from of the cost without a real reason.

To fully make things work nicely without a actual shipping label you’ll need a couple code snippets to do so. For starters you can use this code snippet to remove the shipping label and colon from the cart/checkout

Order emails

The order emails also need a bit of work because they are also counting on having a shipping label available to show. If you go with the above it will look like this;

This is because the shipping label is in fact still ‘Shipping’, we’ve just modified the label to not show at a certain time. Now we extend that to also the emails by using this one line of code:

The result

Now it will only show the the shipping cost and omit the shipping title.

At the checkout:

And in the email:

 

Jeroen Sormani

I'm a professional WordPress plugin developer on a mission to create the best plugins for my clients. I'm specialised in developing general WordPress, WooCommerce and Easy Digital Downloads plugins.

Interested in talking about a WordPress project? Get in touch!

Follow me on Twitter

12 thoughts on “Remove the shipping label in WooCommerce

adnan May 24, 2018 at 10:35 am

thanks.

Group of Oceninfo June 19, 2018 at 7:57 am

How to remove cost and only show label like i.e. Via : Free Shpping or Via: UPS

So, Email will only show the label not the cost as I am providing free shipping but everytime it’s adding something like $0 VIA FULL PAYMENT or $0 VIA FREE SHIPPING.

I would like to keep VIA FULL PAYMENT or VIA FREE SHIPPING but don’t want to show price as it’s creating confusion for some customer and getting questions for that from them.

Jeroen Sormani June 19, 2018 at 11:01 am
Group of Oceninfo June 20, 2018 at 11:33 am

Thanks for writing it, I have tested the code it’s working like expected

Sven August 22, 2018 at 7:17 pm

Hi Jeroen,

Possible to just remove the colon and the space instead?

Tried to use return substr( $label, 0, -2 ); but it doesn’t work.

Jeroen Sormani August 23, 2018 at 10:18 am

Hi Sven,

Try str_replace( ‘: ‘, ”, $label ); instead, that should remove any colon+space from the label.

Cheers,
Jeroen

Phil July 5, 2019 at 4:42 pm

Thaaaaaank you so much!!! As a beginner I was looking for ages for a working snipped like this!

Kate August 3, 2019 at 4:15 pm

You are my hero, thank you 🙂

Testing August 8, 2019 at 5:10 pm

thank you 🙂

Teo September 17, 2019 at 5:01 pm

hi, how to remove ‘shipping’ label on the left column?

David January 10, 2020 at 11:42 am

Perfect – this saved me a lot of time / hassle. Much appreciated.

Wessel February 1, 2020 at 11:29 am

Hi Jeroen,

Thanks for sharing this filter! Do you have also a filter to hide the: (includes 3.12 tax) part? I tried by adding this filter: ‘add_filter(woocommerce_tax_total_display’, ‘__return_false’ ); but unfortunately this filter didn’t do his job.

Leave a Reply