Skip to content

Commit d7a9fc4

Browse files
authored
Merge pull request #272 from woocommerce/59319/fix-manage-stock-type
Update `manage_stock` property type
2 parents 5244201 + e2a87ce commit d7a9fc4

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

source/includes/wp-api-v1/_products.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ The products API allows you to create, view, update, and delete individual, or a
155155
| `download_expiry` | integer | Number of days that the customer has up to be able to download the variation, the `-1` means that **downloads never expires**. Default is `-1`. |
156156
| `tax_status` | string | Tax status. Default is `taxable`. Options: `taxable`, `shipping` (Shipping only) and `none`. |
157157
| `tax_class` | string | Tax class. |
158-
| `manage_stock` | boolean | Stock management at variation level. Default is `false`. |
158+
| `manage_stock` | boolean, string | Stock management at variation level. Possible values are either a boolean or `parent`. Default is `false`. |
159159
| `stock_quantity` | integer | Stock quantity. If is a variable variation this value will be used to control stock for all variations, unless you define stock at variation level. |
160160
| `in_stock` | boolean | Controls whether or not the variation is listed as "in stock" or "out of stock" on the frontend. Default is `true`. |
161161
| `backorders` | string | If managing stock, this controls if backorders are allowed. If enabled, stock quantity can go below `0`. Default is `no`. Options are: `no` (Do not allow), `notify` (Allow, but notify customer), and `yes` (Allow). |

source/includes/wp-api-v2/_index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8278,7 +8278,7 @@ woocommerce.get("").parsed_response
82788278
"required": false,
82798279
"default": false,
82808280
"description": "Stock management at variation level.",
8281-
"type": "boolean"
8281+
"type": ["boolean", "string"]
82828282
},
82838283
"stock_quantity": {
82848284
"required": false,
@@ -8572,7 +8572,7 @@ woocommerce.get("").parsed_response
85728572
"manage_stock": {
85738573
"required": false,
85748574
"description": "Stock management at variation level.",
8575-
"type": "boolean"
8575+
"type": ["boolean", "string"]
85768576
},
85778577
"stock_quantity": {
85788578
"required": false,
@@ -8853,7 +8853,7 @@ woocommerce.get("").parsed_response
88538853
"manage_stock": {
88548854
"required": false,
88558855
"description": "Stock management at variation level.",
8856-
"type": "boolean"
8856+
"type": ["boolean", "string"]
88578857
},
88588858
"stock_quantity": {
88598859
"required": false,

source/includes/wp-api-v2/_product-variations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The product variations API allows you to create, view, update, and delete indivi
3131
| `download_expiry` | integer | Number of days until access to downloadable files expires. Default is `-1`. |
3232
| `tax_status` | string | Tax status. Options: `taxable`, `shipping` and `none`. Default is `taxable`. |
3333
| `tax_class` | string | Tax class. |
34-
| `manage_stock` | boolean | Stock management at variation level. Default is `false`. |
34+
| `manage_stock` | boolean, string | Stock management at variation level. Possible values are either a boolean or `parent`. Default is `false`. |
3535
| `stock_quantity` | integer | Stock quantity. |
3636
| `in_stock` | boolean | Controls whether or not the variation is listed as "in stock" or "out of stock" on the frontend. Default is `true`. |
3737
| `backorders` | string | If managing stock, this controls if backorders are allowed. Options: `no`, `notify` and `yes`. Default is `no`. |

source/includes/wp-api-v3/_index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8281,7 +8281,7 @@ woocommerce.get("").parsed_response
82818281
"required": false,
82828282
"default": false,
82838283
"description": "Stock management at variation level.",
8284-
"type": "boolean"
8284+
"type": ["boolean", "string"]
82858285
},
82868286
"stock_quantity": {
82878287
"required": false,
@@ -8575,7 +8575,7 @@ woocommerce.get("").parsed_response
85758575
"manage_stock": {
85768576
"required": false,
85778577
"description": "Stock management at variation level.",
8578-
"type": "boolean"
8578+
"type": ["boolean", "string"]
85798579
},
85808580
"stock_quantity": {
85818581
"required": false,
@@ -8856,7 +8856,7 @@ woocommerce.get("").parsed_response
88568856
"manage_stock": {
88578857
"required": false,
88588858
"description": "Stock management at variation level.",
8859-
"type": "boolean"
8859+
"type": ["boolean", "string"]
88608860
},
88618861
"stock_quantity": {
88628862
"required": false,

source/includes/wp-api-v3/_product-variations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The product variations API allows you to create, view, update, and delete indivi
3131
| `download_expiry` | integer | Number of days until access to downloadable files expires. Default is `-1`. |
3232
| `tax_status` | string | Tax status. Options: `taxable`, `shipping` and `none`. Default is `taxable`. |
3333
| `tax_class` | string | Tax class. |
34-
| `manage_stock` | boolean | Stock management at variation level. Default is `false`. |
34+
| `manage_stock` | boolean, string | Stock management at variation level. Possible values are either a boolean or `parent`. Default is `false`. |
3535
| `stock_quantity` | integer | Stock quantity. |
3636
| `stock_status` | string | Controls the stock status of the product. Options: `instock`, `outofstock`, `onbackorder`. Default is `instock`. |
3737
| `backorders` | string | If managing stock, this controls if backorders are allowed. Options: `no`, `notify` and `yes`. Default is `no`. |

0 commit comments

Comments
 (0)