• Resolved davethedon

    (@davethedon)


    Hi,
    I just found out today that my client’s feeds have been missing the product_type attribute on one of our multisites in a 5-site network. They map the Rank Math Primary Category to this. So they put me to work to find out why.

    On line 2849 in class-get-products.php, you are performing this check:
    if ($this->woosea_is_plugin_active('seo-by-rank-math/rank-math.php')){

    And it returns false because on one of the 5 sites, it was not active individually but it is NETWORK active.

    public function woosea_is_plugin_active( $plugin ) {
    return in_array( $plugin, (array) get_option( 'active_plugins', array() ) );
    }


    This is almost identical to the WP core function is_plugin_active() except that it excludes the is_plugin_active_for_network() check, as below:

    function is_plugin_active( $plugin ) {
    return in_array( $plugin, (array) get_option( 'active_plugins', array() ), true ) || is_plugin_active_for_network( $plugin );
    }


    My question is, why did you create your own function to omit the network check? Network active IS active. This has caused a lot of problems for my client’s conversions.

    Full disclosure, my client has paid for an is using the ELITE version of the plugin, but it’s easier to post here and while I know you can’t perform support on the paid version on these forums, since the problem is the same in the free version, that should be a good enough reason to post it here.

    Best,
    Dave

    • This topic was modified 1 year, 8 months ago by davethedon.
    • This topic was modified 1 year, 8 months ago by davethedon.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Dave,

    Thanks for using our plugin and reaching out to us.

    Our plugin has never been made compatible with WordPress Multisite nor do we frequently receive requests to do so (which for us is the main driver to add new features and support for 3th party plugins).

    We should be able to add the network check, however this is no guarantee that that will make the entire plugin function properly on Multisite installs. In fact, we suspect there will also be issues with drop-downs not populating properly and JS/jQuery functions not all working.

    Thread Starter davethedon

    (@davethedon)

    Thanks for getting back to me. Never had a problem with the interface and the feeds all seem to work, so I think actively creating functions to discount multisites is counterproductive. For the most part, unless you need to create a plugin that encompasses multisites, coding a plugin for a single site should be enough unless you’re doing something within WordPress that’s hacky. WordPress Core itself knows how to handle multisites and WooCommerce too.

    If you’re not officially supporting multisites, maybe just go with the flow and say “your mileage may vary,” while also restoring the network active plugin check. ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Function woosea_is_plugin_active() Does Not Check Network Active Plugins’ is closed to new replies.