Action
rpress_before_order_history
On this page
Fires before the customer's order history list is output.
Runs in the order history template when the logged-in customer has at least one order, before the history container is printed. The orders loaded for the first page of the list are passed in.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$payments | array | Orders returned by rpress_get_users_orders() for the current user (up to 10, any status). |
Example#
add_action( 'rpress_before_order_history', 'my_before_order_history' );
function my_before_order_history( $payments ) {
printf( '<p>%s</p>', esc_html( sprintf( _n( '%d recent order', '%d recent orders', count( $payments ), 'my-textdomain' ), count( $payments ) ) ) );
}
Notes#
Not fired when the user is logged out or has no orders.
Source#
Fired from:
templates/history-purchases.php(line 22)
See also#
Was this page helpful?
