Open kamil-homer opened 2 years ago
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 :)
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