WordPress at a glance
class is not described

Automattic\WooCommerce\RestApi

Package{} WC 1.0

Deprecated. It is no longer supported and can be removed in future releases. Use \Automattic\WooCommerce\RestApi\Server directly instead.

Main package class.

No Hooks.

Return

null. Nothing.

Usage

$Package = new Package();
// use class methods

Methods

  1. ERROR: no method name found on line ` */`
  2. ERROR: no method name found on line ``
  3. ERROR: no method name found on line ``
  4. ERROR: no method name found on line ``
  5. ERROR: no method name found on line ``
  6. ERROR: no method name found on line ``
  7. instance()->init()
  8. get_path()
  9. ERROR: no method name found on line ``
  10. ERROR: no method name found on line ` }`
  11. ERROR: no method name found on line ``
  12. ERROR: no method name found on line ``
  13. ERROR: no method name found on line ``
  14. ERROR: no method name found on line ` */`
  15. ERROR: no method name found on line ` /**`
  16. get_version()
  17. init()
  18. ERROR: no method name found on line ` *`
  19. ERROR: no method name found on line ` }`
  20. ERROR: no method name found on line ``
  21. ERROR: no method name found on line ``
  22. ERROR: no method name found on line ``
  23. ERROR: no method name found on line ``
  24. ERROR: no method name found on line ``
  25. ERROR: no method name found on line ``
  26. ERROR: no method name found on line ``

Changelog

Deprecated Use \Automattic\WooCommerce\RestApi\Server directly.

Code of Package{} WC 5.2.2

<?php
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();
	}
}