View Categories

Order Status History Placeholders Reference

When you display order status history on the customer My Account > Orders page, Scheduled & Automatic Order Status Controller for WooCommerce builds the output from three templates: Before, Each record and After. This reference lists the placeholders each template accepts. All of this is available in the free version.

The templates live in the My Account section at WPFactory > Order Status Rules (also reachable at WooCommerce > Settings > Order Status Rules).

Templates and their placeholders #

Template Option ID Placeholders Default
Before alg_wc_osr_my_account_orders_status_history_templates[before] %current_status% %current_status%
Each record alg_wc_osr_my_account_orders_status_history_templates[each_record] %record_nr%, %record_date%, %record_time%, %status_from%, %status_to% <br>%status_from% &rarr; %status_to%
After alg_wc_osr_my_account_orders_status_history_templates[after] %current_status% (empty)

What each placeholder outputs #

Placeholder Outputs
%current_status% The order’s current status name
%record_nr% The record number within the history
%record_date% The date of the status change
%record_time% The time of the status change
%status_from% The status the order changed from
%status_to% The status the order changed to

Note: the Before and After templates only support %current_status%. The per-change placeholders (%record_nr% and the rest) only work inside the Each record template, which is repeated once per history entry. &rarr; in the default is the HTML entity for a right arrow.

Example #

An “Each record” template of <li>%record_date%: %status_from% &rarr; %status_to%</li> renders one list item per status change, showing the date and the transition.

To enable and position this history, see the guide on showing order status history on the My Account page. For the underlying data, the history is stored in the order meta key _alg_wc_order_status_change_history.

Get more from your automations #

The My Account history is free. To drive it with more than one rule, Order Status Rules Pro removes the single-rule limit. See what Pro unlocks.