Action
rpress_customer_card_top
On this page
Fires at the top of the customer detail view, before the profile card.
Runs at the start of the customer detail view, before the profile card and the metrics row. Use it to print content that should appear above everything else on a customer's overview.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$customer | RPRESS_Customer | The customer being viewed. |
Example#
function my_customer_card_top( $customer ) {
if ( $customer->purchase_count > 20 ) {
echo '<div class="notice notice-success inline"><p>' . esc_html__( 'Frequent customer.', 'my-plugin' ) . '</p></div>';
}
}
add_action( 'rpress_customer_card_top', 'my_customer_card_top', 10, 1 );
Source#
Fired from:
includes/admin/customers/customers.php(line 554), inrpress_customers_view()
See also#
Was this page helpful?
