Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem updating ACF relationship fields #403

Open
wiknoro opened this issue Jun 16, 2022 · 0 comments
Open

Problem updating ACF relationship fields #403

wiknoro opened this issue Jun 16, 2022 · 0 comments

Comments

@wiknoro
Copy link

wiknoro commented Jun 16, 2022

I'm using the ACF relationship fields for the board's posts, however I'm struggling to update the array data. I'm sending a POST request with the modified posts' array which actually reaches the correct field but it updates data to 0. Any help would be appreciated.

    const res = await axios({
        method: "POST",
        url: `${process.env.URL}/wp-json/acf/v3/boards/${boardId}`,
        data: {
          fields:{
            posts:`${posts}`
          }
        },
        headers: {
          Authorization: `Bearer ${token}`,
          "Content-Type": "application/json"
        },
      });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant