• I used this plugin in multisite but it always show error regarding wocommerce version,

    So i debug the code and find that the code

    if ( !in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
    
     add_action( 'admin_notices', 'wppc_fail_woocommers' ); } else { 
    
    require_once __DIR__ . '/vendor/autoload.php';
    
     \Pelecardwc\Plugin::instance();
    
    }

    So even wocommerce is active and version is greater then 3, Still show error.

    So i tired my end and fix the issue

    if(is_plugin_active('woocommerce/woocommerce.php')){
    		require_once __DIR__ . '/vendor/autoload.php';
    		\Pelecardwc\Plugin::instance();
    	}else{
    		add_action( 'admin_notices', 'wppc_fail_woocommers' );
    	}

    So you can test the code and update in next version.

    Thanks

  • The topic ‘[NSFW] issue in multisite to check is Wocommerce is activated or not’ is closed to new replies.