Skip to content
Snippets Groups Projects
Commit df90aafa authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Prevent error by making sure the is_plugin_active_for_network function is loaded

parent 355019ac
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,9 @@ if ( ! defined( 'ABSPATH' ) ) {
* Check if WooCommerce is active
**/
function oton_is_wc_active() {
if ( ! function_exists( 'is_plugin_active_for_network' ) ) {
require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
}
return
in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) )
||
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment