Skip to content

Commit d9d8cd3

Browse files
authored
Merge pull request #1 from Mathiou04/fix-reports-top-sellers-route
Correct API route for reports/top_sellers
2 parents 8670b1b + 94d8496 commit d9d8cd3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

+6-6
Original file line numberDiff line numberDiff line change
@@ -206,17 +206,17 @@ This API lets you retrieve and view a list of top sellers report.
206206
<div class="api-endpoint">
207207
<div class="endpoint-data">
208208
<i class="label label-get">GET</i>
209-
<h6>/wp-json/wc/v1/reports/sales/top_sellers</h6>
209+
<h6>/wp-json/wc/v1/reports/top_sellers</h6>
210210
</div>
211211
</div>
212212

213213
```shell
214-
curl https://example.com/wp-json/wc/v1/reports/sales/top_sellers?period=last_month \
214+
curl https://example.com/wp-json/wc/v1/reports/top_sellers?period=last_month \
215215
-u consumer_key:consumer_secret
216216
```
217217

218218
```javascript
219-
WooCommerce.get('reports/sales/top_sellers?period=last_month', function(err, data, res) {
219+
WooCommerce.get('reports/top_sellers?period=last_month', function(err, data, res) {
220220
console.log(res);
221221
});
222222
```
@@ -227,20 +227,20 @@ $query = [
227227
'period' => 'last_month'
228228
];
229229

230-
print_r($woocommerce->get('reports/sales/top_sellers', $query));
230+
print_r($woocommerce->get('reports/top_sellers', $query));
231231
?>
232232
```
233233

234234
```python
235-
print(wcapi.get("reports/sales/top_sellers?period=last_month").json())
235+
print(wcapi.get("reports/top_sellers?period=last_month").json())
236236
```
237237

238238
```ruby
239239
query = {
240240
period: "last_month"
241241
}
242242

243-
woocommerce.get("reports/sales/top_sellers", query).parsed_response
243+
woocommerce.get("reports/top_sellers", query).parsed_response
244244
```
245245

246246
> JSON response example:

0 commit comments

Comments
 (0)