0

We have a multi-site set up, but for some reason Payzone will not show up as a payment method. It seems to affect only multi-sites because if I install it onto a regulard WordPress/WooCommerce site it shows up perfectly fine.

So does anyone know how do I go about fixing this, or at least figuring out why it won't work on a multi-site? Is there something I am missing?

1
  • 1
    It could be that the plugin doesn't check if WooCommerce is activated on a multi-site. Take a look in the main plugin file where the core files are supposed to be loaded. WordPress has a function that can check for multi-sites: codex.wordpress.org/Function_Reference/…
    – Rustom
    Commented Jul 2, 2018 at 15:33

1 Answer 1

1

As Rustom mentioned, the plugin isn't checking if this Multisite is activated - you can add a check in for multisite, add the below in the plugin registration file, just below the existing active check functions.

 if(!function_exists('is_plugin_active_for_network')){
        require_once(ABSPATH .'/wp-admin/includes/plugin.php');
            if(is_multisite() && 
    is_plugin_active_for_network('woocommerce/woocommerce.php')){//check if multisite and check 
           /** add in the functions from inside the current active check. **/
        }
    }
2
  • 1
    This looks right. I'd also recommend reaching out to the plugin author and reporting this as a bug. If the solution in this answer works, maybe send it to them in the report as well in hopes they can include it in the code as an update. If the plugin author chooses not to fix the issue you will need to re-add the code yourself after every update.
    – DaveLak
    Commented Jul 2, 2018 at 23:29
  • I originally reached out to them last week, and was on the phone to them yesterday to see if they could get a fix in. They've sent me an updated version today and looks similar to this answer. So maybe this is one of their developers, or maybe they found this and added it. Either way, I'm happy they've updated their code. Means less likely to break in future.
    – hazrpg
    Commented Jul 3, 2018 at 9:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.