woocommerce
Last commit date
assets
6 years ago
i18n
6 years ago
includes
6 years ago
packages
6 years ago
sample-data
7 years ago
src
6 years ago
templates
6 years ago
vendor
6 years ago
license.txt
6 years ago
readme.txt
6 years ago
uninstall.php
8 years ago
woocommerce.php
6 years ago
woocommerce.php
57 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Plugin Name: WooCommerce |
| 4 | * Plugin URI: https://woocommerce.com/ |
| 5 | * Description: An eCommerce toolkit that helps you sell anything. Beautifully. |
| 6 | * Version: 3.8.0-rc.2 |
| 7 | * Author: Automattic |
| 8 | * Author URI: https://woocommerce.com |
| 9 | * Text Domain: woocommerce |
| 10 | * Domain Path: /i18n/languages/ |
| 11 | * |
| 12 | * @package WooCommerce |
| 13 | */ |
| 14 | |
| 15 | defined( 'ABSPATH' ) || exit; |
| 16 | |
| 17 | if ( ! defined( 'WC_PLUGIN_FILE' ) ) { |
| 18 | define( 'WC_PLUGIN_FILE', __FILE__ ); |
| 19 | } |
| 20 | |
| 21 | /** |
| 22 | * Load core packages and the autoloader. |
| 23 | * |
| 24 | * The new packages and autoloader require PHP 5.6+. If this dependency is not met, do not include them. Users will be warned |
| 25 | * that they are using an older version of PHP. WooCommerce will continue to load, but some functionality such as the REST API |
| 26 | * and Blocks will be missing. |
| 27 | * |
| 28 | * This requirement will be enforced in future versions of WooCommerce. |
| 29 | */ |
| 30 | if ( version_compare( PHP_VERSION, '5.6.0', '>=' ) ) { |
| 31 | require __DIR__ . '/src/Autoloader.php'; |
| 32 | require __DIR__ . '/src/Packages.php'; |
| 33 | |
| 34 | if ( ! \Automattic\WooCommerce\Autoloader::init() ) { |
| 35 | return; |
| 36 | } |
| 37 | \Automattic\WooCommerce\Packages::init(); |
| 38 | } |
| 39 | |
| 40 | // Include the main WooCommerce class. |
| 41 | if ( ! class_exists( 'WooCommerce', false ) ) { |
| 42 | include_once dirname( __FILE__ ) . '/includes/class-woocommerce.php'; |
| 43 | } |
| 44 | |
| 45 | /** |
| 46 | * Returns the main instance of WC. |
| 47 | * |
| 48 | * @since 2.1 |
| 49 | * @return WooCommerce |
| 50 | */ |
| 51 | function WC() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid |
| 52 | return WooCommerce::instance(); |
| 53 | } |
| 54 | |
| 55 | // Global for backwards compatibility. |
| 56 | $GLOBALS['woocommerce'] = WC(); |
| 57 |