Skip to content
Docs
Get RestroPress

Action

rpress_customer_recent_purchases_actions

Updated
On this page

Fires after the View Details link in each row of a customer's recent orders table.

Runs inside the action cell of every row in the recent orders table on the customer profile. Print extra links or buttons for the order. The payment object is the order, so its ID can be used to build links.

Parameters#

ParameterTypeDescription
$customerRPRESS_CustomerThe customer being viewed.
$paymentRPRESS_PaymentThe order shown in the current row.

Example#

function my_recent_order_action( $customer, $payment ) {
	printf(
		' | <a href="%s">%s</a>',
		esc_url( add_query_arg( 'my_reorder', $payment->ID ) ),
		esc_html__( 'Reorder', 'my-plugin' )
	);
}
add_action( 'rpress_customer_recent_purchases_actions', 'my_recent_order_action', 10, 2 );

Source#

Fired from:

  • includes/admin/customers/customers.php (line 304), in rpress_customer_admin_render_order_table()
Was this page helpful?