WC_API::is_rest_api_loaded()protectedWC 3.7.0

Return if the rest API classes were already loaded.

Method of the class: WC_API{}

No Hooks.

Return

true|false.

Usage

// protected - for code of main (parent) or child class
$result = $this->is_rest_api_loaded();

Changelog

Since 3.7.0 Introduced.

WC_API::is_rest_api_loaded() code WC 8.7.0

protected function is_rest_api_loaded() {
	return class_exists( '\Automattic\WooCommerce\RestApi\Server', false );
}