profile_update WordPress Action Hook
Profile update is a WordPress hook that is fired when a user updates their profile. It is one of the most important hooks in WordPress because it allows plugins and themes to update their data when a user updates their profile. This hook is also used by the WordPress core to update the user's meta data.
do_action( 'profile_update', int $user_id , WP_User $old_user_data , array $userdata ) #
Fires immediately after an existing user is updated.
Parameters
- $user_id
(int)User ID.
- $old_user_data
(WP_User)Object containing user's data prior to update.
- $userdata
(array)The raw array of data passed to wp_insert_user().
Source
File: wp-includes/user.php
Changelog
Version | Description |
---|---|
5.8.0 | The $userdata parameter was added. |
2.0.0 | Introduced. |