---
title: Shortcodes and Message Placeholders Reference
description: Reference for the shortcodes and message placeholders in Order Minimum/Maximum Amount Limits for WooCommerce, free and Pro.
url: "https://wpfactory.com/docs/understanding-placeholders/"
updated: "2026-09-27"
category: Shortcodes
tags:
  - Order Minimum/Maximum Amount for WooCommerce
---

# Shortcodes and Message Placeholders Reference

The shortcodes in [Order Minimum/Maximum Amount Limits for WooCommerce](https://wpfactory.com/item/order-minimum-maximum-amount-for-woocommerce/) let you show conditional messages, translate them, and feed dynamic values into your limits. This reference lists every shortcode that Order Min/Max Amount actually registers, with its real attributes, plus the placeholders you can use inside message fields.

### [alg_wc_oma_translate] (Free)

Shows or hides a block of text based on the active WPML or Polylang language. Use it to translate any message. It works in two forms.

Content form, one shortcode per language:

```
[alg_wc_oma_translate lang="DE"]Text for DE[/alg_wc_oma_translate]
[alg_wc_oma_translate lang="NL"]Text for NL[/alg_wc_oma_translate]
[alg_wc_oma_translate not_lang="DE,NL"]Text for other languages[/alg_wc_oma_translate]
```

Attribute form, one shortcode for all languages:

```
[alg_wc_oma_translate lang="DE" lang_text="Text for DE" not_lang_text="Text for other languages"]
```

- `lang` - comma-separated language codes the text applies to.
- `not_lang` - comma-separated language codes the text should be hidden for.
- `lang_text` / `not_lang_text` - used only in the attribute form above.

### [alg_wc_oma_amount_msg] (Pro)

Prints its own content only when a chosen limit is *not* met, with placeholders replaced. Handy for a custom message anywhere on a page. The older tag `[alg_wc_order_min_max_amount]` is a deprecated alias that still works.

```
[alg_wc_oma_amount_msg min_or_max="max" type="qty"]You can order at most %amount% items (you have %total%).[/alg_wc_oma_amount_msg]
```

| Attribute | Default | Description |
| --- | --- | --- |
| `min_or_max` | `min` | Which limit to check: `min` or `max`. |
| `type` | `sum` | Amount type, for example `sum`, `qty`, `weight`. |
| `scope` | `false` | Optional: `product`, `product_cat`, or `product_tag` for a per-scope limit. |
| `product_id` | current | Product to check when `scope` is set. Defaults to the current product. |
| `on_empty` | empty | Text shown when the limit *is* met (nothing to warn about). |

The message itself is the text **between** the opening and closing tags, not a `msg` attribute.

### [alg_wc_oma_amount] (Pro)

Returns a numeric value you can drop into an amount field so a limit changes by customer type or purchase history. Enable it first in the **Amounts** sub-tab: tick both **Shortcodes** (`alg_wc_oma_amounts_shortcodes_allowed`) and **[alg_wc_oma_amount]** (`alg_wc_oma_amounts_alg_wc_oma_amount_enabled`).

```
[alg_wc_oma_amount customer_type="non-paying" value="100"]
```

- `value` - the number to return when the condition matches.
- `customer_type` - `any-paying-case` (default), `paying`, or `non-paying`.
- `user_bought_term_id` - comma-separated category or tag IDs the customer must have bought from.
- `check_parent_bought_term_id` - `true` to also match parent terms.

You can place several `[alg_wc_oma_amount]` shortcodes in one amount field: the first one that returns a non-empty result is used.

### Message placeholders

Inside any message field (in the **Messages** sub-tab) or an `[alg_wc_oma_amount_msg]` block, these placeholders are replaced at display time:

| Placeholder | Shows |
| --- | --- |
| `%amount%` | The required limit, formatted (for example a price or "5 pcs"). |
| `%total%` | The customer's current value, formatted. |
| `%diff%` | The difference between the two, formatted. |
| `%amount_raw%`, `%total_raw%`, `%diff_raw%` | The same three values as plain numbers, without formatting. |
| `%fee_amount%` | The fee charged for the limit. Available only when the Pro **Fees** section is on. |
| `%product_title%` | In "Per product" messages, the product name. |
| `%term_title%`, `%term_link%`, `%term_title_with_link%` | In "Per product category" and "Per product tag" messages. |
| `%shipping_method%`, `%shipping_zone%`, `%shipping_zone_locations%` | In Shipping messages (Pro). |
| `%payment_gateway%` | In Payment Gateway messages (Pro). |

### Ready to set this up?

The translation shortcode and message placeholders are free. The `[alg_wc_oma_amount]` and `[alg_wc_oma_amount_msg]` shortcodes are part of [Order Min/Max Amount](https://wpfactory.com/item/order-minimum-maximum-amount-for-woocommerce/) Pro. [Get Order Min/Max Amount Pro](https://wpfactory.com/item/order-minimum-maximum-amount-for-woocommerce/).

Related articles

- [Order Min/Max Amount: Developer Hooks, Filters and Shortcodes Reference](https://wpfactory.com/docs/order-min-max-developer-hooks-filters/)
- [Amount Types Reference](https://wpfactory.com/docs/order-min-max-amount-types-reference/)
- [Setting Up Min/Max Order Messages and Their Placement](https://wpfactory.com/docs/order-messages-placement/)

 

[![Order Minimum/Maximum Limits for WooCommerce](https://wpfactory.com/wp-content/uploads/Order-Minimum-Maximum-Amount-for-WooCommerce.webp)](https://wpfactory.com/item/order-minimum-maximum-amount-for-woocommerce/)
