WordPress action hook · part of WordPress core
user_profile_update_errors
A WordPress core action that 4 plugins also fire themselves, running on 701K+ sites between them.
How to use user_profile_update_errors
It's an action: your callback runs at that point. Nothing needs to be returned.
Add this to your theme's functions.php or a small custom plugin:
add_action( 'user_profile_update_errors', function( $errors, $update, $user ) {
// Your code runs here.
}, 10, 3 );Argument names come from MainWP Child's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
This hook is fired by WordPress core too. Official reference on developer.wordpress.org →
4 plugins that fire user_profile_update_errors
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
MainWP Child700,000+ installs
do_action_ref_array( 'user_profile_update_errors', array( &$errors, $update, &$user ) )class/class-mainwp-child-users.php:467 -
Profile Extra Fields by BestWebSoft1,000+ installs
do_action_ref_array( 'user_profile_update_errors', array( &$errors, true, &$user ) )profile-extra-fields.php:3137 -
WP User Profiles200+ installs
do_action_ref_array( 'user_profile_update_errors', array( &$this->errors, true, &$user_data ) )wp-user-profiles/includes/sections/base.php:272 -
User Registration & Login60+ installs
do_action_ref_array( 'user_profile_update_errors', array( &$errors, false, &$user ) )includes/class-sav-user-create.php:104
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.