Change WordPress user roles and capabilities › Forums › Bug Reports › Update 4.48 – User role only customer on Multisites › Reply To: Update 4.48 – User role only customer on Multisites
14/10/2018 at 03:23
#5201
Vladimir
Keymaster
This code switches off WooCommerce 3.4.6 roles changing code for WordPress multisite superadmin:
add_action( 'admin_init', 'fix_for_wc_436');
function fix_for_wc_436() {
if ( ! is_multisite() or ! is_super_admin() ) {
return;
}
remove_filter( 'editable_roles', 'wc_modify_editable_roles' );
remove_filter( 'map_meta_cap', 'wc_modify_map_meta_cap', 10 );
}