Trouble restricting the shipping of certain items
-
I’m very new at this and not sure what I can do so I’m using the Bitnami WordPress Stack 5.8.1-0 locally installed on my computer. I have WooCommerce 5.6.0, WooCommerce Payments 2.9.1, and WooCommerce Shipping & Tax 1.25.18.
I’m trying to set up a basic shop. I want to restrict shipping of some items to in-state addresses. I also want to sell additional items that aren’t restricted and are available to all states in the USA. An order might have both restricted and unrestricted items. I set up a in-state only shipping class and another shipping class for all states for unrestricted items. I assigned the classes to their respective products. I created two shipping zones. One zone for in-state and the other zone for all of the USA.
If I put one restricted item in the cart, go to the Cart page, then put in an in-state location then shipping is correctly calculated. If I put in an out of state location correctly I am told that there are no shipping options available and the Checkout button is removed. (I added the bits of code found here to block access to the Checkout page unless a shipping method is available.)
When I have a restricted item and unrestricted item in the same cart, I want no shipping options to be offered when an out of state location is given. I’d also like some kind of message shown explaining why no shipping is available, but lets address one issue at a time. Instead of there being no shipping available and the Checkout button hidden, shipping is still offered and calculated for only one of the items and the Checkout button is present.
Also, if I have two items in the cart, a mix of restricted and unrestricted products, going to an in-state location then shipping is offered but only calculated for one of the items.
Have I misconfigured something? Can I do what I want with free stuff? Or, do I need something better that needs to be paid for?
- The topic ‘Trouble restricting the shipping of certain items’ is closed to new replies.