---
title: How to Set a Maximum Quantity Per Category
description: Cap how much of a WooCommerce category a customer can buy, per product or combined across the cart. Pro.
url: "https://wpfactory.com/docs/category-maximum-quantity/"
updated: "2026-09-26"
category: How to
tags:
  - Min Max Default Quantity for WooCommerce
---

# How to Set a Maximum Quantity Per Category

To cap how much of a WooCommerce category a customer can buy, enable **Per Category** under **WPFactory > Quantity Manager > Maximum Quantity** in [Min Max Step Quantity Limits Manager for WooCommerce](https://wpfactory.com/item/product-quantity-for-woocommerce/), then set the maximum on the category page, either for each product or for the category combined. This is a Pro feature.

## Before you start

- WooCommerce, active.
- [Min Max Step Quantity Limits Manager for WooCommerce](https://wpfactory.com/item/product-quantity-for-woocommerce/) Pro (per-category rules are Pro only).

![Maximum Quantity section options](https://wpfactory.com/wp-content/uploads/pasted-image-0-46.png)

## Step by step

1. Go to **WPFactory > Quantity Manager** (also reachable at **WooCommerce > Settings > Product Quantity**).
2. Open the **Maximum Quantity** section and tick **Maximum quantity** to enable it.
3. Under **Per Category Maximum Quantity Options**, tick **Per Category** (`wpfmmsq_max_per_cat_item_quantity_per_product`). This adds two fields to each category edit page.
4. Click **Save changes**.
5. Go to **Products > Categories**, edit the category, fill one or both fields described below, and click **Update**.

![Per Category maximum option enabled](https://wpfactory.com/wp-content/uploads/pasted-image-0-1-10.png)

## The two category fields

| Field on the category page | What it limits | Example with value 5 |
| --- | --- | --- |
| Maximum quantity for all product (apply to all products in this category) | Each product in the category separately | Up to 5 of each product |
| Maximum quantity (grouped for this category) | All products of the category added together | Up to 5 in total from the category |

Leave a field at `0` to skip it; products then fall back to the next level, such as the All products maximum.

**Tip:** to make the maximum appear on page load, set **General > Initial Quantity Options > Single product page** to **Max quantity**.

## Which maximum wins

For each product, Quantity Manager uses the first maximum it finds: the product's own **Maximum quantity** (Per product), then the category's per-product value, then the attribute value (Per Attribute, Pro), then **All products**. The grouped category maximum is checked separately against the category total.

## What the customer sees

The quantity box stops at the per-product maximum. When the cart goes over a limit, the order is stopped at checkout with the Maximum Quantity message: for the grouped limit, "Maximum allowed quantity for category %category_title% is %max_per_item_quantity%. Your current quantity for this category is %item_quantity%." Tick **General > Cart notices** to show it on the cart page too.

## Options reference

| Label | Option ID | Default | Free/Pro |
| --- | --- | --- | --- |
| Maximum quantity (enable section) | `wpfmmsq_max_section_enabled` | No | Free |
| All products | `wpfmmsq_max_per_item_quantity` | 0 (off) | Free |
| Per product | `wpfmmsq_max_per_item_quantity_per_product` | No | Free |
| Per Category | `wpfmmsq_max_per_cat_item_quantity_per_product` | No | Pro |
| Message (category) | `wpfmmsq_max_cat_message` | Maximum allowed quantity for category %category_title%... | Free |
| Per Attribute | `wpfmmsq_max_per_attribute_item_quantity` | No | Pro |

## If it does not work

- **No fields on the category page:** the Maximum quantity section or the Per Category box is off, or Pro is not active.
- **A product goes over the category value:** it has its own per-product maximum, which takes priority.
- **The grouped limit is not enforced until checkout:** expected unless Cart notices or add to cart validation are enabled in General.

## FAQ

### Can I set a minimum quantity per category?

Yes. Enable Per Category in the Minimum Quantity section and the same two kinds of fields appear for the minimum. See [How to set a minimum order quantity](https://wpfactory.com/docs/woocommerce-minimum-order-quantity/).

### Can I cap the whole cart instead of one category?

Yes, for free. Use **Cart total quantity** in the Maximum Quantity section. See [How to set a maximum order quantity](https://wpfactory.com/docs/woocommerce-maximum-order-quantity/).

### Does it limit repeat purchases?

No, the limit applies to each cart. For limits per customer across orders, see [Maximum Products per User for WooCommerce](https://wpfactory.com/item/maximum-products-per-user-for-woocommerce/).

### Ready to set this up?

This is a Pro feature of [Quantity Manager](https://wpfactory.com/item/product-quantity-for-woocommerce/). Upgrading unlocks per-category and per-attribute maximums; per-product maximums are already free. [Get Quantity Manager Pro](https://wpfactory.com/item/product-quantity-for-woocommerce/).

Need a hand? Our team answers every ticket on the [Quantity Manager support forum](https://wpfactory.com/support/item/product-quantity-for-woocommerce/).

Related articles

- [How to Set Per Product and Per Category Default Quantities](https://wpfactory.com/docs/item-quantity-defaults/)
- [How to Set Step Quantities Per Category](https://wpfactory.com/docs/category-step-quantities/)
- [How to Show a Quantity Box on Shop and Category Pages](https://wpfactory.com/docs/woocommerce-quantity-on-archive-pages/)
- [Per-Product Quantity Fields Are Not Available](https://wpfactory.com/docs/sold-individually-unavailable/)
- [Minimum/Maximum Quantity Settings Not Working](https://wpfactory.com/docs/quantity-settings-malfunction/)

 

[![Min Max Default Quantity for WooCommerce](https://wpfactory.com/wp-content/uploads/Min-Max-Default-Quantity-for-WooCommerce.webp)](https://wpfactory.com/item/product-quantity-for-woocommerce/)
