PHPackages                             redooc/woocommerce-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. redooc/woocommerce-api

ActiveLibrary[API Development](/categories/api)

redooc/woocommerce-api
======================

WooCommerce API Client using namespaces

v2.x-dev(8y ago)09GPL-3.0-onlyPHPPHP &gt;=5.4.0

Since Apr 4Pushed 8y ago6 watchersCompare

[ Source](https://github.com/redooc/woocommerce-api)[ Packagist](https://packagist.org/packages/redooc/woocommerce-api)[ RSS](/packages/redooc-woocommerce-api/feed)WikiDiscussions v2 Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

WooCommerce REST API Client Library
===================================

[](#woocommerce-rest-api-client-library)

About
-----

[](#about)

A PHP wrapper for the WooCommerce REST API. Easily interact with the WooCommerce REST API using this wrapper class. Feedback and bug reports are appreciated.

Requirements
------------

[](#requirements)

PHP 5.2.x cURL WooCommerce 2.1 at least on the store

Getting started
---------------

[](#getting-started)

Generate API credentials ( Consumer Key &amp; Consumer Secret ) on your profile page for the store you want to interact with.

> A good place to start is to look at the example script included.

### Initialize the class

[](#initialize-the-class)

```

```

### Get the data using methods

[](#get-the-data-using-methods)

```

```

**All methods return the data `json_decode()` by default so you can access the data.**

Available methods
-----------------

[](#available-methods)

### Index method

[](#index-method)

- `get_index()`

### Order methods

[](#order-methods)

- `get_orders()`
- `get_orders( $params = array( 'status' => 'completed' ) )`
- `get_order( $order_id )`
- `get_orders_count()`
- `get_order_notes( $order_id )`
- `update_order( $order_id, $data = array( 'status' => 'processing' ) )`
- `update_order( $order_id, $data = array( 'status' => 'processing', 'note' => 'This is a note') )`

### Coupon methods

[](#coupon-methods)

- `get_coupons()`
- `get_coupon( $coupon_id )`
- `get_coupon_by_code( $coupon_code )`
- `get_coupons_count()`

### Customer methods

[](#customer-methods)

- `get_customers()`
- `get_customers( $params = array( 'filter[created_at_min]' => '2013-12-01' ) )`
- `get_customer( $customer_id )`
- `get_customers_count()`
- `get_customer_orders( $customer_id )`

### Product methods

[](#product-methods)

- `get_products()`
- `get_products( $params = array( 'filter[created_at_min]' => '2013-12-01' ) )`
- `get_product( $product_id )`
- `get_products_count()`
- `get_product_reviews( $product_id )`

### Report methods

[](#report-methods)

- `get_reports()`
- `get_sales_report( $params = array( 'filter[start_date]' => '2013-12-01', 'filter[end_date]' => '2013-12-09' ) )`
- `get_top_sellers_report( $params = array( 'filter[limit]' = '10' ) )`

### Custom endpoints

[](#custom-endpoints)

If you extended the WooCommerce API with your own endpoints you can use the following function to get access to that data

- `make_custom_endpoint_call( $endpoint, $params = array(), $method = 'GET' )`

Changelog
---------

[](#changelog)

**version 0.3.1 - 2014-05-02**

- Fix parameter normalization issue with WC 2.1.7+

**version 0.3 - 2014-02-20**

- Add HTTP error messages on failed cURL calls

**version 0.2 - 2014-01-22**

- Add support for filters/params to endpoint functions
- Add new top sellers report endpoint function
- Add function to call custom endpoints

**version 0.1 - 2013-12-10**

- Initial release

Credit
------

[](#credit)

Copyright (c) 2013-2014 - [Gerhard Potgieter](http://gerhardpotgieter.com/)Released under the [GPL3 license](http://www.gnu.org/licenses/gpl-3.0.html)

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2967d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/997bb1402eafbc83ad54b767e1ff1245d9426e79ea437030834b573a4d775d57?d=identicon)[ivan.buttinoni](/maintainers/ivan.buttinoni)

---

Top Contributors

[![kloon](https://avatars.githubusercontent.com/u/271630?v=4)](https://github.com/kloon "kloon (10 commits)")[![neonics](https://avatars.githubusercontent.com/u/1395659?v=4)](https://github.com/neonics "neonics (5 commits)")[![maxrice](https://avatars.githubusercontent.com/u/1579862?v=4)](https://github.com/maxrice "maxrice (4 commits)")[![tillz](https://avatars.githubusercontent.com/u/1763875?v=4)](https://github.com/tillz "tillz (3 commits)")[![ivan-redooc](https://avatars.githubusercontent.com/u/11387801?v=4)](https://github.com/ivan-redooc "ivan-redooc (2 commits)")[![bicf](https://avatars.githubusercontent.com/u/478974?v=4)](https://github.com/bicf "bicf (2 commits)")[![claudiosanches](https://avatars.githubusercontent.com/u/1264099?v=4)](https://github.com/claudiosanches "claudiosanches (1 commits)")

### Embed Badge

![Health badge](/badges/redooc-woocommerce-api/health.svg)

```
[![Health](https://phpackages.com/badges/redooc-woocommerce-api/health.svg)](https://phpackages.com/packages/redooc-woocommerce-api)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
