How to Raise a WooCommerce Price Automatically After X Sales
Want the first 50 customers to pay less, and the price to go up by itself after that? WooCommerce can’t do it out of the box: its sale price is one fixed number with optional dates, and it never looks at how many units you’ve sold.
Raising the price after X sales is sales-based pricing: the first batch of units sells at a lower price, and the price rises automatically as each batch sells out. It is different from a bulk discount, which lowers the price when one customer buys more units in a single order.
This guide covers when it’s worth doing, why WooCommerce can’t do it alone, the code approach and where it breaks, and how to set it up with a free plugin. Everything here was checked on WooCommerce 11.2 in October 2026.
When raising the price after X sales makes sense
- A product launch. The first 50 buyers get $19, the next 100 pay $29, then the regular $39. Early buyers get a real reward, and later buyers see that the price is going up for a reason.
- A limited first batch. You’ve made 200 units of a new roast, print or gadget. Selling the first run at a founders’ price fills it faster without discounting forever.
- Course cohorts and event tickets. The first 30 seats at $99, the next 30 at $149. It’s how “early bird tickets” work, except the price changes when seats sell, not on a date you guessed in advance.
In each case the price change is honest: the cheaper price runs out because it actually sold.
The idea
You define steps based on units sold:
- units 1–50 at $19
- units 51–150 at $29
- from unit 151, the regular price of $39
Every time an order is paid, the count goes up. When it passes 50, the price becomes $29 for the next shopper, automatically.
Why WooCommerce can’t do it on its own
WooCommerce has two things that look close, but neither does the job:
- The sale price is one number with an optional start and end date. It changes on the clock, never on sales. If your 50 cheap units sell in an hour, the sale price stays live until the end date.
- The sales counter (
total_saleson each product) is just a number. WooCommerce raises it when an order becomes processing, completed or on hold, and lowers it again if that order is cancelled or trashed. Nothing in WooCommerce reads it to set a price.
So you need something that reads the count and sets the price: either your own code or a plugin.
The code approach (and where it breaks)
The simplest version is a filter on the product price that reads the sales counter. Replace 123 with your product ID:
add_filter( 'woocommerce_product_get_price', function ( $price, $product ) {
if ( 123 !== $product->get_id() ) {
return $price;
}
$sold = (int) $product->get_total_sales();
if ( $sold < 50 ) {
return '19';
}
if ( $sold < 150 ) {
return '29';
}
return $price; // From unit 151, the regular price.
}, 10, 2 );
We tested it on a WooCommerce 11.2 store: at 60 sales it charged $29, and at 200 it went back to the regular price. It works as a demo. It isn’t safe for a real launch, for these reasons:
- The count includes old sales. On our test product the counter already said 18 from earlier orders, so “first 50 at $19” would really have been “the next 32”. You’d need to store the count at launch and subtract it.
- Refunds don’t give units back. WooCommerce’s counter goes down when an order is cancelled, but not when it’s refunded, so a refunded early-bird unit is lost for good.
- One big order can jump a tier. If 48 are sold and someone orders 10, all 10 get $19. A cart line can’t charge part of its quantity at one price and the rest at another.
- Two shoppers can buy the last cheap units together. Both see “2 left at $19”, both pay, and you’ve sold 4.
- Unpaid orders don’t count yet. A shopper can sit at a payment page for minutes while others take the same units.
- Nothing tells the shopper. There’s no “only 12 left at $19, then $29”, no countdown and no tier table, which is most of what makes early buyers act.
- Only this product. Every new product means editing code.
Each of these is fixable in code, but by then you’ve written a plugin.
Set it up with TierStep (free)
TierStep is a free WooCommerce plugin built for this, with no paid version. It counts only sales made after your offer starts, and handles every case above.
- Install TierStep from Plugins → Add New Plugin and activate it.
- Edit the product and open the TierStep Pricing tab.
- Tick Enable TierStep pricing campaign.
- Add the steps:
50/19, then150/29. - Click Update.

That’s it. Your product page now shows the price steps, with the current one highlighted:

What happens when two buyers want the last cheap units
This is where most homemade setups go wrong, so it’s worth knowing exactly what TierStep does:
- Checkout holds. When an order is placed, its early-bird units are held while the customer pays (15 minutes by default). Other shoppers see fewer units left and can’t buy the same ones.
- No tier jumping. An order can’t take more units than the current price has left. With 2 left at $19, a shopper can add 2 at that price, not 10.
- Refunds give units back. A refunded early-bird unit returns to its tier, so the cheaper price can reopen. You can turn this off per campaign.
- Cancelled and unpaid orders stop counting, because TierStep follows WooCommerce’s own sales counter.
It works the same on the classic checkout and the Cart and Checkout blocks.
Raise prices across many products at once
To run the same rule across a whole category, for example 20% off the first 30 units of every product in “Coffee”, create a store-wide campaign under Products → TierStep Campaigns. Each product counts its own sales.

Good to know
- Variable products share one count across all sizes and colours, and each variation is priced from its own regular price.
- Prices update for everyone, not per customer. If you want lower prices for bigger orders instead, that’s a bulk-discount plugin; see early bird pricing vs bulk discounts.
- Prefer a percentage off? Set the steps as 30%, 20% and 10% off instead of fixed prices, and they follow the regular price if it changes; see progressive discounts in WooCommerce.
- Your regular price is never edited. When the last step sells out, the product is simply back at its regular price.
Frequently asked questions
Can WooCommerce raise a price after a number of sales without a plugin?
Not on its own. The sale price only follows a start and end date, and the sales counter isn’t used for pricing. You can write a price filter that reads the counter, as shown above, but it needs extra work for old sales, refunds, large orders and simultaneous checkouts before it’s safe for a launch.
Does the price go up for everyone or per customer?
For everyone. The price depends on how many units the store has sold in total, so all shoppers see the same price at the same moment. For lower prices when one customer buys more units, use a bulk or quantity discount plugin instead. The three kinds of tiered pricing are compared in tiered pricing in WooCommerce.
What happens to shoppers who already have the cheaper price in their cart?
With TierStep, if a cart holds more units than are left at the cheaper price, the cart and checkout show a notice before the order is placed, instead of quietly charging a different price. Once an order is placed, its units are held while the customer pays.
Can I raise the price in percentages instead of fixed prices?
Yes. TierStep’s steps can be fixed prices, a percentage off the regular price or an amount off it. Percentages suit store-wide campaigns, where products have different regular prices.
Do refunds and cancellations lower the count?
Cancelled orders always stop counting, because WooCommerce lowers its own counter. With TierStep, refunded units are also given back to the tier they were sold at, so the cheaper price can reopen. You can switch that off per campaign.
Can I stop the cheap price after a date even if units are left?
Yes. Give the campaign an end date, and it ends on that date or when the last step sells out, whichever comes first. You can also set a start date, and shoppers see a “starts in” countdown before launch.
Next steps
- Read the full TierStep documentation for every option, starting with getting started.
- Planning a launch? See the step-by-step guide to early bird pricing in WooCommerce.
- Weighing up other plugins? Read early bird pricing for WooCommerce: 5 plugins compared.
Sources
- WooCommerce’s sales counter: the
wc_update_total_sales_counts()function in includes/wc-order-functions.php, hooked to the processing, completed, on-hold, cancelled and trash order events. - The code example and the “18 earlier sales” result: our own test on a WooCommerce 11.2 store, October 2026.
- TierStep behaviour: the TierStep listing on WordPress.org and documentation.
