wcpgsk_is_woocommerce_active

The Woocommerce Poor Guys Swiss Knife wcpgsk is woocommerce active function.

Description

wcpgsk_is_woocommerce_active(); 

Usage

  1. if ( !function_exists( 'wcpgsk_is_woocommerce_active' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-poor-guys-swiss-knife/woocommerce-poor-guys-swiss-knife.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wcpgsk_is_woocommerce_active(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/woocommerce-poor-guys-swiss-knife.php  
  1. function wcpgsk_is_woocommerce_active() { 
  2. $active_plugins = (array) get_option( 'active_plugins', array() ); 
  3. if ( is_multisite() ) 
  4. $active_plugins = array_merge( $active_plugins, get_site_option( 'active_sitewide_plugins', array() ) ); 
  5. return in_array( 'woocommerce/woocommerce.php', $active_plugins ) || array_key_exists( 'woocommerce/woocommerce.php', $active_plugins );