WooCommerce Code Reference

WC_Legacy_API
in package

Legacy API.

Table of Contents

VERSION  = '3.1.0'
This is the major version for the REST API and takes first-order position in endpoint URLs.
$authentication  : WC_API_Authentication
REST API authentication class instance.
$server  : WC_API_Server
The REST API server.
add_endpoint()  : mixed
Add new endpoints.
add_query_vars()  : string[]
Add new query vars.
handle_rest_api_requests()  : mixed
Handle REST API requests.
includes()  : mixed
Include required files for REST API request.
init()  : mixed
Init the legacy API.
register_resources()  : mixed
Register available API resources.
register_rest_routes()  : mixed
Register REST API routes.
rest_api_includes()  : mixed
Include REST API classes.
rest_api_init()  : mixed
Rest API Init.
handle_v1_rest_api_request()  : mixed
Handle legacy v1 REST API requests.
handle_v2_rest_api_request()  : mixed
Handle legacy v2 REST API requests.

Constants

VERSION

This is the major version for the REST API and takes first-order position in endpoint URLs.

public string VERSION = '3.1.0'
Tags
deprecated
2.6.0

Properties

Methods

add_query_vars()

Add new query vars.

public add_query_vars(array $vars) : string[]
Parameters
$vars : array

Vars.

Tags
since
2.0
Return values
string[]

register_resources()

Register available API resources.

public register_resources(WC_API_Server $server) : mixed
Parameters
$server : WC_API_Server

the REST server.

Tags
since
2.1
deprecated
2.6.0
Return values
mixed

rest_api_includes()

Include REST API classes.

public rest_api_includes() : mixed
Tags
deprecated
3.7.0
  • REST API clases autoload.
Return values
mixed

handle_v1_rest_api_request()

Handle legacy v1 REST API requests.

private handle_v1_rest_api_request() : mixed
Tags
since
2.2
deprecated
2.6.0
Return values
mixed

handle_v2_rest_api_request()

Handle legacy v2 REST API requests.

private handle_v2_rest_api_request() : mixed
Tags
since
2.4
deprecated
2.6.0
Return values
mixed