Discount codes
Updated October 24, 2026
Create discount codes and automatic sales, set their limits and dates, and see how TierMint applies them at checkout.
Manage discounts in wp-admin
Open TierMint → Discounts. You need the manage_tiermint capability, which administrators have.
The list shows each discount's name, code, amount, uses, date window and status. Type in Search by code or name to narrow the list as you type, or pick a status: All statuses, Active or Inactive. When nothing matches, the screen says so.

Add or edit a discount
- Click Add discount, or Edit on a row.
- Fill in the fields below.
- Click Save discount.
| Field | What it does |
|---|---|
| Name | Required. It labels the discount line in the cart and at checkout, and helps you find the discount in the list. |
| Automatic (no code) | Off makes an ordinary code that buyers type. On makes a sale that applies by itself. See Automatic discounts. |
| Code | What the buyer types at checkout. Up to 50 characters. The field is hidden for an automatic discount. |
| Discount type | Percent off or Fixed amount in your store currency. |
| Amount | The percentage, or the fixed amount as a decimal such as 5.00. TierMint stores fixed amounts in the currency's smallest unit, such as cents. |
| Applies to | Automatic discounts only: All products, Chosen products or Chosen categories. |
| Products | The products the discount covers. It shows for a code discount, and for an automatic discount that applies to chosen products. Leave it empty on a code discount to cover every product. |
| Categories | Automatic discounts that apply to chosen categories: the categories the sale covers. |
| Minimum order total | Optional. The cart subtotal a buyer needs before the code works. |
| Maximum uses | Total redemptions across all customers. 0 means unlimited. |
| Limit to one use per customer | Each customer can redeem the discount once. |
| Starts at, Expires at | The date window. Leave Starts at blank to start now, and Expires at blank for no end date. |
| Active | The on and off switch. It works separately from the date window: an active discount outside its window still does not apply. |
When you edit a discount, the form also shows how many times it has been used.

Switch a discount on or off, or delete it
Click Activate or Deactivate on a row to switch the discount on or off.
To delete it, click Delete, then Confirm delete. The code stops working at once and there is no undo. Past orders keep their own copy of the code and the amount it took off, so deleting a discount never changes an order's history or receipt.
Change several discounts at once
- Tick the rows you want, or the box in the header row for the whole page.
- Pick Activate, Deactivate or Delete from Bulk actions.
- Click Apply.
A bulk delete asks once before it runs. TierMint handles each discount separately, so the notice afterwards says how many succeeded and names any that failed, with the reason. Changing the page, a filter or the sort order clears the selection.
How buyers use a code
The checkout page has a Discount code field with an Apply button. The buyer types the code and clicks Apply. Once it is accepted, the field shows "Code LAUNCH25 applied" with a Remove button.
TierMint checks the code when the buyer applies it, and again when they place the order. The once-per-customer limit is checked when the order is placed. At that point TierMint matches the buyer to a customer record. A signed-in buyer who pays with their account email is matched by their account, and anyone else by email address. So guests are checked too.
To leave the field off a checkout page, set show_discount to false on the checkout shortcode:
[tiermint_checkout show_discount="false"]
The checkout shortcode reference lists its other attributes.
Messages buyers see when a code is rejected
| Situation | Message |
|---|---|
| The code does not exist, is switched off, has not started yet, or belongs to an automatic discount | That is not a valid discount code. |
| The expiry date has passed | This discount code has expired. |
| The code has reached its maximum uses | This discount code has reached its usage limit. |
| The cart subtotal is below the minimum order total | Your order total is below the minimum required for this discount code. |
| None of the cart items are covered by the code | This discount code does not apply to the items in your cart. |
| A once-per-customer code was already used by this customer | You have already used this discount code. |
The four cases in the first row share one message, so trying a code never confirms that a switched-off or future code exists.
How the reduction is calculated
- A percent discount rounds half up to the nearest cent.
- A fixed discount never takes more than the subtotal it applies to. A $50 discount on a $30 order takes off $30.
- When a code covers only some products, only those items count toward the reduction, and only they get a share of it.
- When a discount covers several lines, TierMint splits it in proportion to each line's subtotal. The shares always add up to the exact total, with no cent lost or added in rounding.
- The server calculates every discount against the current cart prices. It never uses an amount sent by the browser.
How uses are counted
A discount's use count goes up when an order that used it completes. Abandoned and failed checkouts do not count.
The maximum uses limit is checked when the code is applied, before payment. If two buyers apply a code with one use left at almost the same moment, both orders can complete, and the use count ends one above the maximum. TierMint never refuses or rolls back a paid order over this count.
Automatic discounts
An automatic discount is a sale with no code to type. Any cart with items in the sale's scope gets the reduction at checkout, and the catalog shows the sale price.
- Click Add discount and turn on Automatic (no code).
- Enter a name. The Code field is hidden: TierMint makes an internal code from the name, such as SPRINGSALE for Spring sale. It shows in the Discounts list, but buyers cannot type it at checkout.
- Pick what the sale covers under Applies to.
- Set the amount and any limits or dates, the same way as for a code.
- Click Save discount.
Under Applies to, All products covers every product in every cart, and Chosen products covers only the products you pick. Chosen categories covers products filed directly under the categories you pick. A product in a subcategory is covered only when it is also filed under a chosen category.
The sale price in your catalog
When an automatic discount covers a product, the store grid, the product page, the pricing table and the buy button show the original price struck through, with the sale price next to it. Screen readers announce "Original price was X, discounted price is Y." The cart and checkout show the sale as its own discount line.

