From 5782a75548264c60cf7ab44c8e1f744dd107daf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alba=20Rinc=C3=B3n?= Date: Wed, 11 Dec 2024 12:14:40 +0100 Subject: [PATCH 1/5] Add docs for `/products` endpoint new parameters --- source/includes/wp-api-v3/_products.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/includes/wp-api-v3/_products.md b/source/includes/wp-api-v3/_products.md index e9a9d1d..d99e50a 100644 --- a/source/includes/wp-api-v3/_products.md +++ b/source/includes/wp-api-v3/_products.md @@ -1481,7 +1481,11 @@ woocommerce.get("products").parsed_response | `parent_exclude` | array | Limit result set to all items except those of a particular parent ID. | | `slug` | string | Limit result set to products with a specific slug. | | `status` | string | Limit result set to products assigned a specific status. Options: `any`, `draft`, `pending`, `private` and `publish`. Default is `any`. | -| `type` | string | Limit result set to products assigned a specific type. Options: `simple`, `grouped`, `external` and `variable`. | +| `include_status` | string | Limit result set to products with any of the specified statuses. Options: `any`, `trash`, `draft`, `pending`, `private`, and `publish`.| +| `exclude_status` | string | Exclude products with any of the statuses from result set. Options: `trash`, `draft`, `pending`, `private`, and `publish`.| +| `type` | string | Limit result set to products assigned a specific type. Options: `simple`, `grouped`, `external` and `variable`. | +| `include_types` | string | Limit result set to products with any of the types. Options: `simple`, `grouped`, `external` and `variable`. | +| `exclude_types` | string | Exclude products with any of the types from result set. Options: `simple`, `grouped`, `external` and `variable`. | | `sku` | string | Limit result set to products with a specific SKU. | | `featured` | boolean | Limit result set to featured products. | | `category` | string | Limit result set to products assigned a specific category ID. | @@ -1494,6 +1498,8 @@ woocommerce.get("products").parsed_response | `min_price` | string | Limit result set to products based on a minimum price. | | `max_price` | string | Limit result set to products based on a maximum price. | | `stock_status` | string | Limit result set to products with specified stock status. Options: `instock`, `outofstock` and `onbackorder`. | +| `virtual` | boolean | Limit result set to virtual products. | +| `downloadable` | boolean | Limit result set to downloadable products. | ## Duplicate product ## From bd4a2376b36e68705b269684adaa10e2b6b64f5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alba=20Rinc=C3=B3n?= Date: Wed, 11 Dec 2024 15:20:36 +0100 Subject: [PATCH 2/5] Add info about how to specify multiple values --- source/includes/wp-api-v3/_products.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/includes/wp-api-v3/_products.md b/source/includes/wp-api-v3/_products.md index d99e50a..4c3975f 100644 --- a/source/includes/wp-api-v3/_products.md +++ b/source/includes/wp-api-v3/_products.md @@ -1481,11 +1481,11 @@ woocommerce.get("products").parsed_response | `parent_exclude` | array | Limit result set to all items except those of a particular parent ID. | | `slug` | string | Limit result set to products with a specific slug. | | `status` | string | Limit result set to products assigned a specific status. Options: `any`, `draft`, `pending`, `private` and `publish`. Default is `any`. | -| `include_status` | string | Limit result set to products with any of the specified statuses. Options: `any`, `trash`, `draft`, `pending`, `private`, and `publish`.| -| `exclude_status` | string | Exclude products with any of the statuses from result set. Options: `trash`, `draft`, `pending`, `private`, and `publish`.| +| `include_status` | string | Limit result set to products with any of the specified statuses. Multiple statuses can be provided as a comma-separated list. Options: `any`, `trash`, `draft`, `pending`, `private`, and `publish`.| +| `exclude_status` | string | Exclude products with any of the statuses from result set. Multiple statuses can be provided as a comma-separated list. Options: `trash`, `draft`, `pending`, `private`, and `publish`.| | `type` | string | Limit result set to products assigned a specific type. Options: `simple`, `grouped`, `external` and `variable`. | -| `include_types` | string | Limit result set to products with any of the types. Options: `simple`, `grouped`, `external` and `variable`. | -| `exclude_types` | string | Exclude products with any of the types from result set. Options: `simple`, `grouped`, `external` and `variable`. | +| `include_types` | string | Limit result set to products with any of the types. Multiple statuses can be provided as a comma-separated list. Options: `simple`, `grouped`, `external` and `variable`. | +| `exclude_types` | string | Exclude products with any of the types from result set. Multiple statuses can be provided as a comma-separated list. Options: `simple`, `grouped`, `external` and `variable`. | | `sku` | string | Limit result set to products with a specific SKU. | | `featured` | boolean | Limit result set to featured products. | | `category` | string | Limit result set to products assigned a specific category ID. | From 6039647ce46e0979a1a45cb34856e3800a8d2005 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alba=20Rinc=C3=B3n?= Date: Thu, 12 Dec 2024 10:39:09 +0100 Subject: [PATCH 3/5] Improve copy Co-authored-by: Corey McKrill <916023+coreymckrill@users.noreply.github.com> --- source/includes/wp-api-v3/_products.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/includes/wp-api-v3/_products.md b/source/includes/wp-api-v3/_products.md index 4c3975f..d3a4aec 100644 --- a/source/includes/wp-api-v3/_products.md +++ b/source/includes/wp-api-v3/_products.md @@ -1482,10 +1482,10 @@ woocommerce.get("products").parsed_response | `slug` | string | Limit result set to products with a specific slug. | | `status` | string | Limit result set to products assigned a specific status. Options: `any`, `draft`, `pending`, `private` and `publish`. Default is `any`. | | `include_status` | string | Limit result set to products with any of the specified statuses. Multiple statuses can be provided as a comma-separated list. Options: `any`, `trash`, `draft`, `pending`, `private`, and `publish`.| -| `exclude_status` | string | Exclude products with any of the statuses from result set. Multiple statuses can be provided as a comma-separated list. Options: `trash`, `draft`, `pending`, `private`, and `publish`.| +| `exclude_status` | string | Exclude products from result set with any of the specified statuses. Multiple statuses can be provided as a comma-separated list. Options: `trash`, `draft`, `pending`, `private`, and `publish`.| | `type` | string | Limit result set to products assigned a specific type. Options: `simple`, `grouped`, `external` and `variable`. | | `include_types` | string | Limit result set to products with any of the types. Multiple statuses can be provided as a comma-separated list. Options: `simple`, `grouped`, `external` and `variable`. | -| `exclude_types` | string | Exclude products with any of the types from result set. Multiple statuses can be provided as a comma-separated list. Options: `simple`, `grouped`, `external` and `variable`. | +| `exclude_types` | string | Exclude products from result set with any of the specified types. Multiple statuses can be provided as a comma-separated list. Options: `simple`, `grouped`, `external` and `variable`. | | `sku` | string | Limit result set to products with a specific SKU. | | `featured` | boolean | Limit result set to featured products. | | `category` | string | Limit result set to products assigned a specific category ID. | From 4c9449b4e581e0b8353cde2373933dd0c6989bc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alba=20Rinc=C3=B3n?= Date: Thu, 12 Dec 2024 10:45:22 +0100 Subject: [PATCH 4/5] Add note about precedence --- source/includes/wp-api-v3/_products.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/includes/wp-api-v3/_products.md b/source/includes/wp-api-v3/_products.md index d3a4aec..4697766 100644 --- a/source/includes/wp-api-v3/_products.md +++ b/source/includes/wp-api-v3/_products.md @@ -1481,11 +1481,11 @@ woocommerce.get("products").parsed_response | `parent_exclude` | array | Limit result set to all items except those of a particular parent ID. | | `slug` | string | Limit result set to products with a specific slug. | | `status` | string | Limit result set to products assigned a specific status. Options: `any`, `draft`, `pending`, `private` and `publish`. Default is `any`. | -| `include_status` | string | Limit result set to products with any of the specified statuses. Multiple statuses can be provided as a comma-separated list. Options: `any`, `trash`, `draft`, `pending`, `private`, and `publish`.| -| `exclude_status` | string | Exclude products from result set with any of the specified statuses. Multiple statuses can be provided as a comma-separated list. Options: `trash`, `draft`, `pending`, `private`, and `publish`.| +| `include_status` | string | Limit result set to products with any of the specified statuses. Multiple statuses can be provided as a comma-separated list. Takes precedence over the `status` parameter. Options: `any`, `trash`, `draft`, `pending`, `private`, and `publish`.| +| `exclude_status` | string | Exclude products from result set with any of the specified statuses. Multiple statuses can be provided as a comma-separated list. Takes precedence over the `include_status` parameter. Options: `trash`, `draft`, `pending`, `private`, and `publish`.| | `type` | string | Limit result set to products assigned a specific type. Options: `simple`, `grouped`, `external` and `variable`. | -| `include_types` | string | Limit result set to products with any of the types. Multiple statuses can be provided as a comma-separated list. Options: `simple`, `grouped`, `external` and `variable`. | -| `exclude_types` | string | Exclude products from result set with any of the specified types. Multiple statuses can be provided as a comma-separated list. Options: `simple`, `grouped`, `external` and `variable`. | +| `include_types` | string | Limit result set to products with any of the types. Multiple statuses can be provided as a comma-separated list. Takes precedence over the `type` parameter. Options: `simple`, `grouped`, `external` and `variable`. | +| `exclude_types` | string | Exclude products from result set with any of the specified types. Multiple statuses can be provided as a comma-separated list. Takes precedence over the `include_types` parameter. Options: `simple`, `grouped`, `external` and `variable`. | | `sku` | string | Limit result set to products with a specific SKU. | | `featured` | boolean | Limit result set to featured products. | | `category` | string | Limit result set to products assigned a specific category ID. | From 9afb2bb21931d8cc72a15ead3f7e83f055412944 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alba=20Rinc=C3=B3n?= Date: Mon, 13 Jan 2025 09:27:50 +0100 Subject: [PATCH 5/5] Add future option to status params --- source/includes/wp-api-v3/_products.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/includes/wp-api-v3/_products.md b/source/includes/wp-api-v3/_products.md index 4697766..34aa2d2 100644 --- a/source/includes/wp-api-v3/_products.md +++ b/source/includes/wp-api-v3/_products.md @@ -1481,8 +1481,8 @@ woocommerce.get("products").parsed_response | `parent_exclude` | array | Limit result set to all items except those of a particular parent ID. | | `slug` | string | Limit result set to products with a specific slug. | | `status` | string | Limit result set to products assigned a specific status. Options: `any`, `draft`, `pending`, `private` and `publish`. Default is `any`. | -| `include_status` | string | Limit result set to products with any of the specified statuses. Multiple statuses can be provided as a comma-separated list. Takes precedence over the `status` parameter. Options: `any`, `trash`, `draft`, `pending`, `private`, and `publish`.| -| `exclude_status` | string | Exclude products from result set with any of the specified statuses. Multiple statuses can be provided as a comma-separated list. Takes precedence over the `include_status` parameter. Options: `trash`, `draft`, `pending`, `private`, and `publish`.| +| `include_status` | string | Limit result set to products with any of the specified statuses. Multiple statuses can be provided as a comma-separated list. Takes precedence over the `status` parameter. Options: `any`, `future`, `trash`, `draft`, `pending`, `private`, and `publish`.| +| `exclude_status` | string | Exclude products from result set with any of the specified statuses. Multiple statuses can be provided as a comma-separated list. Takes precedence over the `include_status` parameter. Options: `future`, `trash`, `draft`, `pending`, `private`, and `publish`.| | `type` | string | Limit result set to products assigned a specific type. Options: `simple`, `grouped`, `external` and `variable`. | | `include_types` | string | Limit result set to products with any of the types. Multiple statuses can be provided as a comma-separated list. Takes precedence over the `type` parameter. Options: `simple`, `grouped`, `external` and `variable`. | | `exclude_types` | string | Exclude products from result set with any of the specified types. Multiple statuses can be provided as a comma-separated list. Takes precedence over the `include_types` parameter. Options: `simple`, `grouped`, `external` and `variable`. |