I'm building a store for a client that will be selling regular products alongside alcoholic products. They want to limit the shipping countries available if the cart has alcoholic products added. Is this possible in expresso store out of the box? Looking for the best way to go about it.

1 Answer 1


Not out of the box, no. But I've done this before by using the store_order_recalculate_start hook. I looped through all of the items in the $order, and if any product met my criteria, I set a cookie saying so (in your case, it could be as simple as saying limit_countries or something, but you could get more complex by storing data in a hashed array).

Then you need a plugin tag to check for that cookie, and if present you show a different list of countries during checkout.

This is a simplified example, but it's roughly the path you'd need to take.

  • Thanks Derek. At least I know which rabbit hole to head down now ;) Jan 23, 2015 at 11:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.