function hide_admin_notices_except_specific_admin()
{
//Checking if user is on an admin page
if (is_admin()) {
//Getting the current user object
$current_user = wp_get_current_user();
//Checking if the current user has the 'administrator' role and their username is not 'specific_username'
if (
in_array("administrator", $current_user->roles) &&
$current_user->user_login !== "INSERT_USERNAME"
) {
//Removing all actions of 'admin_notices'
remove_all_actions("admin_notices");
}
}
}
//Calling the function on 'admin_init' action
add_action("admin_init", "hide_admin_notices_except_specific_admin");