This is for multisite support.    

    
    $is_active = in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) );
    
    if ( is_multisite() ) {
    	if ( ! function_exists( 'is_plugin_active_for_network' ) ) {
    		include_once ABSPATH . 'wp-admin/includes/plugin.php';
    	}
    	if ( function_exists( 'is_plugin_active_for_network' ) ) {
    		$is_active = is_plugin_active_for_network( 'woocommerce/woocommerce.php' ) || $is_active;
    	}
    }
    
    if ( $is_active ) {
    
    }