Skip to content

Commit

Permalink
Fix Example Code Error #3
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelpeter committed Feb 12, 2016
1 parent 22c9e28 commit 43d9c93
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ WOOCOMMERCE_VERSION=v3
```php
use Woocommerce;

return Woocommerceapi::get('');
return Woocommerce::get('');
```

### View all orders
```php
use Woocommerce;

return Woocommerceapi::get('orders');
return Woocommerce::get('orders');
```

### View all completed orders created after a specific date
Expand All @@ -73,15 +73,15 @@ $data = [
]
];

$result = Woocommerceapi::get('orders', $data);
$result = Woocommerce::get('orders', $data);

foreach($result['orders'] as $order)
{
// do something with $order
}

// you can also use array access
$orders = Woocommerceapi::get('orders', $data)['orders'];
$orders = Woocommerce::get('orders', $data)['orders'];

foreach($orders as $order)
{
Expand All @@ -100,7 +100,7 @@ $data = [
]
];

return Woocommerceapi::put('products/1', $data);
return Woocommerce::put('products/1', $data);
```

### More Examples
Expand Down

0 comments on commit 43d9c93

Please sign in to comment.