@@ -2,8 +2,9 @@ |
||
2 | 2 | /** |
3 | 3 | * Functions used by plugins |
4 | 4 | */ |
5 | -if ( ! class_exists( 'WC_Dependencies' ) ) |
|
5 | +if ( ! class_exists( 'WC_Dependencies' ) ) { |
|
6 | 6 | require_once 'class-wc-dependencies.php'; |
7 | +} |
|
7 | 8 | |
8 | 9 | /** |
9 | 10 | * WC Detection |
@@ -12,13 +12,16 @@ |
||
12 | 12 | |
13 | 13 | self::$active_plugins = (array) get_option( 'active_plugins', array() ); |
14 | 14 | |
15 | - if ( is_multisite() ) |
|
16 | - self::$active_plugins = array_merge( self::$active_plugins, get_site_option( 'active_sitewide_plugins', array() ) ); |
|
15 | + if ( is_multisite() ) { |
|
16 | + self::$active_plugins = array_merge( self::$active_plugins, get_site_option( 'active_sitewide_plugins', array() ) ); |
|
17 | + } |
|
17 | 18 | } |
18 | 19 | |
19 | 20 | public static function woocommerce_active_check() { |
20 | 21 | |
21 | - if ( ! self::$active_plugins ) self::init(); |
|
22 | + if ( ! self::$active_plugins ) { |
|
23 | + self::init(); |
|
24 | + } |
|
22 | 25 | |
23 | 26 | return in_array( 'woocommerce/woocommerce.php', self::$active_plugins ) || array_key_exists( 'woocommerce/woocommerce.php', self::$active_plugins ); |
24 | 27 | } |