A customizable, open-source ecommerce platform built on WordPress. Build any commerce solution you can imagine.
Go to file
Mike Jolley 237d80f3f2 Implement autoloader with psr-4 class naming 2019-05-22 13:24:03 +01:00
src Implement autoloader with psr-4 class naming 2019-05-22 13:24:03 +01:00
.editorconfig Test version - api copied from core with loader 2019-05-10 17:56:07 +01:00
.gitignore Test version - api copied from core with loader 2019-05-10 17:56:07 +01:00
README.md Naming improvements 2019-05-10 23:33:12 +01:00
composer.json Implement autoloader with psr-4 class naming 2019-05-22 13:24:03 +01:00
phpcs.xml Naming improvements 2019-05-10 23:33:12 +01:00
woocommerce-rest-api.php Implement autoloader with psr-4 class naming 2019-05-22 13:24:03 +01:00

README.md

title
WooCommerce REST API

WooCommerce REST API

This repository houses the WooCommerce REST API found in the core WooCommerce plugin.

It can also be used as a standalone plugin (it still requires WooCommerce!), or can be pulled into other projects and feature plugins that need new API features that are not yet in the core release.

Once stable, changes in woocommerce-rest-api are brought over to WooCommerce core when they are ready for release.

Endpoint namespaces

  • Current stable WC REST API version: wc/v3 - Docs
  • WC Blocks REST API version (internal use only): wc-blocks/v1
  • Older versions:

Contributing

Please read the WooCommerce contributor guidelines for more information how you can contribute.

Endpoints are located in the includes/ directory. Endpoints currently inherit from the stable version of the endpoint. If you need to change the behavior of an endpoint, you can do so in these classes.

phpunit tests for the API are located in the tests/unit-tests/ folder and are also merged and shipped with WooCommerce core. You can use the same helpers/framework files that core uses, or introduce new ones.

Run tests using phpunit in the root of this folder. Code coverage reports can be ran with phpunit --coverage-html /tmp/coverage.

Translation

For strings located in API endpoints, use woocommerce as your text-domain. These endpoints will at some point be merged back into WooCommerce Core.