/** * Constructor */ public function __construct() { // Check if WC is activated if (!WC_Dependencies::woocommerce_active_check()) { add_action('admin_notices', array($this, 'notice_activate_wc')); } else { if (version_compare(WC_VERSION, '2.2.9', '<')) { add_action('admin_notices', array($this, 'notice_version_wc')); } else { $this->init(); } } }
function is_woocommerce_active() { return WC_Dependencies::woocommerce_active_check(); }