Action
rpress_customer_recent_purchases_actions
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#
| Parameter | Type | Description |
|---|---|---|
$customer | RPRESS_Customer | The customer being viewed. |
$payment | RPRESS_Payment | The 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), inrpress_customer_admin_render_order_table()
Was this page helpful?
