Skip to main content

artintechsolution.com

Auto-Selecting Free Shipping at a Cart Threshold in WooCommerce

“Free delivery on orders over a threshold” is one of the most common promotions in e-commerce, and WooCommerce’s native Free Shipping method supports it out of the box — set a minimum order amount, and the method becomes available once a cart qualifies. What WooCommerce doesn’t do is switch the customer onto it automatically.

The gap in WooCommerce’s own behaviour

If a customer had already selected a paid delivery option before their cart crossed the free-shipping threshold — by adding one more item, for instance — that paid option stays selected. WooCommerce only picks a default shipping method when nothing has been chosen yet for that session; once a method is chosen, it’s treated as a deliberate decision and left alone, even after a newly-available option is objectively better for the customer.

Two fixes, not one, and why both were necessary

The first case is a customer actively changing their cart on the checkout page itself — increasing a quantity via the page’s own quantity stepper. We flag that specific event client-side, distinct from a customer manually clicking a different shipping radio button, and only auto-select Free Shipping when that flag is set and the method has just become newly available. A manual click on a paid method afterward is left untouched — the flag only fires again on the next quantity change, not on every recalculation.

The second case is a customer arriving at checkout for the first time with a cart that already qualifies. For that, a small server-side filter on woocommerce_package_rates defaults the chosen method to Free Shipping — but only when nothing has been chosen yet for that session. If a real prior choice already exists, the filter does nothing, so it can never silently override a customer’s own decision.

The two fixes share one principle: default to the better option, but never fight a choice the customer actually made.

Key takeaways

  • Adding a shipping method isn’t the same as making it the default — WooCommerce treats an existing session choice as sticky, by design.
  • Distinguishing “the cart just changed” from “the customer just clicked a shipping option” client-side is what makes an auto-select feature safe rather than annoying.
  • A server-side default should only ever apply to an unmade choice — checking for that explicitly is a small amount of code that prevents a real UX regression.

Running into a similar limitation in your own WooCommerce or WordPress admin? Let’s Talk — Artintech Solution builds exactly this kind of custom store tooling.

Leave a Reply

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