Action
rpress_after_customer_details_header
On this page
Fires in the header action area of the customer detail screen.
Runs inside the page actions container next to the Customer Details title for every customer view. Use it to print extra header buttons or links for the customer being viewed.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$customer | RPRESS_Customer | The customer being viewed. |
Example#
function my_customer_header_link( $customer ) {
if ( $customer->user_id > 0 ) {
printf(
'<a class="button" href="%s">%s</a>',
esc_url( get_edit_user_link( $customer->user_id ) ),
esc_html__( 'Edit WordPress user', 'my-plugin' )
);
}
}
add_action( 'rpress_after_customer_details_header', 'my_customer_header_link', 10, 1 );
Notes#
Fires even if the customer ID was invalid, in which case the customer object is empty.
Source#
Fired from:
includes/admin/customers/customers.php(line 128), inrpress_render_customer_view()
Was this page helpful?
