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:
error_log(“Pre Value is: “.$prevalue);
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 ?
I found an entry int the wp_options-Table:`
option_id;option_name;option_value;autoload 176;user__dev_text;1540731036;no 177;_user__dev_text;field_5bd57f0208199;no
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?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2022 Advanced Custom Fields.