Through Category restrictions settings available in the General settings tab, you can prevent users from checking out if the number of products added to the cart or the spend amount doesn’t fulfill the values you have configured for product categories.
Enable the option Enable category quantity restrictions to set a minimum and a maximum number of products with a specific category that must be added to the cart to complete the order.
- Minimum quantity restriction: define the minimum number of items for each product category to be added to the cart. If you don’t want to apply any restriction, set the value to 0;
- Maximum quantity restriction: define the maximum number of items for each product category to be added to the cart. If you don’t want to apply any restriction, set the value to 0;
- Category quantity groups of: define the number of products belonging to the same category that must be purchased in groups (e.g. groups of 2 of the category Clothes);
Enable the option Enable category spend restrictions to prevent users from completing their order if the amount is higher or lower than the values you have specified for the categories.
- Minimum spend restriction: define the minimum spend for product categories in the cart. If you don’t want to apply any restriction, set the value to 0;
- Maximum spend restriction: define the maximum spend for product categories in the cart. If you don’t want to apply any restriction, set the value to 0;
To exclude a category from the general restrictions, go to the the WooCommerce category page and enable the option Exclude. On the contrary, if you want to override the global restrictions enable the option Override quantity restrictions and/or Override spend restrictions.