Download the PHP package wic/woocommerce-api without Composer
On this page you can find all versions of the php package wic/woocommerce-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wic/woocommerce-api
More information about wic/woocommerce-api
Files in wic/woocommerce-api
Package woocommerce-api
Short Description A client library for the WooCommerce REST API
License GPL v3
Informations about the package woocommerce-api
WooCommerce REST API PHP Client Library
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
Via Composer
Requirements
PHP 5.4.x cURL WooCommerce 2.2 at least on the store
Getting started
Generate API credentials (Consumer Key & Consumer Secret) under WP Admin > Your Profile.
Setup the library
Options
-
debug
(defaultfalse
) - set totrue
to add request/response information to the returned data. This is particularly useful for troubleshooting errors. -
return_as_array
(defaultfalse
) - all methods return data as astdClass
by default, but you can set this option totrue
to return data as an associative array instead. -
validate_url
(defaultfalse
) - set this totrue
to verify that the URL provided has a valid, parseable WC API index, and optionally force SSL when supported. -
timeout
(default30
) - set this to control the HTTP timeout for requests. ssl_verify
(defaulttrue
) - set this tofalse
if you don't want to perform SSL peer verification for every request.
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
Index
$client->index->get()
- get the API index
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
Copyright (c) 2013-2015 - Web In Color, Gerhard Potgieter, Max Rice and other contributors
License
Released under the GPL3 license
All versions of woocommerce-api with dependencies
ext-curl Version *
ext-json Version *