In this example we block shipping of a product category Acme Tennis Balls to Arizona, New Mexico and Nevada. We also add a shipping notice to explain why the customer cannot proceed with the checkout.
- Go to WooCommerce > Settings > Shipping > Conditions
- Click Add ruleset
- Enter Title, for example Block Tennis Ball shipments to AZ, NM and NV
- Enter Conditions
Categories – include – Acme Tennis Balls
State (shipping) – is – Arizona, New Mexico, Nevada
- Enter Actions
Disable shipping methods – All shipping methods
Set custom no shipping message – Your cart contains Acme Tennis Balls which cannot be shipped to your state. Please remove them before proceeding with the checkout.
- Click Save changes
All shipping methods will now be disabled when the customer has Acme Tennis Balls in the cart and the shipping state is either Arizona, New Mexico or Nevada. The customer will also see a message explaining why shipping is not available.