capabilities ) > \WPML_WP_Roles::get_user_max_level( $user ) ) { $wp_role = current( \WPML_WP_Roles::get_roles_up_to_user_level( $user ) ); if ( ! $wp_role ) { return null; } $roleName = $wp_role->name; } return $roleName; } }