roles, true)) { return 'admin'; } if (in_array('wpamelia-manager', $wpUser->roles, true)) { return 'manager'; } if (in_array('wpamelia-provider', $wpUser->roles, true)) { return 'provider'; } if (in_array('wpamelia-customer', $wpUser->roles, true)) { return 'customer'; } return null; } }