The documentation for WooCommerce Blocks has moved to the WooCommerce monorepo.
Please refer to the documentation in the new location as the files in this repository will no longer be updated and the repository will be archived.
GET /products/attributes/:id/terms
GET /products/attributes/:id/terms?orderby=slug
Attribute | Type | Required | Description |
---|---|---|---|
id |
integer | Yes | The ID of the attribute to retrieve terms for. |
order |
string | no | Order ascending or descending. Allowed values: asc , desc |
orderby |
string | no | Sort collection by object attribute. Allowed values: name , slug , count , menu_order . |
curl "https://example-store.com/wp-json/wc/store/v1/products/attributes/1/terms"
Example response:
[
{
"id": 22,
"name": "Blue",
"slug": "blue",
"count": 5
},
{
"id": 48,
"name": "Burgundy",
"slug": "burgundy",
"count": 1
}
]
We're hiring! Come work with us!
🐞 Found a mistake, or have a suggestion? Leave feedback about this document here.