A look at woocommerce/wc-api-php: 543 stars on GitHub, written primarily in PHP. WooCommerce REST API PHP Library
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
A PHP wrapper for the WooCommerce REST API. Easily interact with the WooCommerce REST API securely using this library. If using a HTTPS connection this library uses BasicAuth, else it uses Oauth to provide a secure connection to WooCommerce.
Installation
composer require automattic/woocommerce
Getting started
Generate API credentials (Consumer Key & Consumer Secret) following this instructions http://docs.woocommerce.com/document/woocommerce-rest-api/
.
Check out the WooCommerce API endpoints and data that can be manipulated in https://woocommerce.github.io/woocommerce-rest-api-docs/.
Setup
Setup for the new WP REST API integration (WooCommerce 2.6 or later):
require __DIR__ . '/vendor/autoload.php';
use Automattic\WooCommerce\Client;
$woocommerce = new Client(
'http://example.com',
'ck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
'cs_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
[
'version' => 'wc/v3',
]
);
Client class
$woocommerce = new Client($url, $consumer_key, $consumer_secret, $options);
Options
Option
Type
Required
Description
url
string
yes
Your Store URL, example: http://woo.dev/
consumer_key
string
yes
Your API consumer key
consumer_secret
string
yes
Your API consumer secret
options
array
no
Extra arguments (see client options table)
Client options
Option
Type
Required
Description
version
string
no
API version, default is wc/v3
timeout
int
no
Request timeout, default is 15
verify_ssl
bool
no
Verify SSL when connect, use this option as false when need to test with self-signed certificates, default is true
follow_redirects
bool
no
Allow the API call to follow redirects
query_string_auth
bool
no
Force Basic Authentication as query string when true and using under HTTPS, default is false
oauth_timestamp
string
no
Custom oAuth timestamp, default is time()
oauth_only
bool
no
Only use oauth for requests, it will disable Basic Auth, default is false
user_agent
string
no
Custom user-agent, default is WooCommerce API Client-PHP
wp_api_prefix
string
no
Custom WP REST API URL prefix, used to support custom prefixes created with the rest_url_prefix filter
wp_api
bool
no
Set to false in order to use the legacy WooCommerce REST API (deprecated and not recommended)
method_override_query
bool
no
If true will mask all non-GET/POST methods by using POST method with added query parameter ?_method=METHOD into URL
method_override_header
bool
no
If true will mask all non-GET/POST methods (PUT/DELETE/etc.) by using POST method with added X-HTTP-Method-Override: METHOD HTTP header into request
TopGit's last sync did not record any GitHub topics for woocommerce/wc-api-php. GitHub topics appear in the right sidebar of a repository page; that's the authoritative place to check.
How active is development on woocommerce/wc-api-php?
The most recent commit recorded on woocommerce/wc-api-php was 1 month ago, based on the GitHub push timestamp. The repository has 156 forks — one of the better signals of community interest.
How many stars does woocommerce/wc-api-php have?
woocommerce/wc-api-php has 543 GitHub stars — refresh the page for the live number, or check github.com/woocommerce/wc-api-php. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
What language is woocommerce/wc-api-php written in?
woocommerce/wc-api-php is written primarily in PHP. GitHub's language field is based on the largest share of bytes in the default branch.
What license does woocommerce/wc-api-php use?
woocommerce/wc-api-php is released under the MIT license. Always verify the LICENSE file directly on GitHub for the authoritative terms — license strings can be edited out of sync with a project's actual stance.
Where can I see woocommerce/wc-api-php in action?
The project maintains a homepage at https://packagist.org/packages/automattic/woocommerce. The README tab on this page also usually contains screenshots and a quickstart.
Where do I read more about woocommerce/wc-api-php?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/woocommerce/wc-api-php is the definitive source.
Read full README in the tab above.
Want a second opinion on wc-api-php?
Ask an AI that can read this page — one click and you get its take on wc-api-php.