Change WordPress user roles and capabilities › Forums › How to or FAQ › Restrict special Woocommerce report (tabs) › Reply To: Restrict special Woocommerce report (tabs)
10/03/2019 at 01:54
#5563
Vladimir
Keymaster
Hi Dieter,
You can define admin by few different ways. Select the most suitable for you.
Insert selected code before the 1st unset(…);
if ( current_user_can( 'manage_woocommerce' ) ) {
// WooCommerce admin
return;
}
if ( is_super_admin() ) {
// WordPress super admin - real super admin for network, but just user with 'delete_users' capability for single site installation
return;
}
$lib = URE_Lib::get_instance();
if ( $lib->is_super_admin() ) {
// user with 'administrator' role for single site installation and real super admin for network
return;
}