PHP Class WC_API

ファイルを表示 Open project: woocommerce/woocommerce Class Usage Examples

Public Methods

Method Description
__construct ( ) Setup class.
add_endpoint ( ) WC API for payment gateway IPNs, etc.
add_query_vars ( array $vars ) : string[] Add new query vars.
handle_api_requests ( ) API request - Trigger any API requests.
register_rest_routes ( ) Register REST API routes.
register_wp_admin_settings ( ) Register WC settings from WP-API to the REST API.

Private Methods

Method Description
rest_api_includes ( ) Include REST API classes.
rest_api_init ( ) Init WP REST API.

Method Details

__construct() public method

Setup class.
Since: 2.0
public __construct ( )

add_endpoint() public static method

WC API for payment gateway IPNs, etc.
Since: 2.0
public static add_endpoint ( )

add_query_vars() public method

Add new query vars.
Since: 2.0
public add_query_vars ( array $vars ) : string[]
$vars array
return string[]

handle_api_requests() public method

API request - Trigger any API requests.
Since: 2.0
public handle_api_requests ( )

register_rest_routes() public method

Register REST API routes.
Since: 2.6.0

register_wp_admin_settings() public method

Register WC settings from WP-API to the REST API.
Since: 2.7.0