I am working modifying an ecommerce plugin, and it makes uses of wp_update_user() function, and everytime the function runs another table (created by the plugin), gets updated too. The problem is that the updated data on that second table is incorrect, and I am having troubles finding the part of the code that does it.
So I was wondering, does the wp_update_user( ) function triggers some “action” so I can search for that in all the files? like those used in for example:
add_action('wp_logout', 'logout_handler');
wp_update_user()
is in/wp-includes/user.php
lines 1401-1439. It useswp_insert_user()
(same file, lines 1254-1380) to update the existing user or add a new one if the user doesn’t exist. That function is where the various filters and actions affecting user account info live, and shows everything you can do to the$user
object.If the user is updated this action is called, with these parameters:
'profile_update', $user_id, $old_user_data );
Here is the relevant code from
user.php
inwp_insert_user()