Stockline documentation1.x
Stock messages

Placeholders and formatting

Put the quantity left or the product name into a message, and use bold text and links.

Placeholders

Type a placeholder anywhere in a message and Stockline replaces it on each product page.

Placeholder Becomes Example
{qty} The units left, for products that track their quantity Only {qty} left, order soon → Only 2 left, order soon
{product} The product's name {product} is made to order → Linen Apron is made to order

On a variable product, both refer to the variation the shopper picked: {qty} is that variation's own quantity, and {product} the variation's name, which WooCommerce usually builds from the product name and the chosen options (for example "Linen Apron - M").

{qty} is empty for products that don't track their quantity, so use it in the Low stock message, which is only shown for products that do. In the In stock message it would leave a gap on untracked products.

The settings preview fills placeholders with sample values: 12 units in stock, 2 for low stock, and "Linen Apron" as the product name.

Plugins that add their own stock states can add placeholders too, listed under that state on the settings screen. Preorderline adds {date}, the release date, for its Pre-order state. A product without a value gets an empty placeholder: a pre-order with no release date shows "Pre-order now: ships " for "Pre-order now: ships {date}", so word such a message to read well without it, or leave it empty to keep Preorderline's own text.

Messages can contain basic HTML, the same set WordPress allows in post content:

Back <strong>mid-June</strong>
Sold out, <a href="/contact">ask us about restocking</a>
Ships in 2–3 weeks. <a href="/shipping">Delivery times</a>

Anything WordPress doesn't allow in posts, such as scripts, is removed when you save.

Tip

A link in an out of stock message is a good way to keep a shopper who would otherwise leave: point it to a contact form, a waitlist or a similar product.

Stockline Pro's preview dialog has formatting buttons for bold text, links and both placeholders, so per-product messages can be written without typing HTML.