In older versions of WooCommerce there would display a ‘(Free)’ label behind any flat shipping rate without cost. Since WooCommerce version 2.6.0 it no longer shows this automatically behind shipping rates. Instead it doesn’t show anything, which is not as clear as it can be. Which in turn can confuse your customers and lead to lower conversion rates.

If you have a simple ‘free shipping’ option it is easy enough to add a text manually to the shipping option. However if you have a dynamically priced shipping rate in the (e.g. shipping class based cost) flat rate option or the Advanced Shipping plugin you can’t just add ‘Free’ to the title if there’s a chance it will be paid shipping.

Adding ‘Free’ after a free shipping option

Using the following code snippet you can automatically add the ‘Free’ text behind a shipping option, but only when it in fact is free. I’ve also included a – commented out – part where you can exclude local pickup from displaying ‘Free’ behind it, as this often times is implied.

This code snippet is very similar to how WooCommerce used to add the ‘(Free)’ shipping label to the shipping option.

The results look something like:

If wanted you can also make the ‘Free’ text bold, this can be done by replacing line #8 in the snippet with:

$label .= ' <strong>(' . __( 'Free', 'woocommerce' ) . ')</strong>';

Showing the shipping cost, even when free

An alternative is to just always show the shipping cost, even when it is a free shipping option. The following code snippet can be used for that;

Which will look like:

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

Leave a Reply