Skip to content

Message Token Reference

Dino Discounts lets you write shopper-facing copy with tokens — short [bracketed] placeholders the storefront swaps for live values at render time. A single string like [ccy][amount_discount] off when you spend [ccy][threshold_reached] renders as “£5 off when you spend £50” for one shopper and “€5 off when you spend €50” for another, with no per-currency re-save.

Each surface has its own token vocabulary — a token that works on one surface does not necessarily work on another, because each is substituted by its own engine code. On top of those, a set of rule-level tokens works the same on every per-discount surface. The checkout notice takes no tokens at all.

SurfaceWhere it showsEdited in
Cart labelThe discount line in the cart and at checkoutMessaging → Cart label
Spend-more nudge”Add more to save” prompts in the mini-cart, cart, and checkoutMessaging → Spend-more nudge
Product-page custom messageA custom line on the product page (Custom Message display mode)Messaging → Product page
Doesn’t-qualify messageThe notice when a shopper types this rule’s coupon code but the cart doesn’t qualifyMessaging → Doesn’t-qualify message
Message Settings wordingRemoved-reward row, coupon rejections, express-pay declineMessage Settings tab

The cart label is substituted by the engine (AbstractStrategy::replace_placeholders) at the moment the cart line renders. There are two value slots plus the currency token. Each slot has several interchangeable spellings — a generic name, and descriptive names chosen per discount type by the chip toolbar. The chip toolbar also appends the rule-level tokens the rule supports.

SlotSpellings (all interchangeable)Resolves to
Currency[ccy]The shopper’s checkout-currency symbol (£ / € / $)
Primary value[discount_value], [percentage_discount], [amount_discount]The rule’s primary number — percent value or fixed amount
Secondary value[second_value], [threshold_reached], [quantity_reached]The rule’s secondary number — the spend / item-count threshold crossed

The descriptive spellings ([percentage_discount], [threshold_reached], …) are pure aliases of the same two slots — they exist so the chip toolbar can name the value for what it actually represents. The engine treats every primary spelling identically and every secondary spelling identically; there is no data migration when a rule is saved with one spelling or another.

TokenRendersExample
[ccy]Checkout currency symbol[ccy]10 off → “£10 off”
[percentage_discount]The percent number (no %)[percentage_discount]% off → “15% off”
[amount_discount]The fixed-amount number (no symbol)[ccy][amount_discount] off → “£5 off”
[threshold_reached]The spend threshold crossed (money)spend [ccy][threshold_reached] → “spend £50”
[quantity_reached]The item-count threshold crossed[quantity_reached]+ items → “5+ items”
[discount_value]Generic primary value (used in the recipe seeds)[discount_value]% Discount → “15% Discount”
[second_value]Generic secondary value[discount_value]% off over [ccy][second_value] → “10% off over £50”

Which tokens the toolbar offers per discount type

Section titled “Which tokens the toolbar offers per discount type”

The chip toolbar offers only the tokens that resolve for the rule’s shape, so you never insert a placeholder that the engine will strip. (You can still hand-type any spelling, but a cross-type token resolves to this rule’s slot value, so prefer the chips.)

Discount typeTokens offered
% off cart (no threshold)[percentage_discount]
Fixed $ off cart (no threshold)[ccy], [amount_discount]
Spend & Save — % off at a spend threshold[ccy], [percentage_discount], [threshold_reached]
Spend & Save — fixed $ off at a spend threshold[ccy], [amount_discount], [threshold_reached]
Volume / bulk — % off at a quantity threshold[percentage_discount], [quantity_reached]
Volume / bulk — fixed $ off at a quantity threshold[ccy], [amount_discount], [quantity_reached]
Free shipping / free giftnone
Bundle (Buy X Get Y, Mix & Match) — money reward (bundle price / amount off)[ccy]
Bundle — non-money reward (%, free items, free gift, free shipping)none — the label needs no token

If you leave the cart label blank, Dino builds a default label from the reward (e.g. “10% Discount”, “Bundle deal”), falling back to “Discount” — never the internal coupon code. See Cart Labels for the editor walkthrough.

These tokens read the rule’s own settings rather than the cart, so they render the same on the cart label, the spend-more nudge, the product-page custom message and the doesn’t-qualify message. Each surface’s chip toolbar offers one only when the rule carries the setting it reads; a hand-typed one the rule can’t fill is stripped.

TokenRendersOffered when
[items]A short description of the items the rule matches — each item group’s label if you set one, otherwise its category, tag, attribute or SKU names (or “items” for any item). Up to four, comma-separatedThe rule is scoped to items
[start_date]The scheduled start date, in your site’s date format and timezoneThe rule has a scheduled start
[end_date]The scheduled end date, in your site’s date format and timezoneThe rule has a scheduled end
[end_time]The scheduled end time, in your site’s time formatThe rule has a scheduled end
[min_items]The minimum item count the rule requiresThe rule has an item-count threshold
[min_spend]The minimum spend the rule requires, formatted as moneyThe rule has a spend threshold

