The initial check "in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) )" does not work in a multisite installation.
It must be enough checking if WC_Payment_Gateway class exists in order to know if WooCommerce is active.
The initial check "in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) )" does not work in a multisite installation.
It must be enough checking if WC_Payment_Gateway class exists in order to know if WooCommerce is active.
Best regards!