Problem description #
Your shipping conditions are correct, but shipping methods still behave incorrectly. They are sometimes visible when they should be hidden, or hidden unpredictably. This often points to a conflict with another plugin or the theme. Conditional Shipping for WooCommerce: Restrict Shipping Options by Anything filters shipping methods in PHP and relies on WooCommerce checkout JavaScript to refresh them, so anything that interferes with either can cause trouble.
Common symptoms:
- Conditions work sometimes and not others.
- The checkout does not refresh the shipping method list after an address or product change.
- JavaScript errors appear in the browser console, or shipping options disappear once caching or optimization is enabled.
Cause: shipping method visibility is updated through the PHP backend and recalculated on checkout with JavaScript. Caching plugins, JavaScript minifiers, checkout optimizers, and themes with a custom checkout can all interfere with that process.
Solution, step by step #
- Switch to a default theme and disable non-essential plugins. Use a standard theme such as Storefront or Twenty Twenty-Four, and disable caching, optimization, and checkout modification plugins. Test shipping with a simple condition. If it works, a conflict is confirmed.
- Re-enable plugins one at a time and test after each. This isolates which plugin causes the issue, whether it is a caching, performance, shipping-class, or custom checkout plugin.
- Exclude cart and checkout from caching and minification. If you use a cache, CDN, or minifier, configure it so the cart, checkout, and shipping-method fragments are never cached or minified.
- Check the checkout JavaScript for errors. Open your browser DevTools and look at the Console for JavaScript errors that could block shipping method updates. Resolve or disable the conflicting script.
- Clear all caches after changes. Purge server, object, page, and CDN caches, since some caching persists across sessions, then retest.
- If a conflict is unavoidable, weigh your options. If you depend heavily on a plugin that conflicts, such as a custom checkout or optimization tool, check with its author for a compatible configuration before deciding how to proceed.
Prerequisites #
- Admin access, and ideally developer access, to enable or disable plugins and switch themes.
Additional notes and prevention #
- Keep a note of any plugins that modify the cart, checkout, or shipping, and record compatibility notes whenever you update WordPress or WooCommerce.
- For production stores, test plugin and theme updates on staging first.
Need a hand? Our team answers every ticket on the Conditional Shipping support forum.
