alesflex
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
Forum: Plugins
In reply to: [User Switching] capabilities edit_users vs edit_userit’s because the action=switch_to_user not charge backend.php
Forum: Plugins
In reply to: [User Switching] capabilities edit_users vs edit_useri found the problem
woocomerce add cap do_not_allow to the role
if ( property_exists( $userdata, 'roles' ) && ! empty( $userdata->roles ) && ! array_intersect( $userdata->roles, $shop_manager_editable_roles ) ) {
$caps[] = 'do_not_allow';
}Because in backend.php i add restaurant to editable role
/* Lets Shop Managers edit users with these user roles */
function wws_allow_shop_manager_role_edit_capabilities( $roles ) {
$roles[] = 'restaurant'; // insert the wholesale role here, copy+paste this line for additional user roles
return $roles;
}
add_filter( 'woocommerce_shop_manager_editable_roles', 'wws_allow_shop_manager_role_edit_capabilities' );if i add it in function.php the role it’s editable and switchable
- This reply was modified 1 year, 2 months ago by alesflex.
BBQ protects your site against many threats:
Excessively long requestsI suppose that it’s the problem
Fixed desactived BBQ Firewall.
Viewing 4 replies - 1 through 4 (of 4 total)