Multisite Compatibility Fix
-
It appears your have a condition that checks if WooCommerce is activated on the site, and deactivates this plugin if it is not. However, it seems you are only checking the current site and not if the WooCommerce plugin is activated Network-wide, which would include a subsite. Your condition currently looks like this:
if ( ! in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) { // deactive if woocommerce in not active
I recommend changing it to something like this:
if ( ! in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins'))) && ! array_key_exists('woocommerce/woocommerce.php', apply_filters('active_plugins', get_site_option('active_sitewide_plugins')))) { // deactive if woocommerce in not active
Thank you for the great plugin!
- The topic ‘Multisite Compatibility Fix’ is closed to new replies.