Skip to content

Commit 799a431

Browse files
authored
Merge pull request #243 from woocommerce/update/fix-reported-issues
Updates based on issues in the WooCommerce repo Fixes woocommerce/woocommerce#43444 Fixes woocommerce/woocommerce#28474 Fixes woocommerce/woocommerce#45924 Fixes woocommerce/woocommerce#45836 Fixes woocommerce/woocommerce#43647 Fixes woocommerce/woocommerce#35619 Refs woocommerce/woocommerce#32037
2 parents a9e60e6 + 849b306 commit 799a431

10 files changed

+398
-196
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ woocommerce.get("coupons").parsed_response
393393
#### Available parameters ####
394394

395395
| Parameter | Type | Description |
396-
| ----------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------- |
396+
| ----------------- | ------- |------------------------------------------------------------------------------------------------------------------------------|
397397
| `context` | string | Scope under which the request is made; determines fields present in response. Options: `view` and `edit`. Default is `view`. |
398398
| `page` | integer | Current page of the collection. Default is `1`. |
399399
| `per_page` | integer | Maximum number of items to be returned in result set. Default is `10`. |
@@ -407,7 +407,7 @@ woocommerce.get("coupons").parsed_response
407407
| `include` | array | Limit result set to specific ids. |
408408
| `offset` | integer | Offset the result set by a specific number of items. |
409409
| `order` | string | Order sort attribute ascending or descending. Options: `asc` and `desc`. Default is `desc`. |
410-
| `orderby` | string | Sort collection by object attribute. Options: `date`, `id`, `include`, `title` and `slug`. Default is `date`. |
410+
| `orderby` | string | Sort collection by object attribute. Options: `date`, `modified`, `id`, `include`, `title` and `slug`. Default is `date`. |
411411
| `code` | string | Limit result set to resources with a specific code. |
412412

413413
## Update a coupon ##

source/includes/wp-api-v3/_order-refunds.md

+74-18
Large diffs are not rendered by default.

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

+58-71
Large diffs are not rendered by default.

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ woocommerce.get("products/22/variations").parsed_response
619619
| `include` | array | Limit result set to specific ids. |
620620
| `offset` | integer | Offset the result set by a specific number of items. |
621621
| `order` | string | Order sort attribute ascending or descending. Options: `asc` and `desc`. Default is `desc`. |
622-
| `orderby` | string | Sort collection by object attribute. Options: `date`, `id`, `include`, `title` and `slug`. Default is `date`. |
622+
| `orderby` | string | Sort collection by object attribute. Options: `date`, `modified`, `id`, `include`, `title` and `slug`. Default is `date`. |
623623
| `parent` | array | Limit result set to those of particular parent IDs. |
624624
| `parent_exclude` | array | Limit result set to all items except those of a particular parent ID. |
625625
| `slug` | string | Limit result set to products with a specific slug. |

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

+45-45
Large diffs are not rendered by default.

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

