WC_API::get_rest_api_package_path() public WC 3.7.0
Get the version of the REST API package being ran.
{} Это метод класса: WC_API{}
Хуков нет.
Возвращает
Строку.
Использование
$WC_API = new WC_API(); $WC_API->get_rest_api_package_path();
Список изменений
С версии 3.7.0 | Введена. |
Код WC_API::get_rest_api_package_path() WC API::get rest api package path WC 5.0.0
public function get_rest_api_package_path() {
if ( ! $this->is_rest_api_loaded() ) {
return null;
}
if ( method_exists( \Automattic\WooCommerce\RestApi\Server::class, 'get_path' ) ) {
// We are loading API from included version.
return \Automattic\WooCommerce\RestApi\Server::get_path();
}
// We are loading API from external plugin.
return \Automattic\WooCommerce\RestApi\Package::get_path();
}