[memb_keap_list_orders]
Description
Lists the current member's Keap orders as a read-only purchase history. Paste the shortcode bare and you get a designed table: order ID, title, date, status, total, amount paid, balance due, and invoice ID.
The list is display-only: no buttons, no forms, nothing for the member to submit. Money columns render with Keap's own currency formatting, and order dates convert from Keap's UTC timestamps to your site's time zone. Orders are cached per contact for five minutes, and a card-update backcharge clears the cache so settled balances show right away.
status buckets the list without rewriting Keap's own status words:
paid shows orders Keap marks Paid, and unpaid shows everything
else.
When the list comes back empty, empty_text shows in its place. If
Keap cannot be reached, the shortcode renders nothing rather than
telling the member they have no orders. Any content placed between the
opening and closing tags is ignored.
Design controls match
[memb_keap_list_subscriptions]:
the same layout and fields attributes, the same --torii-list-*
CSS tokens, and theme templates on the same contract with
template="name".
Pair with [memb_keap_add_creditcard] to let members replace a failing card and settle an unpaid balance themselves.
Shortcode Examples
The default table:
[memb_keap_list_orders]
Everything the member still owes:
[memb_keap_list_orders status="unpaid"]
Cards instead of a table:
[memb_keap_list_orders layout="cards"]
Choose the columns and their order:
[memb_keap_list_orders fields="title,creation_date,status,total_due"]
Oldest first:
[memb_keap_list_orders order_by="creation_time" sort="asc"]
Shortcode Parameters
date_format
PHP date format applied to every date field. Default: M j, Y.
debug
Prepend a count of orders before and after filtering, plus a list of
any ignored fields keys with the valid alternatives. Super admins
only. Default: no.
empty_text
Message shown in place of the list when the member has no orders
after filtering. Default: You have no orders..
fields
Comma-separated field keys that choose which columns appear and in
what order. Unknown keys are dropped, and an att where every key is
unknown falls back to the default set. See Fields below for the keys
and their types. Default:
id,title,creation_date,status,total,total_paid,total_due,invoice_id.
layout
table, cards, rows, or plain. plain enqueues no CSS, so a
page builder container or your own stylesheet dresses the bare
structure. Default: table.
order_by
Field to sort on: id, title, status, creation_time, or
invoice_id. Unrecognized values fall back to creation_time.
Default: creation_time.
sort
Sort direction: asc or desc. Default: desc (newest first).
status
paid, unpaid, or all. Unrecognized values behave as all.
Default: all.
template
Render through a named template instead of the built-in skeleton. See
Customizing with Templates below. Default: ''.
Fields
The registry works the same way as the subscription list: the type decides how a value renders.
| Field | Type | Shows |
|---|---|---|
id |
text | Keap order ID |
title |
text | Order title |
creation_date |
date | Date the order was created, in your site's time zone |
status |
enum | Keap order status: Draft, Sent, Viewed, or Paid |
total |
money | Order total, formatted by Keap with its currency |
total_paid |
money | Amount paid so far |
total_due |
money | Balance due |
invoice_id |
text | Keap invoice ID |
items |
text | One line per item, e.g. 2 × Widget |
order_date |
date | Date the order was placed, in your site's time zone |
promo_code |
text | Promo code applied to the order |
refund_status |
text | Refund status, when Keap reports one |
Date fields follow date_format. Unlike subscription dates, which are
Keap calendar dates, order dates are true timestamps and convert from
UTC to your site's time zone before formatting.
Customizing with CSS
The list shares the subscription list's stylesheet, tokens, and markup
contract. The wrapper carries torii-list--keap-orders instead of
torii-list--keap-subscriptions, and rows carry data-order-id and
data-status. Re-theme it with the same --torii-list-* custom
properties, documented at
[memb_keap_list_subscriptions].
Customizing with Templates
Set template="my-orders" and Torii looks for
torii/shortcodes/keap/orders/my-orders.php in your theme (child
theme first), falling back to the shared skeletons in the plugin's
templates/shortcodes/list/ directory. Templates receive the same
$atts, $content, $code, and $data contract as the subscription
list, documented at
[memb_keap_list_subscriptions].
The general workflow is documented in Shortcode
Templates.
Shortcode Attributes
| Attribute | Value |
|---|---|
| Conditional | No |
| Nestable | No |
| Accepts formatting | No |