Priority for custom reports tab
-
I’m working on a more reliable and sensible reports page (for one thing, the default reports page is showing the real world net sales, as gross sales?), and I have it on a new custom tab, in the reports page.
However, since the default reports page (and every single “advanced” reports plugin I’ve looked at) is completely useless (unless you want to watch cool graph and pretty colors), I’d like to be able to put my new shiny custom reports tab first!
Is there anyone here who can help me figure this out, or maybe knows exactly what to add?
This is still all in development:
function add_reports_tab( $reports ) {
$reports[‘new’] = array(
‘title’ => ‘NEW’,
‘type’ => ‘default’,
‘reports’ => array(
“something1″ => array(
‘title’ => ‘something1’,
‘description’ => ”,
‘hide_title’ => true,
‘callback’ => ‘super_callback_function’
),
“something2″ => array(
‘title’ => ‘something2’,
‘description’ => ”,
‘hide_title’ => true,
‘callback’ => ‘another_great_custom_report’
),
)
);
return $reports;
}add_filter( ‘woocommerce_admin_reports’, ‘add_reports_tab’, 10, 1 );I’ve tried changing the priority to 1, 1. But to no avail. 0, 0 just breaks all other tabs.
The topic ‘Priority for custom reports tab’ is closed to new replies.