+158
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
# Refunds #
2+
3+
The refunds API is a simple, read-only endpoint that allows you to retrieve a list of refunds outside the context of an existing order. To create, view, and delete individual refunds, check out the [order refunds API](#order-refunds).
4+
5+
## Refund properties ##
6+
7+
All properties are the same as those in the [order refunds endpoint](#order-refund-properties), but with one additional property:
8+
9+
| Attribute | Type | Description |
10+
|-------------|---------|----------------------------------------------------|
11+
| `parent_id` | integer | The ID of the order the refund is associated with. |
12+
13+
## Retrieve a list of refunds ##
14+
15+
This API lets you retrieve and view refunds from your store, regardless of which order they are associated with.
16+
17+
### HTTP request ###
18+
19+
<div class="api-endpoint">
20+
<div class="endpoint-data">
21+
<i class="label label-get">GET</i>
22+
<h6>/wp-json/wc/v3/refunds</h6>
23+
</div>
24+
</div>
25+
26+
```shell
27+
curl https://example.com/wp-json/wc/v3/refunds \
28+
-u consumer_key:consumer_secret
29+
```
30+
31+
```javascript
32+
WooCommerce.get("refunds")
33+
.then((response) => {
34+
console.log(response.data);
35+
})
36+
.catch((error) => {
37+
console.log(error.response.data);
38+
});
39+
```
40+
41+
```php
42+
<?php print_r($woocommerce->get('refunds')); ?>
43+
```
44+
45+
```python
46+
print(wcapi.get("refunds").json())
47+
```
48+
49+
```ruby
50+
woocommerce.get("refunds").parsed_response
51+
```
52+
53+
> JSON response example:
54+
55+
```json
56+
[
57+
{
58+
"id": 726,
59+
"parent_id": 124,
60+
"date_created": "2017-03-21T17:07:11",
61+
"date_created_gmt": "2017-03-21T20:07:11",
62+
"amount": "10.00",
63+
"reason": "",
64+
"refunded_by": 1,
65+
"refunded_payment": false,
66+
"meta_data": [],
67+
"line_items": [],
68+
"_links": {
69+
"self": [
70+
{
71+
"href": "https://example.com/wp-json/wc/v3/orders/723/refunds/726"
72+
}
73+
],
74+
"collection": [
75+
{
76+
"href": "https://example.com/wp-json/wc/v3/orders/723/refunds"
77+
}
78+
],
79+
"up": [
80+
{
81+
"href": "https://example.com/wp-json/wc/v3/orders/723"
82+
}
83+
]
84+
}
85+
},
86+
{
87+
"id": 724,
88+
"parent_id": 63,
89+
"date_created": "2017-03-21T16:55:37",
90+
"date_created_gmt": "2017-03-21T19:55:37",
91+
"amount": "9.00",
92+
"reason": "",
93+
"refunded_by": 1,
94+
"refunded_payment": false,
95+
"meta_data": [],
96+
"line_items": [
97+
{
98+
"id": 314,
99+
"name": "Woo Album #2",
100+
"product_id": 87,
101+
"variation_id": 0,
102+
"quantity": -1,
103+
"tax_class": "",
104+
"subtotal": "-9.00",
105+
"subtotal_tax": "0.00",
106+
"total": "-9.00",
107+
"total_tax": "0.00",
108+
"taxes": [],
109+
"meta_data": [
110+
{
111+
"id": 2076,
112+
"key": "_refunded_item_id",
113+
"value": "311"
114+
}
115+
],
116+
"sku": "",
117+
"price": -9
118+
}
119+
],
120+
"_links": {
121+
"self": [
122+
{
123+
"href": "https://example.com/wp-json/wc/v3/orders/723/refunds/724"
124+
}
125+
],
126+
"collection": [
127+
{
128+
"href": "https://example.com/wp-json/wc/v3/orders/723/refunds"
129+
}
130+
],
131+
"up": [
132+
{
133+
"href": "https://example.com/wp-json/wc/v3/orders/723"
134+
}
135+
]
136+
}
137+
}
138+
]
139+
```
140+
141+
#### Available parameters ####
142+
143+
| Parameter | Type | Description |
144+
|------------------|---------|------------------------------------------------------------------------------------------------------------------------------|
145+
| `context` | string | Scope under which the request is made; determines fields present in response. Options: `view` and `edit`. Default is `view`. |
146+
| `page` | integer | Current page of the collection. Default is `1`. |
147+
| `per_page` | integer | Maximum number of items to be returned in result set. Default is `10`. |
148+
| `search` | string | Limit results to those matching a string. |
149+
| `after` | string | Limit response to resources published after a given ISO8601 compliant date. |
150+
| `before` | string | Limit response to resources published before a given ISO8601 compliant date. |
151+
| `exclude` | array | Ensure result set excludes specific IDs. |
152+
| `include` | array | Limit result set to specific ids. |
153+
| `offset` | integer | Offset the result set by a specific number of items. |
154+
| `order` | string | Order sort attribute ascending or descending. Options: `asc` and `desc`. Default is `desc`. |
155+
| `orderby` | string | Sort collection by object attribute. Options: `date`, `modified`, `id`, `include`, `title` and `slug`. Default is `date`. |
156+
| `parent` | array | Limit result set to those of particular parent IDs. |
157+
| `parent_exclude` | array | Limit result set to all items except those of a particular parent ID. |
158+
| `dp` | integer | Number of decimal points to use in each resource. Default is `2`. |

source/includes/wp-api-v3/_system-status.md

+31-31
Original file line numberDiff line numberDiff line change
@@ -16,38 +16,38 @@ The system status API allows you to view all system status items.
1616

1717
### System status - Environment properties ###
1818

19-
| Attribute | Type | Description |
20-
| --------------------------- | ------- | -------------------------------------------------------------------------- |
21-
| `home_url` | string | Home URL. <i class="label label-info">read-only</i> |
22-
| `site_url` | string | Site URL. <i class="label label-info">read-only</i> |
23-
| `wc_version` | string | WooCommerce version. <i class="label label-info">read-only</i> |
24-
| `log_directory` | string | Log directory. <i class="label label-info">read-only</i> |
25-
| `log_directory_writable` | boolean | Is log directory writable? <i class="label label-info">read-only</i> |
26-
| `wp_version` | string | WordPress version. <i class="label label-info">read-only</i> |
27-
| `wp_multisite` | boolean | Is WordPress multisite? <i class="label label-info">read-only</i> |
28-
| `wp_memory_limit` | integer | WordPress memory limit. <i class="label label-info">read-only</i> |
29-
| `wp_debug_mode` | boolean | Is WordPress debug mode active? <i class="label label-info">read-only</i> |
30-
| `wp_cron` | boolean | Are WordPress cron jobs enabled? <i class="label label-info">read-only</i> |
31-
| `language` | string | WordPress language. <i class="label label-info">read-only</i> |
32-
| `server_info` | string | Server info. <i class="label label-info">read-only</i> |
33-
| `php_version` | string | PHP version. <i class="label label-info">read-only</i> |
34-
| `php_post_max_size` | integer | PHP post max size. <i class="label label-info">read-only</i> |
35-
| `php_max_execution_time` | integer | PHP max execution time. <i class="label label-info">read-only</i> |
36-
| `php_max_input_vars` | integer | PHP max input vars. <i class="label label-info">read-only</i> |
37-
| `curl_version` | string | cURL version. <i class="label label-info">read-only</i> |
38-
| `suhosin_installed` | boolean | Is SUHOSIN installed? <i class="label label-info">read-only</i> |
39-
| `max_upload_size` | integer | Max upload size. <i class="label label-info">read-only</i> |
40-
| `mysql_version` | string | MySQL version. <i class="label label-info">read-only</i> |
41-
| `default_timezone` | string | Default timezone. <i class="label label-info">read-only</i> |
19+
| Attribute | Type | Description |
20+
| ------------------------ | ------- | -------------------------------------------------------------------------- |
21+
| `home_url` | string | Home URL. <i class="label label-info">read-only</i> |
22+
| `site_url` | string | Site URL. <i class="label label-info">read-only</i> |
23+
| `version` | string | WooCommerce version. <i class="label label-info">read-only</i> |
24+
| `log_directory` | string | Log directory. <i class="label label-info">read-only</i> |
25+
| `log_directory_writable` | boolean | Is log directory writable? <i class="label label-info">read-only</i> |
26+
| `wp_version` | string | WordPress version. <i class="label label-info">read-only</i> |
27+
| `wp_multisite` | boolean | Is WordPress multisite? <i class="label label-info">read-only</i> |
28+
| `wp_memory_limit` | integer | WordPress memory limit. <i class="label label-info">read-only</i> |
29+
| `wp_debug_mode` | boolean | Is WordPress debug mode active? <i class="label label-info">read-only</i> |
30+
| `wp_cron` | boolean | Are WordPress cron jobs enabled? <i class="label label-info">read-only</i> |
31+
| `language` | string | WordPress language. <i class="label label-info">read-only</i> |
32+
| `server_info` | string | Server info. <i class="label label-info">read-only</i> |
33+
| `php_version` | string | PHP version. <i class="label label-info">read-only</i> |
34+
| `php_post_max_size` | integer | PHP post max size. <i class="label label-info">read-only</i> |
35+
| `php_max_execution_time` | integer | PHP max execution time. <i class="label label-info">read-only</i> |
36+
| `php_max_input_vars` | integer | PHP max input vars. <i class="label label-info">read-only</i> |
37+
| `curl_version` | string | cURL version. <i class="label label-info">read-only</i> |
38+
| `suhosin_installed` | boolean | Is SUHOSIN installed? <i class="label label-info">read-only</i> |
39+
| `max_upload_size` | integer | Max upload size. <i class="label label-info">read-only</i> |
40+
| `mysql_version` | string | MySQL version. <i class="label label-info">read-only</i> |
41+
| `default_timezone` | string | Default timezone. <i class="label label-info">read-only</i> |
4242
| `fsockopen_or_curl_enabled` | boolean | Is fsockopen/cURL enabled? <i class="label label-info">read-only</i> |
43-
| `soapclient_enabled` | boolean | Is SoapClient class enabled? <i class="label label-info">read-only</i> |
44-
| `domdocument_enabled` | boolean | Is DomDocument class enabled? <i class="label label-info">read-only</i> |
45-
| `gzip_enabled` | boolean | Is GZip enabled? <i class="label label-info">read-only</i> |
46-
| `mbstring_enabled` | boolean | Is mbstring enabled? <i class="label label-info">read-only</i> |
47-
| `remote_post_successful` | boolean | Remote POST successful? <i class="label label-info">read-only</i> |
48-
| `remote_post_response` | string | Remote POST response. <i class="label label-info">read-only</i> |
49-
| `remote_get_successful` | boolean | Remote GET successful? <i class="label label-info">read-only</i> |
50-
| `remote_get_response` | string | Remote GET response. <i class="label label-info">read-only</i> |
43+
| `soapclient_enabled` | boolean | Is SoapClient class enabled? <i class="label label-info">read-only</i> |
44+
| `domdocument_enabled` | boolean | Is DomDocument class enabled? <i class="label label-info">read-only</i> |
45+
| `gzip_enabled` | boolean | Is GZip enabled? <i class="label label-info">read-only</i> |
46+
| `mbstring_enabled` | boolean | Is mbstring enabled? <i class="label label-info">read-only</i> |
47+
| `remote_post_successful` | boolean | Remote POST successful? <i class="label label-info">read-only</i> |
48+
| `remote_post_response` | string | Remote POST response. <i class="label label-info">read-only</i> |
49+
| `remote_get_successful` | boolean | Remote GET successful? <i class="label label-info">read-only</i> |
50+
| `remote_get_response` | string | Remote GET response. <i class="label label-info">read-only</i> |
5151

5252
### System status - Database properties ###
5353

0 commit comments

Comments
 (0)