Example: Ends [end_date] at [end_time] → “Ends October 31, 2026 at 11:59 pm”.

The nudge is substituted by SpendMoreNudge::resolve_placeholders. It only fires on rules with a threshold the shopper can move toward — Spend & Save (tiered), volume (bulk), any discount gated by a Cart subtotal at least spend threshold, and a BOGO or bundle deal with a single set (BOGOF, Bundle), which counts down to a full set. A discount with no threshold has no gap to nudge toward, and a deal with two or more sets (Mix BOGOF, Meal deal) doesn’t nudge, so no nudge renders for either. See Which discounts can nudge. The chip toolbar also appends the rule-level tokens the rule supports.

TokenRendersExample
[amount_left]How much more is needed to reach the next tier. Formatted as money on a spend (cart_subtotal) rule, as an integer on a quantity ruleSpend [amount_left] more → “Spend £15.00 more”
[qty_left]Items still needed to reach the next tier, or to complete the set on a BOGO or bundle deal — always an integerAdd [qty_left] more → “Add 2 more”
[next_tier]The next threshold value the shopper is heading toward — the target spend (money) or item count, not a reward descriptionReach [next_tier] → “Reach £50.00”
[discount_label]The complete, kind-agnostic reward labelfor [discount_label] → “for 10% off” / “for Free Shipping”
[discount]The bare reward number — no % or currency unit, so you supply your ownfor [discount]% off → “for 10% off”
[discount_value]Synonym of [discount] — same bare number, descriptive spelling[discount_value]% off → “10% off”

Defaults (the exact copy rendered when an input is left blank):

  • Mini-cart: Spend [amount_left] more for [discount_label]
  • Cart & checkout: You're [amount_left] away from [discount_label]. Add a few more items to your cart.

See Upsell Messages for the editor.

When the Product page block’s display mode is Custom Message, the message is substituted by StorefrontDisplay::replace_placeholders. The block’s chip toolbar offers the same descriptive vocabulary as the cart label, named per discount type, plus [price] and the supported rule-level tokens. Tokens are case-insensitive — [price] and [PRICE] resolve identically.

TokenRendersExample
[buy_quantity]Bundle size — the total units one bundle needs (Buy X Get Y, Mix & Match)Buy [buy_quantity] to save → “Buy 3 to save”
[percentage_discount] / [amount_discount]The first tier’s reward value (Volume / Tiered)Save [percentage_discount]% → “Save 15%“
[price]This product’s price, formatted in the store’s currencyJust [price] each → “Just £20.00 each”

What the primary value token resolves to depends on the discount type (the chip toolbar offers the spelling that matches — [buy_quantity] for a bundle size, [percentage_discount] / [amount_discount] for a reward value):

Discount typePrimary value resolves to
Bundle (Buy X Get Y, Mix & Match)The total units one bundle needs (sum of the item groups’ quantities, via [buy_quantity])
Volume / bulk, Tiered / Spend & SaveThe first tier’s reward value ([percentage_discount] / [amount_discount])

The product page has no secondary value: [threshold_reached], [quantity_reached] and [ccy] are not offered and render blank if typed.

See Product Page Pricing for the display-mode and position controls.

The Doesn’t-qualify message (shown when a shopper types this rule’s coupon code but the cart doesn’t qualify) takes only the rule-level tokens — e.g. Spend [min_spend] or more to use this code → “Spend £50.00 or more to use this code”. Leave it blank to use the store-wide default set on the Message Settings tab.

A few store-wide messages on the Message Settings tab take one token each:

TokenWhereRenders
[label]Removed-reward wording (Removal & restore)The removed discount’s cart label — default [label] - removed
[name]Express-pay decline (Apple Pay / Google Pay)The declined discount’s name
[code]The Coupon rejection messages (type it — there’s no chip)The code the shopper typed, in capitals

Every money token ([ccy], [amount_discount], [threshold_reached], [amount_left], [next_tier], [min_spend], [price]) resolves against the shopper’s checkout currency, not the store’s base currency — so one rule’s copy reads correctly in every currency without a separate rule per region.

Tokens are locale-neutral: they substitute the same way regardless of the language you type the surrounding copy in. For multilingual stores, model each language as a separate rule scoped with Zone targeting — see Cart Labels → Multilingual stores for the pattern.

WooCommerce is a trademark of Automattic, Inc. WordPress is a trademark of the WordPress Foundation. Dino Discounts is not affiliated with or endorsed by Automattic or the WordPress Foundation.

Contact · Report a bug