WooCommerce Code Reference

Search results

WC_Legacy_API

Legacy API.

Table of Contents

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

Constants

VERSION

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

string $VERSION = '3.1.0'

Properties

$authentication

REST API authentication class instance.

public WC_API_Authentication $authentication

Methods

add_query_vars()

Add new query vars.

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

Vars.

Tags
since
Return values
string[]

add_endpoint()

Add new endpoints.

public static add_endpoint( ) : mixed
Tags
since
Return values
mixed

handle_rest_api_requests()

Handle REST API requests.

public handle_rest_api_requests( ) : mixed
Tags
since
deprecated
Return values
mixed

includes()

Include required files for REST API request.

public includes( ) : mixed
Tags
since
deprecated
Return values
mixed

register_resources()

Register available API resources.

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

the REST server.

Tags
since
deprecated
Return values
mixed

handle_v1_rest_api_request()

Handle legacy v1 REST API requests.

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

handle_v2_rest_api_request()

Handle legacy v2 REST API requests.

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

rest_api_init()

Rest API Init.

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

rest_api_includes()

Include REST API classes.

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

register_rest_routes()

Register REST API routes.

public register_rest_routes( ) : mixed
Tags
deprecated
Return values
mixed
Back to the top