We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi I have a NodeJS app to manage my WordPress. I'm creating a new WooCommerce product with normal POST and it is working fine. Product is added.
fetch(https://my-website/wp-json/wc/v3/products, { method: 'POST', headers: { 'Content-Type': 'application/json', Authorization: WOO_API_AUTH_REQUEST }, body: JSON.stringify({ name: "product name", regular_price: "420", fields: { nku: "new nku" } })})
However the "acf" values (aka 'fields') are not updated.
The sad part is, that it works fine with regular WordPress posts, under endpoint /wp/v2/posts. Post is created and populated with ACF fields
/wp/v2/posts
I was trying to use PUT on the existing product, but it doesn't update the ACF fields as well.
Options are enabled
User in WooCommerce REST API settings has Read/Write access.
Am I missing something or is it a known issue, that we can't update ACF in the WooCommerce product?
WordPress: 6.0 ACF to REST: 3.3.3 ACF: 5.12.2 WooCommerce: Version 6.5.1
The text was updated successfully, but these errors were encountered:
I think the solution is to use meta_data instead
name: "New Product", regular_price: "420", fields: { nku: "it doesn't work", sku: "it doesn't work" }, meta_data: [ { "key": "nku", "value": "5244KA12" }, { "key": "sku", "value": "123JAKIWU1" } ],
Product is added with populated ACF fields. 'id' in the meta_data is added automatically. Looks like it needs only the key and value.
@airesvsg I let you decide if it is a feature or a bug and if the issue should be close :)
Sorry, something went wrong.
No branches or pull requests
Hi
I have a NodeJS app to manage my WordPress.
I'm creating a new WooCommerce product with normal POST and it is working fine. Product is added.
However the "acf" values (aka 'fields') are not updated.
The sad part is, that it works fine with regular WordPress posts, under endpoint
/wp/v2/posts
. Post is created and populated with ACF fieldsI was trying to use PUT on the existing product, but it doesn't update the ACF fields as well.
Options are enabled
User in WooCommerce REST API settings has Read/Write access.
Am I missing something or is it a known issue, that we can't update ACF in the WooCommerce product?
WordPress: 6.0
ACF to REST: 3.3.3
ACF: 5.12.2
WooCommerce: Version 6.5.1
The text was updated successfully, but these errors were encountered: