Skip to content
Docs
Get RestroPress

Action

rpress_reports_graph_additional_stats

Updated
On this page

Fires inside the stats area of the earnings graph and the category reports.

Runs after the summary stat cards of the earnings graph and, in the Earnings by Category and Earnings by Add-on report views, after the pie charts. Use it to add extra stat blocks. Output is echoed directly.

Example#

function my_additional_stats() {
	echo '<p class="rpress_graph_totals">' . esc_html__( 'Custom stat goes here', 'my-plugin' ) . '</p>';
}
add_action( 'rpress_reports_graph_additional_stats', 'my_additional_stats' );

Notes#

Fired from three places: the earnings graph function and the category and add-on report views, all without arguments.

Source#

Fired from:

  • includes/admin/reporting/graphing.php (line 340), in rpress_reports_graph()
  • includes/admin/reporting/reports.php (line 384), in rpress_reports_categories()
  • includes/admin/reporting/reports.php (line 433), in rpress_reports_addons()
Was this page helpful?