[memb_keap_order_info]

Description

Pulls a single value out of a single order. Drop it into a sentence, a heading, or a summary line beside [memb_keap_show_receipt] when the full receipt is more than the spot calls for.

Which order comes from the order_id attribute or, when that is unset, the ?order_id= query parameter, the same resolution the receipt shortcode uses.

Valid field values: invoicetotal, totaldue, totalpaid, title, status, invoice_id, invoice_number, order_date, promo_code, and refund_status.

Money fields come back as plain numbers in major units, 29.5 rather than $29.50, matching the classic Memberium behavior. Pair the output with txtfmt or your own formatting when the spot needs a currency symbol.

order_date follows date_format and converts from UTC to your site's time zone, the same conversion the order lists use.

The shortcode reads the same five-minute per-contact cache as the order and invoice lists. Set refresh="yes" to drop the cache before reading when you need the value hot, such as right after a payment.

A missing order, an unknown field, or a Keap outage renders nothing: there is no default text to mistake for data.

Shortcode Examples

The balance due, read from the URL's order:

Your balance due is [memb_keap_order_info field="totaldue"].

A named order's status:

[memb_keap_order_info field="status" order_id="12345"]

The order date in long form:

Ordered [memb_keap_order_info field="order_date" date_format="F j, Y"]

Shortcode Parameters

capture

Capture the output into a named variable instead of printing it. Default: ''.

date_format

PHP date format applied to order_date. Default: M j, Y.

debug

Show an operator-facing notice listing the valid fields when field is unknown. Super admins only. Default: no.

field

The order field to display: invoicetotal, totaldue, totalpaid, title, status, invoice_id, invoice_number, order_date, promo_code, or refund_status. Default: invoicetotal.

order_id

Keap order ID to read. 0 falls back to the ?order_id= query parameter. Default: 0.

refresh

Drop the per-contact order cache before reading, forcing a fresh fetch from Keap. Default: no.

txtfmt

Text format applied to the output, e.g. upper, lower. Default: ''.

Shortcode Attributes

Attribute Value
Conditional No
Nestable No
Accepts formatting Yes