woocommerce.php 942 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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.4.5
  7. * Author: Automattic
  8. * Author URI: https://woocommerce.com
  9. * Text Domain: woocommerce
  10. * Domain Path: /i18n/languages/
  11. *
  12. * @package WooCommerce
  13. */
  14. if ( ! defined( 'ABSPATH' ) ) {
  15. exit; // Exit if accessed directly.
  16. }
  17. // Define WC_PLUGIN_FILE.
  18. if ( ! defined( 'WC_PLUGIN_FILE' ) ) {
  19. define( 'WC_PLUGIN_FILE', __FILE__ );
  20. }
  21. // Include the main WooCommerce class.
  22. if ( ! class_exists( 'WooCommerce' ) ) {
  23. include_once dirname( __FILE__ ) . '/includes/class-woocommerce.php';
  24. }
  25. /**
  26. * Main instance of WooCommerce.
  27. *
  28. * Returns the main instance of WC to prevent the need to use globals.
  29. *
  30. * @since 2.1
  31. * @return WooCommerce
  32. */
  33. function wc() {
  34. return WooCommerce::instance();
  35. }
  36. // Global for backwards compatibility.
  37. $GLOBALS['woocommerce'] = wc();