Change WordPress user roles and capabilities Forums How to or FAQ Restrict special Woocommerce report (tabs) Reply To: Restrict special Woocommerce report (tabs)

#5562
[email protected]
Participant

Hi Vladimir,
thank you for feedback and support!

For first quick solution we have made this …

add_filter( ‘woocommerce_admin_reports’, ‘custom_reports’ );
function custom_reports( $reports ) {
// unset the elements of $reports that you don’t want
unset($reports[‘customers’]);
unset($reports[‘stock’]);
unset($reports[‘orders’]);
unset($reports[‘taxes’]);
return $reports;
}

In second step we must see how we can make report access for admins.

Thanks & Regards
Dieter