Skip to content
Docs
Get RestroPress

Action

rpress_reports_view_{$current_view}

Updated
On this page

Fires to render the selected view in the legacy reports tab.

Runs from the legacy reports tab handler with the selected view ID in the hook name. The built-in views are earnings, categories, addons, fooditems, gateways and taxes; a view added with rpress_report_views is rendered by hooking here.

Example#

function my_render_loyalty_view() {
	echo '<div class="rp-card"><p>' . esc_html__( 'Loyalty report', 'my-plugin' ) . '</p></div>';
}
add_action( 'rpress_reports_view_loyalty', 'my_render_loyalty_view' );

Notes#

Only reached through the legacy reports tab handler, which needs a tab named reports to be active.

Source#

Fired from:

  • includes/admin/reporting/reports.php (line 237), in rpress_reports_tab_reports()

See also#

Was this page helpful?