Categories
Retrieve product categories.
Table Specific Information
Select
WooCommerce allows only a small subset of columns to be used in the WHERE clause of a SELECT query. Following columns are supported server side, all other columns are processed client side.
- Id support the '=,IN,NOT IN' operators.
- Slug support the '=' operator.
- Parent support the '=' operator.
- Product support the '=' operator.
SELECT * FROM Categories WHERE Id = 4 SELECT * FROM Categories WHERE Id IN (4,5) SELECT * FROM Categories WHERE Id NOT IN (4,5) SELECT * FROM Categories WHERE Slug = 'criteria' SELECT * FROM Categories WHERE Parent = 2
Insert
The following attribute is required when performing an insert: Name.
INSERT INTO Categories (Name) VALUES ('category_name')
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | Long | True |
Unique identifier for the resource. | |
| Name | String | False |
Category name. | |
| Slug | String | False |
An alphanumeric identifier for the resource unique to its type. | |
| Parent | Long | False |
The ID for the parent of the resource. | |
| Description | String | False |
HTML description of the resource. | |
| Display | String | False |
Category archive display type. Options: default, products, subcategories and both. | |
| MenuOrder | Integer | False |
Menu order, used to custom sort the resource. | |
| Count | Integer | True |
Number of published products for the resource. | |
| ImageId | Long | False |
Image ID. | |
| ImageDateCreated | Datetime | True |
The date the image was created, in the site's timezone. | |
| ImageDateModified | Datetime | True |
The date the image was last modified, in the site's timezone. | |
| ImageSrc | String | False |
Image URL. | |
| ImageName | String | False |
Image name. | |
| ImageAlt | String | False |
Image alternative text. |