PluginProbe
Route ‑ Shipping Protection / 2.2.5
Route ‑ Shipping Protection v2.2.5
2.4.17 2.4.16 2.4.15 2.4.14 2.4.13 2.4.12 2.4.11 2.4.10 2.4.9 2.4.8 2.4.7 2.4.6 2.4.5 2.4.4 2.4.3 2.4.2 2.2.4 2.2.5 2.2.6 2.2.8 2.2.9 2.3.0 2.3.1 2.3.2 2.3.3 All 151 releases
routeapp / includes / class-wc-dependencies.php

class-wc-dependencies.php in Route ‑ Shipping Protection 2.2.5, at includes/class-wc-dependencies.php

26 lines 689 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * WC Dependency Checker
4 *
5 * Checks if WooCommerce is enabled
6 */
7 class WC_GST_Dependencies {
8
9 private static $active_plugins;
10
11 public static function init() {
12
13 self::$active_plugins = (array) get_option( 'active_plugins', array() );
14
15 if ( is_multisite() )
16 self::$active_plugins = array_merge( self::$active_plugins, get_site_option( 'active_sitewide_plugins', array() ) );
17 }
18
19 public static function fn_woocommerce_active_check() {
20
21 if ( ! self::$active_plugins ) self::init();
22 return in_array( 'woocommerce/woocommerce.php', self::$active_plugins ) || array_key_exists( 'woocommerce/woocommerce.php', self::$active_plugins );
23 }
24
25 }
26 ?>