WC_Legacy_API::includes()publicWC 2.1

Deprecated from version 2.6.0. It is no longer supported and can be removed in future releases. It is recommended to replace this function with the same one.

Include required files for REST API request.

Method of the class: WC_Legacy_API{}

Hooks from the method

Return

null. Nothing (null).

Usage

$WC_Legacy_API = new WC_Legacy_API();
$WC_Legacy_API->includes();

Changelog

Since 2.1 Introduced.
Deprecated since 2.6.0

WC_Legacy_API::includes() code WC 8.7.0

public function includes() {

	// API server / response handlers.
	include_once dirname( __FILE__ ) . '/api/v3/class-wc-api-exception.php';
	include_once dirname( __FILE__ ) . '/api/v3/class-wc-api-server.php';
	include_once dirname( __FILE__ ) . '/api/v3/interface-wc-api-handler.php';
	include_once dirname( __FILE__ ) . '/api/v3/class-wc-api-json-handler.php';

	// Authentication.
	include_once dirname( __FILE__ ) . '/api/v3/class-wc-api-authentication.php';
	$this->authentication = new WC_API_Authentication();

	include_once dirname( __FILE__ ) . '/api/v3/class-wc-api-resource.php';
	include_once dirname( __FILE__ ) . '/api/v3/class-wc-api-coupons.php';
	include_once dirname( __FILE__ ) . '/api/v3/class-wc-api-customers.php';
	include_once dirname( __FILE__ ) . '/api/v3/class-wc-api-orders.php';
	include_once dirname( __FILE__ ) . '/api/v3/class-wc-api-products.php';
	include_once dirname( __FILE__ ) . '/api/v3/class-wc-api-reports.php';
	include_once dirname( __FILE__ ) . '/api/v3/class-wc-api-taxes.php';
	include_once dirname( __FILE__ ) . '/api/v3/class-wc-api-webhooks.php';

	// Allow plugins to load other response handlers or resource classes.
	do_action( 'woocommerce_api_loaded' );
}