This is a short blog post about the shipping debug mode. I will explain what it is, where you can find it, how you can use it and for what situations you should enable this setting.

By default WooCommerce caches every shipping rate calculation for 1 hour. They are doing this because calculating the shipping rates is a fairly complex process compared to some other functions, but primarily because this will get called every time you change something in your checkout page. Ever noticed the checkout totals are re-loading when you type in your address or change a letter in your address for example? Every time you change something WooCommerce will reload the shipping rates based on your ‘new’ address. If none of the essential fields are changed (like zipcode), it will get the rate from the cache instead of re-calculating it on every reload.

This is good for a live webshop that has everything set to go. But when you’re configuring your shipping rates, it can give you a wrong idea that something is not working, whilst it actually might be working.

For that challenge is a solution; the shipping debug mode. When enabled the shipping rates will no longer be cached and every time you refresh the page it will re-calculate the shipping costs.

Enabling the shipping debug mode

woocommerce-shipping-debug-modeTo enable the shipping debug mode you need to go to WooCommerce -> System status -> Tools; On that page you will find the ‘Shipping debug mode’

Note The setting has been moved to the ‘Shipping’ > ‘Shipping options’ section in WooCommerce 3.0+

I hope this will help some people who struggle with shipping rates that do not change, even though they put every setting right.

  • 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
  • 4 thoughts on “Shipping debug mode

    Fabian July 11, 2015 at 10:20 am

    Hi,
    i just found this post from you. Thanks!
    But my problem is, that the checkout page is not auto reloading. so the customers have to reload the page to see the right shipping costs. You may know how to fix that?

    Best regards

    jeroen July 12, 2015 at 7:43 am

    Hi Fabian,

    Sounds like you have a JavaScript error somewhere. Probably from a plugin and maybe your theme.
    First step would be to identify where its coming from; https://codex.wordpress.org/Using_Your_Browser_to_Diagnose_JavaScript_Errors

    Second step is contacting the relevant developer to report it 🙂

    Hope that helps!
    Jeroen

    jam September 24, 2015 at 6:28 am

    jeroen. Do you have any clue of how to display on cart the exact calulation of shiping for debuging purposes?

    jeroen September 24, 2015 at 3:32 pm

    Hi,

    What would you like to display on the cart?
    There’s no official way of displaying debug stuff on the cart page, I do know there are some plugins that display the cart weight for example.

    Cheers,
    Jeroen

    Leave a Reply