# routeapp/2.4.19/includes/class-wc-dependencies.php

Route ‑ Shipping Protection, version 2.4.19. 26 lines.

- Page: https://pluginprobe.com/plugins/routeapp/2.4.19/code/includes/class-wc-dependencies.php
- Raw: https://pluginprobe.com/plugins/routeapp/2.4.19/raw/includes/class-wc-dependencies.php
- Modified: 2019-08-29T20:53:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/routeapp/2.4.19/code/includes/class-wc-dependencies.php#L10-L20`.

```php
<?php
/**
 * WC Dependency Checker
 *
 * Checks if WooCommerce is enabled
 */
class WC_GST_Dependencies {

	private static $active_plugins;

	public static function init() {

		self::$active_plugins = (array) get_option( 'active_plugins', array() );

		if ( is_multisite() )
			self::$active_plugins = array_merge( self::$active_plugins, get_site_option( 'active_sitewide_plugins', array() ) );
	}

	public static function fn_woocommerce_active_check() {
		
		if ( ! self::$active_plugins ) self::init();
		return in_array( 'woocommerce/woocommerce.php', self::$active_plugins ) || array_key_exists( 'woocommerce/woocommerce.php', self::$active_plugins );
	}

}
?>
```
