Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Problem with detach category from product #8

@vaniok010

Description

@vaniok010

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs docsNeeds explanation in release notes, dev blog, or documentation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions