PHPackages                             wic/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. wic/woocommerce-api

ActiveLibrary[API Development](/categories/api)

wic/woocommerce-api
===================

A client library for the WooCommerce REST API

v0.3.1(10y ago)01.6k1GPL v3PHPPHP &gt;= 5.4.0

Since May 18Pushed 9y ago2 watchersCompare

[ Source](https://github.com/Web-In-Color/WooCommerce-REST-API-Client-Library)[ Packagist](https://packagist.org/packages/wic/woocommerce-api)[ RSS](/packages/wic-woocommerce-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (10)Used By (0)

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

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

About
-----

[](#about)

A PHP wrapper for the WooCommerce REST API. Easily interact with the WooCommerce REST API using this library.

Feedback and bug reports are appreciated, and fixed ASAP.

Installation
------------

[](#installation)

### Via Composer

[](#via-composer)

```
$ composer require wic/woocommerce-api
```

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

[](#requirements)

PHP 5.4.x cURL WooCommerce 2.2 at least on the store

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

[](#getting-started)

Generate API credentials (Consumer Key &amp; Consumer Secret) under WP Admin &gt; Your Profile.

Setup the library
-----------------

[](#setup-the-library)

```
use WIC/Client;

$options = array(
    'ssl_verify'      => false,
);

try {

	$client = new Client( 'http://your-store-url.com', $consumer_key, $consumer_secret, $options );

} catch ( ClientException $e ) {

	echo $e->getMessage() . PHP_EOL;
	echo $e->getCode() . PHP_EOL;

	if ( $e instanceof ClientHTTPException ) {

		print_r( $e->get_request() );
		print_r( $e->get_response() );
	}
}
```

### Options

[](#options)

- `debug` (default `false`) - set to `true` to add request/response information to the returned data. This is particularly useful for troubleshooting errors.
- `return_as_array` (default `false`) - all methods return data as a `stdClass` by default, but you can set this option to `true` to return data as an associative array instead.
- `validate_url` (default `false`) - set this to `true` to verify that the URL provided has a valid, parseable WC API index, and optionally force SSL when supported.
- `timeout` (default `30`) - set this to control the HTTP timeout for requests.
- `ssl_verify` (default `true`) - set this to `false` if you don't want to perform SSL peer verification for every request.

### Error handling

[](#error-handling)

Exceptions are thrown when errors are encountered, most will be instances of `ClientHTTPException` which has two additional methods, `get_request()` and `get_response()` -- these return the request and response objects to help with debugging.

Methods
-------

[](#methods)

### Index

[](#index)

- `$client->index->get()` - get the API index

### Orders

[](#orders)

- `$client->orders->get()` - get a list of orders
- `$client->orders->get( null, array( 'status' => 'completed' ) )` - get a list of completed orders
- `$client->orders->get( $order_id )` - get a single order

Credit
------

[](#credit)

Copyright (c) 2013-2015 - [Web In Color](http://www.webincolor.fr), [Gerhard Potgieter](http://gerhardpotgieter.com/), [Max Rice](http://maxrice.com) and other contributors

License
-------

[](#license)

Released under the [GPL3 license](http://www.gnu.org/licenses/gpl-3.0.html)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 51.7% of commits — single point of failure

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

Every ~22 days

Recently: every ~35 days

Total

8

Last Release

3861d ago

PHP version history (2 changes)v0.2.0PHP &gt;= 5.3.0

v0.3.0PHP &gt;= 5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/b73f89f70e0ea50c9bfde004f175254560827af822995a2b2b397ec92c2c8f44?d=identicon)[GaryPEGEOT-WIC](/maintainers/GaryPEGEOT-WIC)

---

Top Contributors

[![maxrice](https://avatars.githubusercontent.com/u/1579862?v=4)](https://github.com/maxrice "maxrice (31 commits)")[![GaryPEGEOT-WIC](https://avatars.githubusercontent.com/u/9263975?v=4)](https://github.com/GaryPEGEOT-WIC "GaryPEGEOT-WIC (12 commits)")[![kloon](https://avatars.githubusercontent.com/u/271630?v=4)](https://github.com/kloon "kloon (10 commits)")[![tillz](https://avatars.githubusercontent.com/u/1763875?v=4)](https://github.com/tillz "tillz (3 commits)")[![GaryPEGEOT](https://avatars.githubusercontent.com/u/8696117?v=4)](https://github.com/GaryPEGEOT "GaryPEGEOT (2 commits)")[![Jonathan-WIC](https://avatars.githubusercontent.com/u/9074996?v=4)](https://github.com/Jonathan-WIC "Jonathan-WIC (1 commits)")[![claudiosanches](https://avatars.githubusercontent.com/u/1264099?v=4)](https://github.com/claudiosanches "claudiosanches (1 commits)")

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/wic-woocommerce-api/health.svg)](https://phpackages.com/packages/wic-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)
