Automattic\WooCommerce\RestApi
Package{}
Устарела. Больше не поддерживается и может быть удалена. Используйте
\Automattic\WooCommerce\RestApi\Server directly.Main package class.
Хуков нет.
Использование
$Package = new Package(); // use class methods
Методы
- public static init()
- public static get_path()
- public static get_version()
- public wc_deprecated_function( 'Automattic\WooCommerce\RestApi\Server::instance()->init()', '4.5.0' )
- ERROR: no method name found on line `*`
- ERROR: no method name found on line ``
- ERROR: no method name found on line ``
- ERROR: no method name found on line ``
- ERROR: no method name found on line ``
- ERROR: no method name found on line ``
- ERROR: no method name found on line ``
- ERROR: no method name found on line ``
- ERROR: no method name found on line ``
- ERROR: no method name found on line `}`
- ERROR: no method name found on line ``
- ERROR: no method name found on line ``
- ERROR: no method name found on line `*`
- ERROR: no method name found on line ``
- ERROR: no method name found on line `*`
- ERROR: no method name found on line `/**`
- ERROR: no method name found on line ``
- ERROR: no method name found on line ``
- ERROR: no method name found on line ``
- ERROR: no method name found on line `* @return string`
- ERROR: no method name found on line ``
- ERROR: no method name found on line `* Init the package - load the REST API Server class.`
- ERROR: no method name found on line ``
- ERROR: no method name found on line ``
- ERROR: no method name found on line `* @return string`
- ERROR: no method name found on line ``
- ERROR: no method name found on line ``
- ERROR: no method name found on line ``
- ERROR: no method name found on line ``
- ERROR: no method name found on line ``
Список изменений
| Устарела | Use \Automattic\WooCommerce\RestApi\Server directly. |
Код Package{} Package{} WC 11.3.0
class Package {
/**
* Version.
*
* @deprecated since 4.5.0. This tracks WooCommerce version now.
* @var string
*/
const VERSION = WC_VERSION;
/**
* Init the package - load the REST API Server class.
*
* @deprecated since 4.5.0. Directly call Automattic\WooCommerce\RestApi\Server::instance()->init()
*/
public static function init() {
wc_deprecated_function( 'Automattic\WooCommerce\RestApi\Server::instance()->init()', '4.5.0' );
\Automattic\WooCommerce\RestApi\Server::instance()->init();
}
/**
* Return the version of the package.
*
* @deprecated since 4.5.0. This tracks WooCommerce version now.
* @return string
*/
public static function get_version() {
wc_deprecated_function( 'WC()->version', '4.5.0' );
return WC()->version;
}
/**
* Return the path to the package.
*
* @deprecated since 4.5.0. Directly call Automattic\WooCommerce\RestApi\Server::get_path()
* @return string
*/
public static function get_path() {
wc_deprecated_function( 'Automattic\WooCommerce\RestApi\Server::get_path()', '4.5.0' );
return \Automattic\WooCommerce\RestApi\Server::get_path();
}
}