This commit is contained in:
Javier Casares 2026-06-05 16:40:56 +00:00
commit 17078a91bd

View file

@ -62,6 +62,16 @@ class Frontend_Profile {
* @return void
*/
public function maybe_handle_frontend_save(): void {
// On wp-admin pages the profile form is already handled by the
// personal_options_update / edit_user_profile_update hooks that fire
// later in the admin bootstrap (when all admin includes are loaded).
// Running here too would call save_profile_settings() twice and
// trigger a fatal because add_settings_error() is not yet available
// at init time in admin context.
if ( is_admin() ) {
return;
}
if ( 'POST' !== $_SERVER['REQUEST_METHOD'] ) {
return;
}