Everybody wants to increase the average order value for their store, right? A good way to do this is to offer free shipping above a certain order amount. If you have this on your site you should of course promote this as a selling point on a prominent and default position.

Alongside with that, it would be good to help the customer remind in the cart if they’re close to the free shipping amount with a notification saying something like “Add $10 more to your basket to receive free shipping!”.

In this post I’ll provide a code snippet that you can use to display such message on the cart/checkout page when using the WooCommerce Core ‘Free shipping’ option. I’ll also provide a solution when using the Advanced Shipping or Advanced Free Shipping plugins.

Showing a free shipping notice for WooCommerce Core free shipping rates

Using the following snippet you can show the notice on the cart / checkout page. It will only appear when the minimum order amount setting is set.

You can remove some of the lines if you only want to display it at the cart / checkout page as described inline.

Showing a free shipping notice for Advanced Shipping

If you setup a free shipping option with the Advanced Shipping / Advanced Free Shipping plugin then the above code snippet won’t work as that only recognises the ‘Free shipping’ rate of WC Core and the respective settings. Because of the conditions it is very difficult to setup a code snippet that would fit the exact requirements.

Therefore the easiest solution would be to use the Advanced Messages plugin. Just like the other ones, this plugin has similar conditions and will allow you to setup conditional messages throughout your store.

Here’s how an example setup would look like;

1. The free shipping rate

2. The message

The message would have a similar setup. I’ve added a additional condition to ensure it doesn’t show when there’s too big of a gap between the free shipping amount and the cart subtotal.

3. The message at the cart

  • 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
  • 2 thoughts on “Showing a ‘Add $10 more for free shipping’ notice

    Andy September 26, 2017 at 7:36 pm

    Hi Jeroen

    Looks like a useful post, but it isn’t clear where we need to paste the code snippet to make it work.

    Thanks!

    Jeroen September 26, 2017 at 7:48 pm

    Hi Andy,

    You can copy&paste the contents of the script to your (child) themes functions.php. I usually recommend doing it over FTP.
    If wanted you can read more about code snippets here: https://shopplugins.com/how-to-add-a-code-snippet-to-your-site/

    Cheers,
    Jeroen

    Leave a Reply