@@ -470,17 +470,13 @@ curl -X PUT https://example.com/wp-json/wc/v1/products/categories/9 \
470
470
-u consumer_key:consumer_secret \
471
471
-H " Content-Type: application/json" \
472
472
-d ' {
473
- "product_category": {
474
- "description": "All kinds of clothes."
475
- }
473
+ "description": "All kinds of clothes."
476
474
}'
477
475
```
478
476
479
477
``` javascript
480
478
var data = {
481
- product_category: {
482
- description: ' All kinds of clothes.'
483
- }
479
+ description: ' All kinds of clothes.'
484
480
};
485
481
486
482
WooCommerce .put (' products/categories/9' , data, function (err , data , res ) {
@@ -491,9 +487,7 @@ WooCommerce.put('products/categories/9', data, function(err, data, res) {
491
487
``` php
492
488
<?php
493
489
$data = [
494
- 'product_category' => [
495
- 'description' => 'All kinds of clothes.'
496
- ]
490
+ 'description' => 'All kinds of clothes.'
497
491
];
498
492
499
493
print_r($woocommerce->put('products/categories/9', $data));
@@ -502,19 +496,15 @@ print_r($woocommerce->put('products/categories/9', $data));
502
496
503
497
``` python
504
498
data = {
505
- " product_category" : {
506
- " description" : " All kinds of clothes."
507
- }
499
+ " description" : " All kinds of clothes."
508
500
}
509
501
510
502
print (wcapi.put(" products/categories/9" , data).json())
511
503
```
512
504
513
505
``` ruby
514
506
data = {
515
- product_category: {
516
- description: " All kinds of clothes."
517
- }
507
+ description: " All kinds of clothes."
518
508
}
519
509
520
510
woocommerce.put(" products/categories/9" , data).parsed_response
0 commit comments