The profile_update hook in WordPress is designed to have 3 parameters, as documented on the WordPress codex. Other functions and plugins rely on this structure:
do_action( ‘profile_update’, $user_id, $old_user_data, $userdata );
However, it appears that the Metabox user profile form is calling this action but only passing 2 parameters. To ensure compatibility and proper functionality with other plugins, it is necessary to update the Metabox function to pass all 3 parameters as specified in the WordPress documentation.
By updating the function to include the missing third parameter ($userdata), you align with the expected behavior defined by WordPress and ensure compatibility with other plugins that rely on the profile_update action.