The struck price is the price of one unit bought on its own. A percent sale is always exact. A fixed sale, such as $10 off, is spread across the whole line when a buyer takes more than one unit or the product has a minimum quantity above one, so the price per unit at checkout can differ from the struck price. The checkout always shows the real total before payment.
A price note, such as the "incl. tax" note of the tax-inclusive pricing in TierMint Pro, shows once, beside the pair. With tax-inclusive pricing, both prices in the pair include tax.
To show only the sale price, turn off Show the original price struck through under TierMint → Settings → Discounts. Buyers pay the same either way.
When a code and an automatic discount meet
An order records one discount. When a buyer applies a code to a cart that a running sale also covers, the Codes and automatic discounts setting decides what happens:
| Option | Result |
|---|---|
| A discount code replaces automatic discounts (default) | The code wins and the sale does not apply to that order. The order records the code. |
| A discount code stacks with automatic discounts | The sale applies first, then the code applies to the reduced price. A 20% sale and a 10% code give 28% off, not 30%. The order records the code, and keeps the sale's part in the order meta for reports. |
Limits of automatic discounts
- One automatic sale applies per order. If two sales are running and a cart mixes items from both, only the sale with the larger reduction applies, and the other items pay full price. The catalog can still show a struck price for a product that such a mixed cart does not discount. When two sales would take off the same amount, the older one applies.
- In the default replace mode, a once-per-customer automatic discount is fully enforced. When codes stack, the sale's part is stored in the order meta, not as the order's discount, so a once-per-customer sale can apply again on a later stacked order. Stacking is off by default.
- A code sent in a TierMint Pro cart recovery email follows the same setting. By default it replaces a matching sale.
Discount settings
TierMint → Settings → Discounts has two options.
| Setting | Default | What it does |
|---|---|---|
| Codes and automatic discounts | A discount code replaces automatic discounts | Decides what happens when a cart has a code and a matching sale. See When a code and an automatic discount meet. |
| Show the original price struck through | On | Shows the original price struck through next to the sale price in the catalog. |
Manage discounts with the REST API
Every route is under the tiermint/v1 namespace and needs management authentication and the manage_tiermint capability. None of them are public. The licensing REST API page explains how management authentication works.
| Route | What it does |
|---|---|
GET /tiermint/v1/discounts |
Lists discounts, paginated, with the X-WP-Total and X-WP-TotalPages headers. Takes status (active or inactive), search (code or name), orderby (id, code or created_at) and order (asc or desc). |
POST /tiermint/v1/discounts |
Creates a discount. |
GET /tiermint/v1/discounts/{id} |
Returns one discount. |
PUT /tiermint/v1/discounts/{id} |
Updates a discount. Fields you leave out keep their value. |
DELETE /tiermint/v1/discounts/{id} |
Deletes a discount permanently. |
POST /tiermint/v1/discounts/batch |
Activates, deactivates or deletes up to 100 discounts. Send action (activate, deactivate or delete) and ids. |
Discount fields
| Field | Type | Required | Meaning |
|---|---|---|---|
code |
string | Yes, unless auto is true |
The code the buyer types. Matched without regard to case, so SAVE10 and save10 are the same code and you cannot create both. Surrounding spaces are trimmed. Up to 50 characters. |
name |
string | No | Labels the discount line in the cart and at checkout. Up to 200 characters. Without a name the line reads "Discount (CODE)" for a code, or "Automatic discount" for a sale. |
type |
percent or fixed |
No, defaults to percent |
How the reduction is calculated. |
amount_percent |
number | For a percent discount |
The percentage off, above 0 and at most 100. Stored to two decimal places. |
amount_fixed |
integer, in cents | For a fixed discount |
The amount off, in your store currency's smallest unit, above 0. |
auto |
boolean | No, defaults to false | True makes an automatic discount with no code to type. |
scope_type |
all, products or categories |
No | What an automatic discount covers. |
product_ids |
array of integers | For an automatic discount with a products scope |
The products the discount covers. On a code discount, leave it out or send an empty array for every product. An automatic discount keeps these ids only with a products scope. Each id must be a positive integer. |
category_ids |
array of integers | For a categories scope |
The category ids an automatic discount covers. |
min_total |
integer, in cents | No | The cart subtotal needed before the discount works, measured against the whole cart. Send 0 for no minimum. |
max_uses |
integer | No | Total redemptions across all customers. Send 0 for unlimited. |
use_count |
integer | Read-only | How many completed orders used the discount. You cannot set it. |
once_per_customer |
boolean | No, defaults to false | True lets each customer redeem the discount once. |
starts_at |
string, Y-m-d H:i:s in UTC |
No | When the discount starts. Send an empty string for no start date. |
expires_at |
string, Y-m-d H:i:s in UTC |
No | When the discount ends. Send an empty string for no end date. |
status |
active or inactive |
No, defaults to active |
The on and off switch. It works separately from the date window. |
A discount stores only the amount field that matches its type. A percent discount always has amount_fixed set to null, and a fixed discount always has amount_percent set to null, whatever you send for the other field.
Responses show a field with no value as null. In a request, product_ids, category_ids and amount_percent refuse null, so leave them out, or send an empty array for the two id lists. The empty values in the table (0, an empty string, an empty array) work as written. An empty product_ids array means every product, the same as leaving the field out. A starts_at later than expires_at is rejected.
Create a 10% code with a limit of 50 uses
Send POST /wp-json/tiermint/v1/discounts with this body:
{
"code": "SAVE10",
"type": "percent",
"amount_percent": 10,
"max_uses": 50
}
Create a $5 code for one product, once per customer
Send POST /wp-json/tiermint/v1/discounts with this body:
{
"code": "WELCOME5",
"type": "fixed",
"amount_fixed": 500,
"product_ids": [12],
"once_per_customer": true
}
Common questions
Can I reuse a code after deleting its discount?
Yes. A code only has to be unique among the discounts that exist, so after you delete a discount a new one can use its code.
Why is the use count one above the maximum?
Two buyers took the last use at almost the same moment, and both orders were paid. How uses are counted explains why TierMint keeps both orders. It happens only in that window around the last use, so a code never stays usable past its limit.
Does a product discount cover every pricing tier?
Yes. product_ids covers a product, not one of its tiers, so the discount applies whichever tier the buyer picks.
Is the minimum order total measured against the whole cart?
Yes. The minimum is compared with the whole cart subtotal, not only the items the code covers. So a code limited to a cheap product still works in a cart that reaches the minimum with other items.