This commit is contained in:
Mike Jolley 2019-01-23 16:19:40 +00:00
parent 9cdcc3f1e5
commit a2f77ba7ec
1 changed files with 3 additions and 7 deletions

View File

@ -12,9 +12,7 @@
* @package WooCommerce * @package WooCommerce
*/ */
if ( ! defined( 'ABSPATH' ) ) { defined( 'ABSPATH' ) || exit;
exit; // Exit if accessed directly.
}
// Define WC_PLUGIN_FILE. // Define WC_PLUGIN_FILE.
if ( ! defined( 'WC_PLUGIN_FILE' ) ) { if ( ! defined( 'WC_PLUGIN_FILE' ) ) {
@ -27,14 +25,12 @@ if ( ! class_exists( 'WooCommerce' ) ) {
} }
/** /**
* Main instance of WooCommerce. * Returns the main instance of WC.
*
* Returns the main instance of WC to prevent the need to use globals.
* *
* @since 2.1 * @since 2.1
* @return WooCommerce * @return WooCommerce
*/ */
function WC() { function WC() { // phpcs:ignore
return WooCommerce::instance(); return WooCommerce::instance();
} }