I’ve run into an issue that I’ve never experienced before and for the life of me cannot figure out.
I have a basic plugin that will update an ACF User field (multiple values) on a custom post type.
The correct field is being targeted, the data to be saved is correct, but for some reason when the update_field function is called, the wrong user is saved into the array.
Here’s a snippet of my code which includes some troubleshooting code as well: https://gist.github.com/nathanp/1be1b54dfa31eb4882aa
—- Versions —-
The user field stores the user ID or an array of user ID values it you set it to allow multiple. You need to insert just an array of ID values instead of an array of user objects.