How to edit just ONE product attribute via the API
-
Hi, so there’s one attribute that we regularly update and we do that importing CSV. But it’s very slow because we change all other attributes that are the same. Right now, WC does not allow to change only one attribute when importing: it’s all or nothing.
I tried updating via the API, by using:
/wp-json/wc/v3/products/586960/
and sending a PUT like this:
{ "attributes": [ { "id": 7, "options": [ "Choice 1, Choice 2" ] }] }
What happened is that it wiped all other attributes.
I checked if there’s an endpoint to a particular attribute inside a product, like
product/<id>/attribute/<id>
but it didn’t work.Is there a way to update, via import or API, only that particular attribute without deleting all the others or having to import a CSV w/all the attributes or send a huge JSON with all the information?
Thanks!
- The topic ‘How to edit just ONE product attribute via the API’ is closed to new replies.