Filter
rpress_customer_tabs
On this page
Filters the tab definitions for the customer detail screen.
Returns the tab array from rpress_customer_tabs(). Each entry is keyed by a view slug and holds dashicon and title. The defaults (Profile, Orders, Notes, Tools) are added at priority 1 and a Delete tab at the maximum priority so it stays last.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$tabs | array | Tab definitions keyed by view slug, each an array with 'dashicon' and 'title'. |
Return value#
array. The tab definitions.
Example#
function my_customer_tabs( $tabs ) {
$tabs['loyalty'] = array(
'dashicon' => 'dashicons-star-filled',
'title' => esc_html__( 'Loyalty', 'my-plugin' ),
);
return $tabs;
}
add_filter( 'rpress_customer_tabs', 'my_customer_tabs' );
Notes#
The current customer screen does not call rpress_customer_tabs(), so tabs registered here are not rendered by core. Register the view with rpress_customer_views as well.
Source#
Applied in:
includes/admin/customers/customers.php(line 59), inrpress_customer_tabs()
See also#
Was this page helpful?
