Local Delivery Minimum not working on Checkout
-
Hi There,
I’ve been working on this problem for a while now, and I just seem to be spinning my wheels and going nowhere.
The problem is I need to have a minimum cart quantity to allow local delivery, but this doesn’t work on the checkout page. I’m using this filter
woocommerce_package_rates
to alter the available rates. It works ok on the cart page, but the checkout page doesn’t seem to use this filter?One of my theories is transients. The filter
woocommerce_package_rates
is called inside an if statement that only runs if a transient isn’t set, or if the shipping is in “debug mode” (file: /includes/class-wc-shipping.php). The transient is set inside at the end of that statement too and is set for an hour (caching). So the checkout uses whatever was in the cart the first time you went to it, but if you add or remove items above or below the minimum, it doesn’t change for an hour.However, I’ve tried turning on shipping debug mode and temporarily editing the files myself to get rid of the transient code with no luck.
Any info would be greatly appreciated. I’m starting to wonder if this is a bug…
Thanks in advance!
Emma
- The topic ‘Local Delivery Minimum not working on Checkout’ is closed to new replies.