Skip to content

Commit 2f5dc94

Browse files
Updated examples description
1 parent be841e6 commit 2f5dc94

File tree

7 files changed

+106
-106
lines changed

7 files changed

+106
-106
lines changed

source/includes/v2/_coupons.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ data = {
123123
}
124124
}
125125

126-
print(wcapi.post("coupons", data).text)
126+
print(wcapi.post("coupons", data).json())
127127
```
128128

129129
```php
@@ -155,7 +155,7 @@ print_r($woocommerce->coupons->create($data));
155155
?>
156156
```
157157

158-
> Response:
158+
> JSON response example:
159159
160160
```json
161161
{
@@ -218,14 +218,14 @@ WooCommerce.get('coupons/529', function(err, data, res) {
218218
```
219219

220220
```python
221-
print(wcapi.get("coupons/529").text)
221+
print(wcapi.get("coupons/529").json())
222222
```
223223

224224
```php
225225
<?php print_r($woocommerce->coupons->get(529)); ?>
226226
```
227227

228-
> Response:
228+
> JSON response example:
229229
230230
```json
231231
{
@@ -281,14 +281,14 @@ WooCommerce.get('coupons', function(err, data, res) {
281281
```
282282

283283
```python
284-
print(wcapi.get("coupons").text)
284+
print(wcapi.get("coupons").json())
285285
```
286286

287287
```php
288288
<?php print_r($woocommerce->coupons->get()); ?>
289289
```
290290

291-
> Response:
291+
> JSON response example:
292292
293293
```json
294294
{
@@ -412,7 +412,7 @@ data = {
412412
}
413413
}
414414

415-
print(wcapi.put("coupons/529", data).text)
415+
print(wcapi.put("coupons/529", data).json())
416416
```
417417

418418
```php
@@ -427,7 +427,7 @@ print_r($woocommerce->coupons->update(529, $data));
427427
?>
428428
```
429429

430-
> Response:
430+
> JSON response example:
431431
432432
```json
433433
{
@@ -483,14 +483,14 @@ WooCommerce.delete('coupons/529/?force=true', function(err, data, res) {
483483
```
484484

485485
```python
486-
print(wcapi.delete("coupons/529?force=true").text)
486+
print(wcapi.delete("coupons/529?force=true").json())
487487
```
488488

489489
```php
490490
<?php print_r($woocommerce->coupons->delete(529, true)); ?>
491491
```
492492

493-
> Response:
493+
> JSON response example:
494494
495495
```json
496496
{
@@ -529,14 +529,14 @@ WooCommerce.get('coupons/count', function(err, data, res) {
529529
```
530530

531531
```python
532-
print(wcapi.get("coupons/count").text)
532+
print(wcapi.get("coupons/count").json())
533533
```
534534

535535
```php
536536
<?php print_r($woocommerce->coupons->get_count()); ?>
537537
```
538538

539-
> Response:
539+
> JSON response example:
540540
541541
```json
542542
{

source/includes/v2/_customers.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ data = {
175175
}
176176
}
177177

178-
print(wcapi.post("customers", data).text)
178+
print(wcapi.post("customers", data).json())
179179
```
180180

181181
```php
@@ -217,7 +217,7 @@ print_r($woocommerce->customers->create($data));
217217
?>
218218
```
219219

220-
> Response:
220+
> JSON response example:
221221
222222
```json
223223
{
@@ -293,14 +293,14 @@ WooCommerce.get('customers/2', function(err, data, res) {
293293
```
294294

295295
```python
296-
print(wcapi.get("customers/2").text)
296+
print(wcapi.get("customers/2").json())
297297
```
298298

299299
```php
300300
<?php print_r($woocommerce->customers->get(2)); ?>
301301
```
302302

303-
> Response:
303+
> JSON response example:
304304
305305
```json
306306
{
@@ -369,14 +369,14 @@ WooCommerce.get('customers', function(err, data, res) {
369369
```
370370

371371
```python
372-
print(wcapi.get("customers").text)
372+
print(wcapi.get("customers").json())
373373
```
374374

375375
```php
376376
<?php print_r($woocommerce->customers->get()); ?>
377377
```
378378

379-
> Response:
379+
> JSON response example:
380380
381381
```json
382382
{
@@ -526,7 +526,7 @@ data = {
526526
}
527527
}
528528

529-
print(wcapi.put("customers/2", data).text)
529+
print(wcapi.put("customers/2", data).json())
530530
```
531531

532532
```php
@@ -547,7 +547,7 @@ print_r($woocommerce->customers->update(2, $data));
547547
?>
548548
```
549549

550-
> Response:
550+
> JSON response example:
551551
552552
```json
553553
{
@@ -616,14 +616,14 @@ WooCommerce.delete('customers/2', function(err, data, res) {
616616
```
617617

618618
```python
619-
print(wcapi.delete("customers/2").text)
619+
print(wcapi.delete("customers/2").json())
620620
```
621621

622622
```php
623623
<?php print_r($woocommerce->customers->delete(2)); ?>
624624
```
625625

626-
> Response:
626+
> JSON response example:
627627
628628
```json
629629
{
@@ -656,14 +656,14 @@ WooCommerce.get('customers/2/orders', function(err, data, res) {
656656
```
657657

658658
```python
659-
print(wcapi.get("customers/2/orders").text)
659+
print(wcapi.get("customers/2/orders").json())
660660
```
661661

662662
```php
663663
<?php print_r($woocommerce->customers->get_orders(2)); ?>
664664
```
665665

666-
> Response:
666+
> JSON response example:
667667
668668
```json
669669
{
@@ -817,14 +817,14 @@ WooCommerce.get('customers/2/downloads', function(err, data, res) {
817817
```
818818

819819
```python
820-
print(wcapi.get("customers/2/downloads").text)
820+
print(wcapi.get("customers/2/downloads").json())
821821
```
822822

823823
```php
824824
<?php print_r($woocommerce->customers->get_downloads(2)); ?>
825825
```
826826

827-
> Response:
827+
> JSON response example:
828828
829829
```json
830830
{
@@ -886,14 +886,14 @@ WooCommerce.get('customers/count', function(err, data, res) {
886886
```
887887

888888
```python
889-
print(wcapi.get("customers/count").text)
889+
print(wcapi.get("customers/count").json())
890890
```
891891

892892
```php
893893
<?php print_r($woocommerce->customers->get_count()); ?>
894894
```
895895

896-
> Response:
896+
> JSON response example:
897897
898898
```json
899899
{

source/includes/v2/_index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ WooCommerce.get('', function(err, data, res) {
6767
```
6868

6969
```python
70-
print(wcapi.get("").text)
70+
print(wcapi.get("").json())
7171
```
7272

7373
```php
7474
<?php print_r($woocommerce->index->get()); ?>
7575
```
7676

77-
> Response:
77+
> JSON response example:
7878
7979
```json
8080
{

0 commit comments

Comments
 (0)