[Support request] woocommerce module conflict

Home Forums Support [Support request] woocommerce module conflict

Home Forums Support woocommerce module conflict

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #936331
    Mitch Canton


    This is likely a somewhat specific issue, but I thought I would bring it up to see if you had any ideas.

    When I activate the ‘woocommerce’ module in GP+ it crashes my site. I figured out why.

    To further enhance performance and limit conflicts we use a fantastic plugin “Plugin Organizer” to selectively load specific resources on specific pages and post types. For example, we don’t load woocommerce on our calendar page or single events, or our About page, etc…

    However, this creates an issue as when we have GP+ woocommerce enabled, it will crash any page and post type that is not set to load woocommerce.

    To resolve this, I must either load woocommerce everywhere, even where it is not needed or desired. Or disable the GP+ woocommerce module.

    That all said, I guess the basis of my question is: Is there a performant way to only load the GP+ woocommerce module when the main woocommerce plugin is active on the page?


    Lead Developer
    Lead Developer

    Hi there,

    Our WooCommerce module only loads if WooCommerce is active. We check to see if it’s active by using the is_plugin_active() function provided by WordPress.

    It might be worth checking with the Plugin Organizer devs whether it’s possible to filter that function so WordPress itself thinks the plugin isn’t active on pages where it shouldn’t be.

    Mitch Canton

    Excellent. Sorry to assume it was your module at fault. It only started happening after I changed to the GP theme so I assumed – and you see what that got me. 🙂

    Have a great day.

    Lead Developer
    Lead Developer

    There might be something we can do better on our end – I’d like to hear what they say.

    Thanks! You too 🙂

    Mitch Canton

    Just to circle back on this, I received the following back from the Plugin Organizer dev.

    If that function is filtered it can cause issues. The plugin will be deactivated on the plugins page among other things. They could do a check to see if Plugin Organizer is active and use it’s function to determine if the plugin is actually being loaded on that page. There’s a function in the MU plugin they could use. If the $PluginOrganizerMU object exists then Plugin Organizer is filtering the plugin lists. Then inside of a function they just need to add this code to get the list of active plugins.

    global $PluginOrganizerMU;
    $pluginList = $PluginOrganizerMU->disable_plugins(get_option('active_plugins'), 0);

    $pluginList will then contain the array of active plugins. You could also add code to your themes functions.php file that will filter their code to get the list of active plugins.

    One of the key benefits of Plugin Organizer is the ability to selectively load plugins which prevents plugin conflicts and improves site performance. As is, to use the GP WC module, we will need to activate WC on every post, page, and CPT, even if it’s not being used there.

    Not sure if this is something that can be resolved, but I wanted to make mention.

    Our site performance has improved significantly since moving to GP last month (thank you!), I’d hate to lose some of those gains just to use the WC module.

    Thanks in advance for any consideration.

    Lead Developer
    Lead Developer

    Thanks for this! I’ll see what I can do 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.