I’m running into a very odd issue. When editing an entry using Gravity View the values entered for three fields is getting erased when the entry is saved. Two fields always getting erased. A third field only gets erased if a selection is made for one of the other two fields. Now where this gets really strange is that the erasure happens when I run the WordPress code
wp_update_user( $userData );
This happens even if all I send as the $userData array is the user ID, meaning no change is made to the actual user data. A log of the data in the entry just before I run wp_update_user shows the correct data in the fields in question and another log just after running wp_update_user shows that the data in the fields in question has been erased. And to further deepen the mystery, the fields that are getting erased are not fields that relate to any of the core user data in WordPress. So why is running the function wp_update_user affecting the data for a Gravity Forms form entry?
If anyone has any insights as to what might be going on here or how to work around it, please let me know. Thanks!
Edited to add: the work-around I’ve found for now is once wp_update_user is done I then use GFAPI::update_entry_field to populate the fields that are getting wiped away with the correct data. I’d rather stop the issue from happening in the first place but so far this is the best solution I’ve been able to find.