Hi,
In one of my blogs in multisite network I created a few custom fields of users using ACF.
Now I am trying to add value in those fields using update_user_option(). This function returns a numeric value everytime, which means, according to documentation, key doesn’t exist. https://developer.wordpress.org/reference/functions/update_user_option/
I triple checked to confirm that key is same as the one created through ACF. Even I am able to update it manually from User Profile in backend.
Please note that the fields are created only in the current site rather than in the whole network.
Can you please guide of how to save user meta values programatically in my current blog.
Thanks
On multisite, all sites share a common user and user_meta table. Before getting values for users you need to switch to the main blog, see https://codex.wordpress.org/Function_Reference/switch_to_blog