Skip to content
Docs
Get RestroPress

Action

rpress_customer_before_stats

Updated
On this page

Fires on the customer detail view between the profile card and the metrics row.

Runs after the profile card has been printed and before the lifetime orders, spend, average order and last order metrics. Use it to add content between those two blocks.

Parameters#

ParameterTypeDescription
$customerRPRESS_CustomerThe customer being viewed.

Example#

function my_customer_before_stats( $customer ) {
	echo '<p class="description">' . esc_html( sprintf( 'Customer since %s', $customer->date_created ) ) . '</p>';
}
add_action( 'rpress_customer_before_stats', 'my_customer_before_stats', 10, 1 );

Source#

Fired from:

  • includes/admin/customers/customers.php (line 558), in rpress_customers_view()

See also#

Was this page helpful?