Hi
revoke capability “view_woocommerce_reports” for this role.
OR use https://wordpress.org/plugins/adminimize/
thanks, Alex
Cool, thx for the fast answer!
I tried adminimize and deactivated “(Slug: wc-order-export)[__3]” for the new role + all others than administrator. I still see the export order menue item. It worked with some other menue items.
Do you have any ideas what I do wrong?
I don’t know know.
probably, there is another plugin which modifies wp-admin menu too.
I suggest to install https://wordpress.org/plugins/user-role-editor/
and revoke capability “view_woocommerce_reports” for this role.
hm 🙁 unfortunately the new role needs to see the standard woocommerce reports… any chance for another idea?
many thanks in advance!
hello
please, adapt this code.
thanks, Alex
add_filter( 'woe_current_user_can_export', function($can){
$user = wp_get_current_user();
if( in_array( 'administrator', (array) $user->roles ))
return false;
else
return true;
});