Function woosea_is_plugin_active() Does Not Check Network Active Plugins
-
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
- The topic ‘Function woosea_is_plugin_active() Does Not Check Network Active Plugins’ is closed to new replies.