woocommerce
Last commit date
assets
5 years ago
i18n
5 years ago
includes
5 years ago
packages
5 years ago
sample-data
5 years ago
src
5 years ago
templates
5 years ago
vendor
5 years ago
license.txt
5 years ago
readme.txt
5 years ago
uninstall.php
5 years ago
woocommerce.php
5 years ago
woocommerce.php
49 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: 4.3.3 |
| 7 | * Author: Automattic |
| 8 | * Author URI: https://woocommerce.com |
| 9 | * Text Domain: woocommerce |
| 10 | * Domain Path: /i18n/languages/ |
| 11 | * Requires at least: 5.2 |
| 12 | * Requires PHP: 7.0 |
| 13 | * |
| 14 | * @package WooCommerce |
| 15 | */ |
| 16 | |
| 17 | defined( 'ABSPATH' ) || exit; |
| 18 | |
| 19 | if ( ! defined( 'WC_PLUGIN_FILE' ) ) { |
| 20 | define( 'WC_PLUGIN_FILE', __FILE__ ); |
| 21 | } |
| 22 | |
| 23 | // Load core packages and the autoloader. |
| 24 | require __DIR__ . '/src/Autoloader.php'; |
| 25 | require __DIR__ . '/src/Packages.php'; |
| 26 | |
| 27 | if ( ! \Automattic\WooCommerce\Autoloader::init() ) { |
| 28 | return; |
| 29 | } |
| 30 | \Automattic\WooCommerce\Packages::init(); |
| 31 | |
| 32 | // Include the main WooCommerce class. |
| 33 | if ( ! class_exists( 'WooCommerce', false ) ) { |
| 34 | include_once dirname( WC_PLUGIN_FILE ) . '/includes/class-woocommerce.php'; |
| 35 | } |
| 36 | |
| 37 | /** |
| 38 | * Returns the main instance of WC. |
| 39 | * |
| 40 | * @since 2.1 |
| 41 | * @return WooCommerce |
| 42 | */ |
| 43 | function WC() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid |
| 44 | return WooCommerce::instance(); |
| 45 | } |
| 46 | |
| 47 | // Global for backwards compatibility. |
| 48 | $GLOBALS['woocommerce'] = WC(); |
| 49 |