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 with detach category from product #8

Closed
vaniok010 opened this issue Jul 31, 2019 · 2 comments
Closed

Problem with detach category from product #8

vaniok010 opened this issue Jul 31, 2019 · 2 comments
Labels
status: needs docs Needs explanation in release notes, dev blog, or documentation.

Comments

@vaniok010
Copy link

How can I detach a category from a product?

Why such a request does not work?

PUT /wp-json/wc/v3/products/39037

{
“categories”:[
{
“id”:1239
},
{
“id”:1232
}
]
}

Why do I continue to get the old categories?

“categories”:[
{
“id”:1096,
“name”:“Кроссовки”,
“slug”:“sneaker”
},
{
“id”:1239,
“name”:“Носки”,
“slug”:“clothing-socken”
},
{
“id”:1232,
“name”:“Одежда”,
“slug”:“clothing”
},
{
“id”:1233,
“name”:“Шапки”,
“slug”:“clothing-caps”
}
]

How can I leave only categories 1239, 1232 and remove the rest?

@vaniok010
Copy link
Author

image

@mikejolley mikejolley added the status: needs docs Needs explanation in release notes, dev blog, or documentation. label Aug 1, 2019
@vedanshujain
Copy link
Contributor

I am cleaning up this repository issues happened upon this issue, apologies for the year late reply.

As far as I can see you are using the correct syntax and its working for me in my local testing, so I am guessing something else might have been an issue (perhaps a plugin conflict?). I am closing the issue but feel free to write back if you have additional comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs docs Needs explanation in release notes, dev blog, or documentation.
Projects
None yet
Development

No branches or pull requests

3 participants