Skip to content
Docs
Get RestroPress

Action

rpress_reports_tab_{$active_tab}

Updated
On this page

Fires to render the content of the active tab on the reports screen.

Runs on the reports screen after rpress_reports_page_top. The dynamic part is the active tab ID, such as overview, sales, orders-risk, menu, customers, payments-recovery, taxes or export. The built-in tabs print their content by hooking here; a custom tab registered with rpress_reports_intelligence_tabs does the same.

Example#

function my_render_loyalty_tab() {
	echo '<section class="rp-card"><h2>' . esc_html__( 'Loyalty', 'my-plugin' ) . '</h2></section>';
}
add_action( 'rpress_reports_tab_loyalty', 'my_render_loyalty_tab' );

Source#

Fired from:

  • includes/admin/reporting/reports.php (line 87), in rpress_reports_page()

See also#

Was this page helpful?