A customizable, open-source ecommerce platform built on WordPress. Build any commerce solution you can imagine.
Go to file
Mike Jolley 1a98d24b38 More abstract methods 2019-06-13 16:54:53 +01:00
src More abstract methods 2019-06-13 16:54:53 +01:00
unit-tests CS 2019-06-13 16:11:59 +01:00
.editorconfig Test version - api copied from core with loader 2019-05-10 17:56:07 +01:00
.gitattributes gitattributes 2019-05-22 17:23:41 +01:00
.gitignore Force use of autoloader 2019-06-12 18:47:35 +01:00
.scrutinizer.yml config 2019-06-13 13:28:08 +01:00
.travis.yml config 2019-06-11 11:41:21 +01:00
README.md Fix badge url 2019-06-10 17:20:37 +01:00
classmap.php New autoloader 2019-06-12 20:47:46 +01:00
classmap.php.bak Update composer script 2019-06-13 11:37:56 +01:00
composer.json Update composer script 2019-06-13 11:37:56 +01:00
composer.lock New autoloader 2019-06-12 20:47:46 +01:00
init.php New autoloader 2019-06-12 20:47:46 +01:00
phpcs.xml Customers 2019-05-30 12:08:49 +01:00
phpunit.xml phpunit 2019-06-11 10:40:24 +01:00
version.php Namespace and structure improvements 2019-06-12 13:09:20 +01:00
woocommerce-rest-api.php Pass directory when registering package 2019-06-13 10:57:16 +01:00

README.md

WooCommerce REST API

license Latest Stable Version Build Status Scrutinizer Code Quality

This repository is home to the WooCommerce REST API package.

The stable version of this package is bundled with WooCommerce core releases, but it can also be used as a standalone plugin so bleeding-edge API features can be tested or used by other feature plugins.

Using this repo

After checking out the code, you'll need to run composer install in it's root directory to install dependencies and to enable the autoloader.

Using this package

This package is hosted on Packagist and can be included using composer.json:

"require": {
    "woocommerce/woocommerce-rest-api": "1.0.0"
},

Since multiple versions of this package may be included at the same time, WooCommerce handles loading only the latest version by using a special loader.

After including the package and installing dependencies, include the main woocommerce-rest-api.php file in your code:

include 'vendor/woocommerce-rest-api/woocommerce-rest-api.php';

This will register the version of the package with WooCommerce and make it available after the woocommerce_loaded hook is fired.

API documentation

Versions

Namespace Status Docs
wc/v4 Development Link
wc/v3 Stable Link
wc/v2 Deprecated - October 2020 Link
wc/v1 Deprecated - April 2019 Link

Note: API Versions are kept around for 2 years after being replaced, and may be removed in the next major version after that date passes.

Contributing

Please read the WooCommerce contributor guidelines for more information how you can contribute to WooCommerce, and the REST API contribution documentation here.

Within this package, namespaces and endpoint classes are located within the src/RestAPI/ directory. If you need to change the behavior of an endpoint, you can do so in these classes.

Run tests using phpunit in the root of the package. All pull-requests must pass unit tests in order to be accepted.

Translation

For strings located in API endpoints, use woocommerce as your text-domain. These endpoints will be translated in the WooCommerce Core PO/MO files.