Woo-poly-integration: Multisite compatibility

Created on 27 Sep 2016  ·  6Comments  ·  Source: hyyan/woo-poly-integration

Can you provide multisite integration?

enhancement help wanted

All 6 comments

@ngrudev Sure , thanks for the suggestion , we will work on that in the next releases @decarvalhoaa

Hi @hyyan

I have not worked with multisite and i'm unsure what needs to be added/changed to support it.Need your help on this.

I have seen you have added the multisite check in the dependencies check here. What else needs to be considered?

Hi, i recently face an issue with your plugins. I had a particular case, in a multisite i had a single site where i need the woo-poly-integration, it show me a message where notify woo and poly is not active, and are active in the child site. Conclusion the woo-poly-integration only check if the requirement are active in the entire network, and it is not a definitive case. If is possible to take in count to next release to improve the initial validation. Thanks, you are doing a great works.

@gfirem thank you for valuable feedback , I am already aware of this actually , I think the current problem is that woopoly checks if multisite is active then it searchs the multisite plugins only with no fall back for current site active plugins .

I do not know if this is a problem for you now , but I guess the following could be a temp solution until next release

Naviaget to Plugin.php file , line 75 and change the canActivate method to become :

   public static function canActivate()
    {
        $polylang = false;
        $woocommerce = false;
        /* check polylang plugin  * */
        if (
            (
                is_plugin_active('polylang/polylang.php') ||
                is_plugin_active('polylang-pro/polylang.php')
            ) ||
            (
                is_plugin_active_for_network('polylang/polylang.php') ||
                is_plugin_active_for_network('polylang-pro/polylang.php')
            )
        ) {
            $polylang = true;
        }
        /* check woocommerce plugin * */
        if (
               is_plugin_active('woocommerce/woocommerce.php') ||
               is_plugin_active_for_network('woocommerce/woocommerce.php') 
          ) {
            $woocommerce = true;
        }
        return $polylang && $woocommerce;
    }

Thanks

@hyyan I have encountered exactly the same problem.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Jon007 picture Jon007  ·  19Comments

Magneticdud picture Magneticdud  ·  5Comments

Jon007 picture Jon007  ·  4Comments

theblackhole picture theblackhole  ·  4Comments

dmytro-kindrat picture dmytro-kindrat  ·  14Comments