I have a WooCommerce installed wordpress theme and I developed a custom plugin. The custom plugin stores the users information. If a user edit their account details from fronted then I want to reflect this change in my custom plugin. So here which hook is used to trigger this change? please provide your valuable answers.

  • I am also facing same issue. any best solution. Dec 14 '18 at 9:39

Try this below code

add_action( 'personal_options_update', 'save_user_profile_update' );
add_action( 'edit_user_profile_update', 'save_user_profile_update' );

function save_user_profile_update( $user_id ) {

    update_user_meta( $user_id, 'address', $_POST['address'] );
    update_user_meta( $user_id, 'city', $_POST['city'] );
    update_user_meta( $user_id, 'postalcode', $_POST['postalcode'] );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.