Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/woocomme.../includes/rest-api
File: Package.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Deprecated notice: This class is deprecated as of version 4.5.0. WooCommerce API is now part of core and not packaged separately.
[2] Fix | Delete
*
[3] Fix | Delete
* Returns information about the package and handles init.
[4] Fix | Delete
*
[5] Fix | Delete
* @package WooCommerce\RestApi
[6] Fix | Delete
*/
[7] Fix | Delete
[8] Fix | Delete
namespace Automattic\WooCommerce\RestApi;
[9] Fix | Delete
[10] Fix | Delete
defined( 'ABSPATH' ) || exit;
[11] Fix | Delete
[12] Fix | Delete
/**
[13] Fix | Delete
* Main package class.
[14] Fix | Delete
*
[15] Fix | Delete
* @deprecated Use \Automattic\WooCommerce\RestApi\Server directly.
[16] Fix | Delete
*/
[17] Fix | Delete
class Package {
[18] Fix | Delete
[19] Fix | Delete
/**
[20] Fix | Delete
* Version.
[21] Fix | Delete
*
[22] Fix | Delete
* @deprecated since 4.5.0. This tracks WooCommerce version now.
[23] Fix | Delete
* @var string
[24] Fix | Delete
*/
[25] Fix | Delete
const VERSION = WC_VERSION;
[26] Fix | Delete
[27] Fix | Delete
/**
[28] Fix | Delete
* Init the package - load the REST API Server class.
[29] Fix | Delete
*
[30] Fix | Delete
* @deprecated since 4.5.0. Directly call Automattic\WooCommerce\RestApi\Server::instance()->init()
[31] Fix | Delete
*/
[32] Fix | Delete
public static function init() {
[33] Fix | Delete
wc_deprecated_function( 'Automattic\WooCommerce\RestApi\Server::instance()->init()', '4.5.0' );
[34] Fix | Delete
\Automattic\WooCommerce\RestApi\Server::instance()->init();
[35] Fix | Delete
}
[36] Fix | Delete
[37] Fix | Delete
/**
[38] Fix | Delete
* Return the version of the package.
[39] Fix | Delete
*
[40] Fix | Delete
* @deprecated since 4.5.0. This tracks WooCommerce version now.
[41] Fix | Delete
* @return string
[42] Fix | Delete
*/
[43] Fix | Delete
public static function get_version() {
[44] Fix | Delete
wc_deprecated_function( 'WC()->version', '4.5.0' );
[45] Fix | Delete
return WC()->version;
[46] Fix | Delete
}
[47] Fix | Delete
[48] Fix | Delete
/**
[49] Fix | Delete
* Return the path to the package.
[50] Fix | Delete
*
[51] Fix | Delete
* @deprecated since 4.5.0. Directly call Automattic\WooCommerce\RestApi\Server::get_path()
[52] Fix | Delete
* @return string
[53] Fix | Delete
*/
[54] Fix | Delete
public static function get_path() {
[55] Fix | Delete
wc_deprecated_function( 'Automattic\WooCommerce\RestApi\Server::get_path()', '4.5.0' );
[56] Fix | Delete
return \Automattic\WooCommerce\RestApi\Server::get_path();
[57] Fix | Delete
}
[58] Fix | Delete
}
[59] Fix | Delete
[60] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function