---
title: Can I discount products based on their stock level?
description: "Yes. Pricepep's Product stock quantity condition discounts overstocked products or the last few in stock, and the price changes back with the stock."
url: "https://pricepep.com/docs/can-i-discount-products-based-on-stock-level/"
updated: "2026-12-02"
category: FAQ
---

# Can I discount products based on their stock level?

Yes. Under a rule's **Products**, add **Product stock quantity** with an operator and a number. Example: 20% off products with **more than** 50 in stock: an overstocked $30.00 item costs $24.00 until its stock falls to 50, then $30.00 again.

## How do I set it up?

1. Go to **WooCommerce > Pricepep > Product Pricing** and click **Add Rule**.
2. Set **Method** to **Simple adjustment**, and under **Adjustment** choose **Percentage discount** and type `20`.
3. Under **Products**, click **Add Product**, choose **Product stock quantity**, **more than**, and type `50`.
4. Optional: add **Product category** to limit it to some products.
5. Click **Save Changes**.

## Which deals can I build?

| Deal | Condition under Products |
| --- | --- |
| Clear overstock | **Product stock quantity** **more than** 50 |
| Last-chance price on the final units | **Product stock quantity** **not more than** 5 |
| Discount while stock lasts | **Product stock quantity** **more than** 0 |
| Price up when stock is low | **Product stock quantity** **less than** 10 with **Percentage fee** 10 |

## What should I know?

- **Only products that manage stock** have a stock quantity; others never match. Tick **Track stock quantity for this product** (**Stock management**, in the product's **Inventory** tab; **Manage stock?** on a variation). The checkbox shows only when **Manage stock** is on in **WooCommerce > Settings > Products > Inventory**. Variations whose stock is managed on the parent product use the parent's quantity.
- **The price follows the stock right away:** when sales move the stock across your number, the next page view and the cart use the new price, also for items already in a cart.
- **Page caches** can keep showing the old price on cached pages; see [caching](/docs/caching/).
- **It isn't a usage counter.** For an exact number of discounted sales, see [can I limit how many times a discount is used?](/docs/can-i-limit-how-many-times-a-discount-is-used/)

The condition's reference is in [product conditions](/docs/product-conditions/).

## Frequently asked questions

### Why does the condition never match a product?

Stock management is off for it. Tick Track stock quantity for this product (Stock management, in the product's Inventory tab; Manage stock? on a variation). Products without a stock quantity never match.

### Can the discount stop after 20 sales?

Since 2.6.0, also without stock management: Product total sales counts all units sold, so for a product that has sold 100, Product total sales less than 120 ends the discount after 20 more. With stock: with 50 in stock, Product stock quantity more than 30 ends it after 20 units sold. For an exact number of uses, use a coupon with a usage limit.

## Related articles

- [Product conditions: products, categories, tags, price](https://pricepep.com/docs/product-conditions/)
- [Can I limit how many times a discount is used?](https://pricepep.com/docs/can-i-limit-how-many-times-a-discount-is-used/)
- [Caching plugins and Pricepep prices](https://pricepep.com/docs/caching/)

All articles in [FAQ](https://pricepep.com/docs-category/faq/)
