Home Forums Backend Issues (wp-admin) update_field Method does not update Field on User Edit Page Reply To: update_field Method does not update Field on User Edit Page

  • Looks like I’ve got this solved.

    – I added a priority (100) to my action
    – It seems like there is some caching active? I deleted the value in the database manually and then it wouldn’t update the value in the database.
    I guess ACF is comparing the target value with a cached existing value and if it’s equal, the db won’t be updated? Can you please confirm this and add a hint in the documentation?

    I tested it, storing a current timestamp in the custom field and now it gets updated properly


    This is not solved, the value does not get updated in the database:

    `$prevalue= get_field(‘field_5bd57f0208199’,”user_”.$current_user->ID);
    error_log(“Pre Value is: “.$prevalue);
    $postvalue= get_field(‘field_5bd57f0208199’,”user_”.$current_user->ID);
    error_log(“user profile updated. Value is: “.$postvalue);`

    This is the output if you execute the Profile update 2 times:

    [28-Oct-2018 12:50:02 UTC] Pre Value is: 1540730664
    [28-Oct-2018 12:50:02 UTC] user profile updated. Value is: 1540731002
    [28-Oct-2018 12:50:36 UTC] Pre Value is: 1540731002
    [28-Oct-2018 12:50:36 UTC] user profile updated. Value is: 1540731036

    But I can’t find the values in the wp_usermeta-Table ?

    EDIT 2:
    I found an entry int the wp_options-Table:`


    Can you explain
    – Why is the value is not stored in the wp_usermeta-Table ?
    – Where is the reference between this entry and the current user?