woocommerce/includes/api/src/Package.php

49 lines
759 B
PHP
Raw Normal View History

2019-06-21 18:58:20 +00:00
<?php
/**
* Returns information about the package and handles init.
*
* @package Automattic/WooCommerce/RestApi
*/
namespace Automattic\WooCommerce\RestApi;
defined( 'ABSPATH' ) || exit;
/**
* Main package class.
*/
class Package {
/**
* Version.
*
* @var string
*/
2020-07-27 10:24:46 +00:00
const VERSION = WC_VERSION;
2019-06-21 18:58:20 +00:00
/**
* Init the package - load the REST API Server class.
*/
public static function init() {
\Automattic\WooCommerce\RestApi\Server::instance()->init();
}
/**
* Return the version of the package.
*
* @return string
*/
public static function get_version() {
return self::VERSION;
}
/**
* Return the path to the package.
*
* @return string
*/
public static function get_path() {
return dirname( __DIR__ );
}
}