Is it possible to restrict by condition COUNTRY and ATTRIBUTES with WooCommerce?
I have two idea to archive it:
Made a snippet
Create separated Query:
- Extract from WooCommerce the country of the billing and shipping dropdown. (2 queries)
- Extract the Attribute meta 'brand' from the product in the cart.
- Merge them for the Dynamic Visibility of checkout button or to show some warning.
Thank you for any kind of help!
Ex:
If someone select "Italy" and in the cart or checkout there is a product with the Attributes (Brand) BREMBO, It's allowed to process the order.
If there is any other country or at least one product with BREMBO Attribute, checkout button will not available.