Home › Forums › General Issues › How to update acf field value for wp user › Reply To: How to update acf field value for wp user
You need to use the ACF function update_field() and you need to use the field_key to update.
https://www.advancedcustomfields.com/resources/acf-update_field/
When using a relationship field or a post object field then the value of the field will be post ID or an array of post ID representing the company post that is related. For a relationship field this will always be an array. For a post object it will be a single value unless you have enabled multiple selections and then it will be an array.
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.