Answer the question
In order to leave comments, you need to log in
How to perform an action when user's meta data is updated?
A strange question for sure.
The user has meta data.
Multiple fields.
You need to make sure that when you update a certain field, for example this.
c2n.me/3s6jmY7
Perform some action.
Well, in general, even a script of a couple of lines. How would it be implemented?
Answer the question
In order to leave comments, you need to log in
add_action( 'personal_options_update', 'my_save_extra_profile_fields' );
add_action( 'edit_user_profile_update', 'my_save_extra_profile_fields' );
function my_save_extra_profile_fields( $user_id ) {
if ( !current_user_can( 'edit_user', $user_id ) )
return false;
//здесь ваши действия
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question