Plugin Directory

Changeset 2404451


Ignore:
Timestamp:
10/22/2020 08:34:55 AM (5 years ago)
Author:
hqtheme
Message:

Fix Marmot theme dashboard redirect dependency

Location:
hq-widgets-for-elementor
Files:
12 added
64 edited
1 copied

Legend:

Unmodified
Added
Removed
  • hq-widgets-for-elementor/tags/1.0.3/hq-widgets-for-elementor.php

    r2400865 r2404451  
    55 * Plugin URI:        https://marmot.hqwebs.net/hq-widgets-for-elementor/?utm_source=wp-admin&utm_medium=link&utm_campaign=default&utm_term=hq-widgets-for-elementor&utm_content=plugin-uri
    66 * Description:       The HQ Widgets for Elementor is an elementor addons package for Elementor page builder plugin for WordPress. Works Best with Marmot theme
    7  * Version:           1.0.2
     7 * Version:           1.0.3
    88 * Requires at least: 5.3
    99 * Requires PHP:      7.2
     
    6262 * @var string
    6363 */
    64 const VERSION = '1.0.2';
     64const VERSION = '1.0.3';
    6565
    6666// Load Autoloader
     
    141141            Admin\Admin_Settings::instance();
    142142        }
    143        
     143
    144144        /**
    145145         * Regenerate css in debug mode
     
    197197
    198198        // Redirect to dashboard after plugin activation
    199         if (is_plugin_active('hqtheme-extra/hqtheme-extra.php') && is_plugin_active('elementor/elementor.php')) {
     199        if (
     200                defined('\HQExtra\VERSION') &&
     201                defined('\ELEMENTOR_VERSION') &&
     202                !Dependencies::is_theme_active()
     203        ) {
    200204            set_transient(PLUGIN_SLUG . '_activation_redirect', true, MINUTE_IN_SECONDS);
    201205        }
     
    335339}
    336340
    337 /**
    338  * Checks if plugin is active
    339  *
    340  * @since 1.0.0
    341  *
    342  * @param string $plugin Plugin activation string
    343  * @return bool
    344  */
    345 function is_plugin_active($plugin) {
    346     return in_array($plugin, (array) \get_option('active_plugins', [])) || is_plugin_active_for_network($plugin);
    347 }
    348 
    349 /**
    350  * Checks if plugin is active for network
    351  *
    352  * @since 1.0.0
    353  *
    354  * @param string $plugin Plugin activation string
    355  * @return bool
    356  */
    357 function is_plugin_active_for_network($plugin) {
    358     if (!is_multisite()) {
    359         return false;
    360     }
    361 
    362     $plugins = get_site_option('active_sitewide_plugins');
    363     if (isset($plugins[$plugin])) {
    364         return true;
    365     }
    366 
    367     return false;
    368 }
    369 
    370341// Run Plugin
    371342HQ_Widgets_For_Elementor::instance();
  • hq-widgets-for-elementor/tags/1.0.3/inc/admin/admin-settings.php

    r2400865 r2404451  
    305305            </div>
    306306        </div>
     307        <?php /* Theme presentaion */ ?>
     308        <div class="hqt-row mt-3">
     309            <div class="hqt-col-1-2__md">
     310                <h3 class="my-1 mb-2"><?php _ex('HQ Widgets for Elementor Recommends Marmot Theme', 'admin', 'marmot'); ?></h3>               
     311                <div class="hqt-logo-wrap">
     312                    <a href="https://marmot.hqwebs.net/?utm_source=wp-admin&utm_medium=logo&utm_campaign=default&utm_content=hqwidgets" target="_blank">
     313                        <img src="<?php echo PLUGIN_URL; ?>/assets/images/admin/logo-marmot.png">
     314                    </a>
     315                </div>
     316
     317                <h2 class="mt-6 mb-0 text-medium"><?php _ex('Fully customizable WordPress theme', 'admin', 'marmot'); ?></h2>
     318                <ul class="hqt-list list-dot my-3">
     319                    <li><?php _ex('The most flexible theme for Elementor page builder fans', 'admin', 'marmot'); ?></li>
     320                    <li><?php _ex('Professionally ready to use demos right behind a click', 'admin', 'marmot'); ?></li>
     321                    <li><?php _ex('Fast and light - Marmot theme is made for speed', 'admin', 'marmot'); ?></li>
     322                </ul>
     323                <div class="mt-5">
     324                    <a href="https://marmot.hqwebs.net/ready-demos/?utm_source=wp-admin&utm_medium=link&utm_campaign=default&utm_content=learn-more" class="btn btn-border ml-2 mr-1"><?php _ex('View Demos', 'admin', 'marmot'); ?></a>
     325                    <a target="_blank" href="https://marmot.hqwebs.net/?utm_source=wp-admin&utm_medium=link&utm_campaign=default&utm_content=learn-more" ><?php _ex('Learn More', 'admin', 'marmot'); ?></a>
     326                </div>
     327            </div>
     328            <div class="hqt-col-1-2__md d-flex align-items-center">
     329                <img src="<?php echo PLUGIN_URL; ?>/assets/images/admin/dashboard-theme.png" class="img-fluid">
     330            </div>
     331        </div>
     332        <div class="hqt-row mt-5">
     333            <div class="hqt-col-1-2__sm hqt-col-2-3__lg hqt-col-1-2__xl">
     334                <div class="hqt-row">
     335                    <div class="hqt-col-1-2 mb-4">
     336                        <div class="d-flex border-rad-10 overflow-hidden box-shadow">
     337                            <div class="p-2" style="background: #f40c3c;">
     338                                <img src="<?php echo PLUGIN_URL; ?>/assets/images/admin/startup.svg" class="hqt-svg-icon white">
     339                            </div>
     340                            <div class="d-flex flex-basis-100 align-items-center">
     341                                <h3 class="px-3"><?php _ex('Modern Design', 'admin', 'marmot'); ?></h3>
     342                            </div>
     343                        </div>
     344                    </div>
     345                    <div class="hqt-col-1-2 mb-4">
     346                        <div class="d-flex border-rad-10 overflow-hidden box-shadow">
     347                            <div class="p-2" style="background: #f7382b;">
     348                                <img src="<?php echo PLUGIN_URL; ?>/assets/images/admin/responsive.svg" class="hqt-svg-icon white">
     349                            </div>
     350                            <div class="d-flex flex-basis-100 align-items-center">
     351                                <h3 class="px-3"><?php _ex('Fully Responsive', 'admin', 'marmot'); ?></h3>
     352                            </div>
     353                        </div>
     354                    </div>
     355                    <div class="hqt-col-1-2 mb-4">
     356                        <div class="d-flex border-rad-10 overflow-hidden box-shadow">
     357                            <div class="p-2" style="background: #fb7015;">
     358                                <img src="<?php echo PLUGIN_URL; ?>/assets/images/admin/development.svg" class="hqt-svg-icon white">
     359                            </div>
     360                            <div class="d-flex flex-basis-100 align-items-center">
     361                                <h3 class="px-3"><?php _ex('No Coding Required', 'admin', 'marmot'); ?></h3>
     362                            </div>
     363                        </div>
     364                    </div>
     365                    <div class="hqt-col-1-2 mb-4">
     366                        <div class="d-flex border-rad-10 overflow-hidden box-shadow">
     367                            <div class="p-2" style="background: #ffa002;">
     368                                <img src="<?php echo PLUGIN_URL; ?>/assets/images/admin/content.svg" class="hqt-svg-icon white">
     369                            </div>
     370                            <div class="d-flex flex-basis-100 align-items-center">
     371                                <h3 class="px-3"><?php _ex('Customize Everything', 'admin', 'marmot'); ?></h3>
     372                            </div>
     373                        </div>
     374                    </div>
     375                </div>
     376            </div>
     377            <div class="hqt-col-1-2__sm hqt-col-1-3__lg hqt-col-1-2__xl px-6">
     378                <h2 class="mt-0 mb-2 text-medium"><?php _ex('Use Elementor templates for', 'admin', 'marmot'); ?></h2>
     379                <h3 class="mt-2 mb-0"><?php _ex('Header and Footer', 'admin', 'marmot'); ?></h3>
     380                <a href="https://marmot.hqwebs.net/?utm_source=wp-admin&utm_medium=button&utm_campaign=default&utm_content=learn-more" target="_blank">
     381                    <?php _ex('Learn how', 'admin', 'marmot'); ?>
     382                </a>
     383                <h3 class="mt-2 mb-0"><?php _ex('Single and Archive post page', 'admin', 'marmot'); ?></h3>
     384                <a href="https://marmot.hqwebs.net/?utm_source=wp-admin&utm_medium=button&utm_campaign=default&utm_content=learn-more" target="_blank">
     385                    <?php _ex('Learn how', 'admin', 'marmot'); ?>
     386                </a>
     387                <h3 class="mt-2 mb-0"><?php _ex('WooCommerce product and Woo Archive page', 'admin', 'marmot'); ?></h3>
     388                <a href="https://marmot.hqwebs.net/woocommerce-integration/?utm_source=wp-admin&utm_medium=button&utm_campaign=default&utm_content=learn-more" target="_blank">
     389                    <?php _ex('Learn how', 'admin', 'marmot'); ?>
     390                </a>
     391            </div>
     392        </div>
    307393        <?php
    308394        return ob_get_clean();
  • hq-widgets-for-elementor/tags/1.0.3/inc/dependencies.php

    r2400865 r2404451  
    2424            'name' => 'HQTheme Extra',
    2525            'file' => 'hqtheme-extra/hqtheme-extra.php',
    26             'constant' => '',
    27             'action' => '',
     26            'constant' => '\HQExtra\VERSION',
    2827            'required' => true,
    2928            'dismiss' => false,
     
    3231            'name' => 'Elementor',
    3332            'file' => 'elementor/elementor.php',
    34             'constant' => '',
    35             'action' => 'elementor/loaded',
     33            'constant' => '\ELEMENTOR_VERSION',
    3634            'required' => true,
    3735            'dismiss' => false,
     
    5351    }
    5452
    55     public function is_theme_installed() {
     53    public static function is_theme_installed() {
    5654        foreach ((array) wp_get_themes() as $theme_dir => $theme) {
    5755            if ('Marmot' === $theme->name || 'Marmot' === $theme->parent_theme) {
     
    6260    }
    6361
    64     public function is_theme_active() {
     62    public static function is_theme_active() {
    6563        $theme = wp_get_theme();
    6664
     
    7775    public function check_plugins() {
    7876        foreach (static::$plugins as $plugin_name => $plugin_data) {
    79             if (!$this->is_plugin_active($plugin_data)) {
     77            if (!defined($plugin_data['constant'])) {
    8078                $type = '';
    8179                if ($plugin_data['required']) {
     
    120118    }
    121119
    122     public function is_plugin_active($plugin) {
    123         if (!empty($plugin['action']) && did_action($plugin['action'])) {
    124             return true;
    125         } elseif (!empty($plugin['constant']) && defined($plugin['action'])) {
    126             return true;
    127         } elseif (is_plugin_active($plugin['file'])) {
    128             return true;
    129         }
    130         return false;
    131     }
    132 
    133120}
  • hq-widgets-for-elementor/tags/1.0.3/inc/widget/theme/contact-form-7.php

    r2389368 r2404451  
    1111use Elementor\Group_Control_Border;
    1212use Elementor\Group_Control_Box_Shadow;
    13 use function HQWidgetsForElementor\is_plugin_active;
    1413use const HQWidgetsForElementor\VERSION;
    1514use const HQWidgetsForElementor\PLUGIN_SLUG;
     
    7473
    7574    protected function _register_controls() {
    76         if (!is_plugin_active('contact-form-7/wp-contact-form-7.php')) {
     75        if (!defined('WPCF7_VERSION')) {
    7776            $this->start_controls_section('section_plugin_missing', [
    7877                'label' => __('Contact Form 7', 'hq-widgets-for-elementor'),
     
    999998
    1000999    protected function render() {
    1001         if (!is_plugin_active('contact-form-7/wp-contact-form-7.php')) {
     1000        if (!defined('WPCF7_VERSION')) {
    10021001            if (Plugin::instance()->editor->is_edit_mode()) {
    10031002                ?>
  • hq-widgets-for-elementor/tags/1.0.3/inc/widget/theme/polylang-switcher.php

    r2389368 r2404451  
    1313use const HQWidgetsForElementor\PLUGIN_SLUG;
    1414use const HQWidgetsForElementor\VERSION;
    15 use function HQWidgetsForElementor\is_plugin_active;
    1615
    1716class Polylang_Switcher extends Widget_Base {
     
    4746
    4847    protected function _register_controls() {
    49         if (!is_plugin_active('polylang/polylang.php')) {
     48        if (!defined('POLYLANG_VERSION')) {
    5049            $this->start_controls_section('section_plugin_missing', [
    5150                'label' => __('Polylang', 'hq-widgets-for-elementor'),
     
    669668
    670669    protected function render() {
    671         if (!is_plugin_active('polylang/polylang.php')) {
     670        if (!defined('POLYLANG_VERSION')) {
    672671            \HQLib\Utils::editor_alert_box('Polylang plugin is missing.');
    673672            return;
     
    687686            $listHtml = '';
    688687            $currentHtml = '';
    689            
     688
    690689            foreach ($languages as $language) {
    691690                $this->remove_render_attribute('hq-polylang-menu-item', 'class');
     
    702701
    703702                $this->add_render_attribute('hq-polylang-menu-item', 'class', 'menu-item');
    704                
     703
    705704                if ($language['current_lang']) {
    706705                    $this->add_render_attribute('hq-polylang-menu-item', 'class', 'menu-item__active');
  • hq-widgets-for-elementor/tags/1.0.3/inc/widget/woocommerce/add-to-cart.php

    r2389368 r2404451  
    1212use const HQWidgetsForElementor\PLUGIN_SLUG;
    1313use const HQWidgetsForElementor\PLUGIN_URL;
    14 use function HQWidgetsForElementor\is_plugin_active;
    1514
    1615class Add_To_Cart extends Product_Add_To_Cart {
     
    5554
    5655    protected function _register_controls() {
    57         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     56        if (!defined('WC_VERSION')) {
    5857            $this->start_controls_section('section_plugin_missing', [
    5958                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    124123
    125124    protected function render() {
    126         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     125        if (!defined('WC_VERSION')) {
    127126            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    128127            return;
  • hq-widgets-for-elementor/tags/1.0.3/inc/widget/woocommerce/archive-description.php

    r2389368 r2404451  
    99use Elementor\Group_Control_Typography;
    1010use const HQWidgetsForElementor\PLUGIN_SLUG;
    11 use function HQWidgetsForElementor\is_plugin_active;
    1211
    1312class Archive_Description extends Widget_Base {
     
    3433
    3534    protected function _register_controls() {
    36         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     35        if (!defined('WC_VERSION')) {
    3736            $this->start_controls_section('section_plugin_missing', [
    3837                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    121120
    122121    protected function render() {
    123         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     122        if (!defined('WC_VERSION')) {
    124123            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    125124            return;
  • hq-widgets-for-elementor/tags/1.0.3/inc/widget/woocommerce/archive-product-add-to-cart.php

    r2389368 r2404451  
    1616use const HQWidgetsForElementor\PLUGIN_SLUG;
    1717use const HQWidgetsForElementor\PLUGIN_URL;
    18 use function HQWidgetsForElementor\is_plugin_active;
    1918
    2019class Archive_Product_Add_To_Cart extends Widget_Button {
     
    5958
    6059    protected function _register_controls() {
    61         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     60        if (!defined('WC_VERSION')) {
    6261            $this->start_controls_section('section_plugin_missing', [
    6362                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    338337
    339338    protected function render() {
    340         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     339        if (!defined('WC_VERSION')) {
    341340            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    342341            return;
  • hq-widgets-for-elementor/tags/1.0.3/inc/widget/woocommerce/archive-products.php

    r2389368 r2404451  
    99use const HQWidgetsForElementor\PLUGIN_SLUG;
    1010use HQWidgetsForElementor\Widget\Woocommerce\Products_Base;
    11 use function HQWidgetsForElementor\is_plugin_active;
    1211
    1312class Archive_Products extends Products_Base {
     
    3837
    3938    protected function _register_controls() {
    40         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     39        if (!defined('WC_VERSION')) {
    4140            $this->start_controls_section('section_plugin_missing', [
    4241                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    102101
    103102    public function render() {
    104         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     103        if (!defined('WC_VERSION')) {
    105104            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    106105            return;
  • hq-widgets-for-elementor/tags/1.0.3/inc/widget/woocommerce/category-image.php

    r2389368 r2404451  
    88use Elementor\Controls_Manager;
    99use const HQWidgetsForElementor\PLUGIN_SLUG;
    10 use function HQWidgetsForElementor\is_plugin_active;
    1110
    1211class Category_Image extends Widget_Image {
     
    3332
    3433    protected function _register_controls() {
    35         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     34        if (!defined('WC_VERSION')) {
    3635            $this->start_controls_section('section_plugin_missing', [
    3736                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    5756
    5857    protected function render() {
    59         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     58        if (!defined('WC_VERSION')) {
    6059            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    6160            return;
  • hq-widgets-for-elementor/tags/1.0.3/inc/widget/woocommerce/notices.php

    r2389368 r2404451  
    1414use const HQWidgetsForElementor\PLUGIN_SLUG;
    1515use const HQWidgetsForElementor\PLUGIN_URL;
    16 use function HQWidgetsForElementor\is_plugin_active;
    1716
    1817class Notices extends Widget_Base {
     
    203202
    204203    protected function render() {
    205         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     204        if (!defined('WC_VERSION')) {
    206205            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    207206            return;
  • hq-widgets-for-elementor/tags/1.0.3/inc/widget/woocommerce/product-add-to-cart.php

    r2389368 r2404451  
    1616use const HQWidgetsForElementor\PLUGIN_SLUG;
    1717use const HQWidgetsForElementor\PLUGIN_URL;
    18 use function HQWidgetsForElementor\is_plugin_active;
    1918
    2019class Product_Add_To_Cart extends Widget_Button {
     
    5958
    6059    protected function _register_controls() {
    61         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     60        if (!defined('WC_VERSION')) {
    6261            $this->start_controls_section('section_plugin_missing', [
    6362                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    720719
    721720    protected function render() {
    722         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     721        if (!defined('WC_VERSION')) {
    723722            Utils::editor_alert_box('WooCommerce plugin is missing.');
    724723            return;
  • hq-widgets-for-elementor/tags/1.0.3/inc/widget/woocommerce/product-additional-information.php

    r2389368 r2404451  
    1212use const HQWidgetsForElementor\PLUGIN_SLUG;
    1313use const HQWidgetsForElementor\PLUGIN_URL;
    14 use function HQWidgetsForElementor\is_plugin_active;
    1514
    1615class Product_Additional_Information extends Posts_Base {
     
    4241
    4342    protected function _register_controls() {
    44         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     43        if (!defined('WC_VERSION')) {
    4544            $this->start_controls_section('section_plugin_missing', [
    4645                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    224223
    225224    protected function render() {
    226         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     225        if (!defined('WC_VERSION')) {
    227226            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    228227            return;
  • hq-widgets-for-elementor/tags/1.0.3/inc/widget/woocommerce/product-categories-grid.php

    r2389368 r2404451  
    1515use const HQWidgetsForElementor\PLUGIN_URL;
    1616use const HQWidgetsForElementor\VERSION;
    17 use function HQWidgetsForElementor\is_plugin_active;
    1817
    1918class Product_Categories_Grid extends Widget_Base {
     
    5150
    5251    protected function _register_controls() {
    53         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     52        if (!defined('WC_VERSION')) {
    5453            $this->start_controls_section('section_plugin_missing', [
    5554                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    568567
    569568    public function render() {
    570         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     569        if (!defined('WC_VERSION')) {
    571570            Utils::editor_alert_box('WooCommerce plugin is missing.');
    572571            return;
  • hq-widgets-for-elementor/tags/1.0.3/inc/widget/woocommerce/product-content.php

    r2389368 r2404451  
    1010use const HQWidgetsForElementor\PLUGIN_URL;
    1111use const HQWidgetsForElementor\VERSION;
    12 use function HQWidgetsForElementor\is_plugin_active;
    1312
    1413class Product_Content extends Post_Content {
     
    4544
    4645    protected function _register_controls() {
    47         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     46        if (!defined('WC_VERSION')) {
    4847            $this->start_controls_section('section_plugin_missing', [
    4948                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    6665   
    6766    protected function render() {
    68         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     67        if (!defined('WC_VERSION')) {
    6968            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    7069            return;
  • hq-widgets-for-elementor/tags/1.0.3/inc/widget/woocommerce/product-data-tabs.php

    r2389368 r2404451  
    1818use const HQWidgetsForElementor\PLUGIN_SLUG;
    1919use const HQWidgetsForElementor\PLUGIN_URL;
    20 use function HQWidgetsForElementor\is_plugin_active;
    2120
    2221class Product_Data_Tabs extends Posts_Base {
     
    6261
    6362    protected function _register_controls() {
    64         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     63        if (!defined('WC_VERSION')) {
    6564            $this->start_controls_section('section_plugin_missing', [
    6665                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    16041603
    16051604    protected function render() {
    1606         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     1605        if (!defined('WC_VERSION')) {
    16071606            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    16081607            return;
  • hq-widgets-for-elementor/tags/1.0.3/inc/widget/woocommerce/product-featured-image.php

    r2389368 r2404451  
    88use HQWidgetsForElementor\Widget\Theme\Post_Featured_Image;
    99use const HQWidgetsForElementor\PLUGIN_SLUG;
    10 use function HQWidgetsForElementor\is_plugin_active;
    1110
    1211class Product_Featured_Image extends Post_Featured_Image {
     
    3332
    3433    protected function _register_controls() {
    35         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     34        if (!defined('WC_VERSION')) {
    3635            $this->start_controls_section('section_plugin_missing', [
    3736                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    5554
    5655    protected function render() {
    57         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     56        if (!defined('WC_VERSION')) {
    5857            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    5958            return;
  • hq-widgets-for-elementor/tags/1.0.3/inc/widget/woocommerce/product-images.php

    r2389368 r2404451  
    1313use const HQWidgetsForElementor\PLUGIN_SLUG;
    1414use const HQWidgetsForElementor\PLUGIN_URL;
    15 use function HQWidgetsForElementor\is_plugin_active;
    1615
    1716class Product_Images extends Posts_Base {
     
    5756
    5857    protected function _register_controls() {
    59         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     58        if (!defined('WC_VERSION')) {
    6059            $this->start_controls_section('section_plugin_missing', [
    6160                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    466465
    467466    public function render() {
    468         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     467        if (!defined('WC_VERSION')) {
    469468            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    470469            return;
  • hq-widgets-for-elementor/tags/1.0.3/inc/widget/woocommerce/product-link.php

    r2389368 r2404451  
    88use Elementor\Widget_Button;
    99use const HQWidgetsForElementor\PLUGIN_SLUG;
    10 use function HQWidgetsForElementor\is_plugin_active;
    1110
    1211class Product_Link extends Widget_Button {
     
    3332
    3433    protected function _register_controls() {
    35         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     34        if (!defined('WC_VERSION')) {
    3635            $this->start_controls_section('section_plugin_missing', [
    3736                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    6362
    6463    protected function render() {
    65         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     64        if (!defined('WC_VERSION')) {
    6665            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    6766            return;
  • hq-widgets-for-elementor/tags/1.0.3/inc/widget/woocommerce/product-meta.php

    r2389368 r2404451  
    1010use Elementor\Widget_Base;
    1111use const HQWidgetsForElementor\PLUGIN_SLUG;
    12 use function HQWidgetsForElementor\is_plugin_active;
    1312
    1413class Product_Meta extends Widget_Base {
     
    3534
    3635    protected function _register_controls() {
    37         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     36        if (!defined('WC_VERSION')) {
    3837            $this->start_controls_section('section_plugin_missing', [
    3938                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    388387
    389388    protected function render() {
    390         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     389        if (!defined('WC_VERSION')) {
    391390            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    392391            return;
  • hq-widgets-for-elementor/tags/1.0.3/inc/widget/woocommerce/product-price.php

    r2389368 r2404451  
    1414use const HQWidgetsForElementor\PLUGIN_SLUG;
    1515use const HQWidgetsForElementor\PLUGIN_URL;
    16 use function HQWidgetsForElementor\is_plugin_active;
    1716
    1817class Product_Price extends Posts_Base {
     
    4847
    4948    protected function _register_controls() {
    50         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     49        if (!defined('WC_VERSION')) {
    5150            $this->start_controls_section('section_plugin_missing', [
    5251                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    213212
    214213    protected function render() {
    215         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     214        if (!defined('WC_VERSION')) {
    216215            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    217216            return;
  • hq-widgets-for-elementor/tags/1.0.3/inc/widget/woocommerce/product-rating.php

    r2389368 r2404451  
    1212use const HQWidgetsForElementor\PLUGIN_SLUG;
    1313use const HQWidgetsForElementor\PLUGIN_URL;
    14 use function HQWidgetsForElementor\is_plugin_active;
    1514
    1615class Product_Rating extends Widget_Base {
     
    4645
    4746    protected function _register_controls() {
    48         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     47        if (!defined('WC_VERSION')) {
    4948            $this->start_controls_section('section_plugin_missing', [
    5049                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    213212
    214213    protected function render() {
    215         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     214        if (!defined('WC_VERSION')) {
    216215            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    217216            return;
  • hq-widgets-for-elementor/tags/1.0.3/inc/widget/woocommerce/product-related-products-grid.php

    r2389368 r2404451  
    77use Elementor\Controls_Manager;
    88use HQWidgetsForElementor\Widget\Woocommerce\Product_Related_Products;
    9 use function HQWidgetsForElementor\is_plugin_active;
    109
    1110class Product_Related_Products_Grid extends Product_Related_Products {
     
    3635
    3736    protected function _register_controls() {
    38         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     37        if (!defined('WC_VERSION')) {
    3938            $this->start_controls_section('section_plugin_missing', [
    4039                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    6160
    6261    public function render() {
    63         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     62        if (!defined('WC_VERSION')) {
    6463            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    6564            return;
  • hq-widgets-for-elementor/tags/1.0.3/inc/widget/woocommerce/product-related-products-slider.php

    r2389368 r2404451  
    88use HQLib\Utils;
    99use HQWidgetsForElementor\Widget\Woocommerce\Product_Related_Products;
    10 use function HQWidgetsForElementor\is_plugin_active;
    1110
    1211class Product_Related_Products_Slider extends Product_Related_Products {
     
    3736
    3837    protected function _register_controls() {
    39         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     38        if (!defined('WC_VERSION')) {
    4039            $this->start_controls_section('section_plugin_missing', [
    4140                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    6261
    6362    public function render() {
    64         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     63        if (!defined('WC_VERSION')) {
    6564            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    6665            return;
  • hq-widgets-for-elementor/tags/1.0.3/inc/widget/woocommerce/product-reviews.php

    r2389368 r2404451  
    1717use const HQWidgetsForElementor\PLUGIN_SLUG;
    1818use const HQWidgetsForElementor\PLUGIN_URL;
    19 use function HQWidgetsForElementor\is_plugin_active;
    2019
    2120class Product_Reviews extends Posts {
     
    6160
    6261    protected function _register_controls() {
    63         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     62        if (!defined('WC_VERSION')) {
    6463            $this->start_controls_section('section_plugin_missing', [
    6564                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    11631162
    11641163    public function render() {
    1165         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     1164        if (!defined('WC_VERSION')) {
    11661165            Utils::editor_alert_box('WooCommerce plugin is missing.');
    11671166            return;
  • hq-widgets-for-elementor/tags/1.0.3/inc/widget/woocommerce/product-short-description.php

    r2389368 r2404451  
    1010use HQWidgetsForElementor\Widget\Posts_Base;
    1111use const HQWidgetsForElementor\PLUGIN_SLUG;
    12 use function HQWidgetsForElementor\is_plugin_active;
    1312
    1413class Product_Short_Description extends Posts_Base {
     
    3534
    3635    protected function _register_controls() {
    37         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     36        if (!defined('WC_VERSION')) {
    3837            $this->start_controls_section('section_plugin_missing', [
    3938                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    114113
    115114    protected function render() {
    116         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     115        if (!defined('WC_VERSION')) {
    117116            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    118117            return;
  • hq-widgets-for-elementor/tags/1.0.3/inc/widget/woocommerce/product-stock.php

    r2389368 r2404451  
    1111use HQWidgetsForElementor\Widget\Posts_Base;
    1212use const HQWidgetsForElementor\PLUGIN_SLUG;
    13 use function HQWidgetsForElementor\is_plugin_active;
    1413
    1514class Product_Stock extends Posts_Base {
     
    3635
    3736    protected function _register_controls() {
    38         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     37        if (!defined('WC_VERSION')) {
    3938            $this->start_controls_section('section_plugin_missing', [
    4039                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    263262
    264263    protected function render() {
    265         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     264        if (!defined('WC_VERSION')) {
    266265            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    267266            return;
  • hq-widgets-for-elementor/tags/1.0.3/inc/widget/woocommerce/product-upsells-grid.php

    r2389368 r2404451  
    99use HQWidgetsForElementor\Widget\Woocommerce\Product_Upsells;
    1010use const HQWidgetsForElementor\PLUGIN_SLUG;
    11 use function HQWidgetsForElementor\is_plugin_active;
    1211
    1312class Product_Upsells_Grid extends Product_Upsells {
     
    4241
    4342    protected function _register_controls() {
    44         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     43        if (!defined('WC_VERSION')) {
    4544            $this->start_controls_section('section_plugin_missing', [
    4645                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    6766
    6867    public function render() {
    69         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     68        if (!defined('WC_VERSION')) {
    7069            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    7170            return;
  • hq-widgets-for-elementor/tags/1.0.3/inc/widget/woocommerce/product-upsells-slider.php

    r2389368 r2404451  
    99use HQWidgetsForElementor\Widget\Woocommerce\Product_Upsells;
    1010use const HQWidgetsForElementor\PLUGIN_SLUG;
    11 use function HQWidgetsForElementor\is_plugin_active;
    1211
    1312class Product_Upsells_Slider extends Product_Upsells {
     
    4241
    4342    protected function _register_controls() {
    44         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     43        if (!defined('WC_VERSION')) {
    4544            $this->start_controls_section('section_plugin_missing', [
    4645                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    6766
    6867    public function render() {
    69         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     68        if (!defined('WC_VERSION')) {
    7069            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    7170            return;
  • hq-widgets-for-elementor/tags/1.0.3/inc/widget/woocommerce/products-grid.php

    r2389368 r2404451  
    88use const HQWidgetsForElementor\PLUGIN_SLUG;
    99use HQWidgetsForElementor\Widget\Woocommerce\Products;
    10 use function HQWidgetsForElementor\is_plugin_active;
    1110
    1211class Products_Grid extends Products {
     
    3736
    3837    protected function _register_controls() {
    39         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     38        if (!defined('WC_VERSION')) {
    4039            $this->start_controls_section('section_plugin_missing', [
    4140                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    6867
    6968    public function render() {
    70         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     69        if (!defined('WC_VERSION')) {
    7170            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    7271            return;
  • hq-widgets-for-elementor/tags/1.0.3/inc/widget/woocommerce/products-slider.php

    r2389368 r2404451  
    77use Elementor\Controls_Manager;
    88use HQWidgetsForElementor\Widget\Woocommerce\Products;
    9 use function HQWidgetsForElementor\is_plugin_active;
    109
    1110class Products_Slider extends Products {
     
    3635
    3736    protected function _register_controls() {
    38         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     37        if (!defined('WC_VERSION')) {
    3938            $this->start_controls_section('section_plugin_missing', [
    4039                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    6160
    6261    public function render() {
    63         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     62        if (!defined('WC_VERSION')) {
    6463            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    6564            return;
  • hq-widgets-for-elementor/tags/1.0.3/readme.txt

    r2400865 r2404451  
    55Tested up to: 5.5
    66Requires PHP: 7.2
    7 Stable tag: 1.0.2
     7Stable tag: 1.0.3
    88License: GPL v2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    138138= 1.0.2 - 2020-09-20 =
    139139* Fixing some visual bugs
     140
     141= 1.0.3 - 2020-10-22 =
     142* Fix Marmot theme dashboard redirect dependency
     143* Improving widgets dependencies
  • hq-widgets-for-elementor/trunk/hq-widgets-for-elementor.php

    r2400865 r2404451  
    55 * Plugin URI:        https://marmot.hqwebs.net/hq-widgets-for-elementor/?utm_source=wp-admin&utm_medium=link&utm_campaign=default&utm_term=hq-widgets-for-elementor&utm_content=plugin-uri
    66 * Description:       The HQ Widgets for Elementor is an elementor addons package for Elementor page builder plugin for WordPress. Works Best with Marmot theme
    7  * Version:           1.0.2
     7 * Version:           1.0.3
    88 * Requires at least: 5.3
    99 * Requires PHP:      7.2
     
    6262 * @var string
    6363 */
    64 const VERSION = '1.0.2';
     64const VERSION = '1.0.3';
    6565
    6666// Load Autoloader
     
    141141            Admin\Admin_Settings::instance();
    142142        }
    143        
     143
    144144        /**
    145145         * Regenerate css in debug mode
     
    197197
    198198        // Redirect to dashboard after plugin activation
    199         if (is_plugin_active('hqtheme-extra/hqtheme-extra.php') && is_plugin_active('elementor/elementor.php')) {
     199        if (
     200                defined('\HQExtra\VERSION') &&
     201                defined('\ELEMENTOR_VERSION') &&
     202                !Dependencies::is_theme_active()
     203        ) {
    200204            set_transient(PLUGIN_SLUG . '_activation_redirect', true, MINUTE_IN_SECONDS);
    201205        }
     
    335339}
    336340
    337 /**
    338  * Checks if plugin is active
    339  *
    340  * @since 1.0.0
    341  *
    342  * @param string $plugin Plugin activation string
    343  * @return bool
    344  */
    345 function is_plugin_active($plugin) {
    346     return in_array($plugin, (array) \get_option('active_plugins', [])) || is_plugin_active_for_network($plugin);
    347 }
    348 
    349 /**
    350  * Checks if plugin is active for network
    351  *
    352  * @since 1.0.0
    353  *
    354  * @param string $plugin Plugin activation string
    355  * @return bool
    356  */
    357 function is_plugin_active_for_network($plugin) {
    358     if (!is_multisite()) {
    359         return false;
    360     }
    361 
    362     $plugins = get_site_option('active_sitewide_plugins');
    363     if (isset($plugins[$plugin])) {
    364         return true;
    365     }
    366 
    367     return false;
    368 }
    369 
    370341// Run Plugin
    371342HQ_Widgets_For_Elementor::instance();
  • hq-widgets-for-elementor/trunk/inc/admin/admin-settings.php

    r2400865 r2404451  
    305305            </div>
    306306        </div>
     307        <?php /* Theme presentaion */ ?>
     308        <div class="hqt-row mt-3">
     309            <div class="hqt-col-1-2__md">
     310                <h3 class="my-1 mb-2"><?php _ex('HQ Widgets for Elementor Recommends Marmot Theme', 'admin', 'marmot'); ?></h3>               
     311                <div class="hqt-logo-wrap">
     312                    <a href="https://marmot.hqwebs.net/?utm_source=wp-admin&utm_medium=logo&utm_campaign=default&utm_content=hqwidgets" target="_blank">
     313                        <img src="<?php echo PLUGIN_URL; ?>/assets/images/admin/logo-marmot.png">
     314                    </a>
     315                </div>
     316
     317                <h2 class="mt-6 mb-0 text-medium"><?php _ex('Fully customizable WordPress theme', 'admin', 'marmot'); ?></h2>
     318                <ul class="hqt-list list-dot my-3">
     319                    <li><?php _ex('The most flexible theme for Elementor page builder fans', 'admin', 'marmot'); ?></li>
     320                    <li><?php _ex('Professionally ready to use demos right behind a click', 'admin', 'marmot'); ?></li>
     321                    <li><?php _ex('Fast and light - Marmot theme is made for speed', 'admin', 'marmot'); ?></li>
     322                </ul>
     323                <div class="mt-5">
     324                    <a href="https://marmot.hqwebs.net/ready-demos/?utm_source=wp-admin&utm_medium=link&utm_campaign=default&utm_content=learn-more" class="btn btn-border ml-2 mr-1"><?php _ex('View Demos', 'admin', 'marmot'); ?></a>
     325                    <a target="_blank" href="https://marmot.hqwebs.net/?utm_source=wp-admin&utm_medium=link&utm_campaign=default&utm_content=learn-more" ><?php _ex('Learn More', 'admin', 'marmot'); ?></a>
     326                </div>
     327            </div>
     328            <div class="hqt-col-1-2__md d-flex align-items-center">
     329                <img src="<?php echo PLUGIN_URL; ?>/assets/images/admin/dashboard-theme.png" class="img-fluid">
     330            </div>
     331        </div>
     332        <div class="hqt-row mt-5">
     333            <div class="hqt-col-1-2__sm hqt-col-2-3__lg hqt-col-1-2__xl">
     334                <div class="hqt-row">
     335                    <div class="hqt-col-1-2 mb-4">
     336                        <div class="d-flex border-rad-10 overflow-hidden box-shadow">
     337                            <div class="p-2" style="background: #f40c3c;">
     338                                <img src="<?php echo PLUGIN_URL; ?>/assets/images/admin/startup.svg" class="hqt-svg-icon white">
     339                            </div>
     340                            <div class="d-flex flex-basis-100 align-items-center">
     341                                <h3 class="px-3"><?php _ex('Modern Design', 'admin', 'marmot'); ?></h3>
     342                            </div>
     343                        </div>
     344                    </div>
     345                    <div class="hqt-col-1-2 mb-4">
     346                        <div class="d-flex border-rad-10 overflow-hidden box-shadow">
     347                            <div class="p-2" style="background: #f7382b;">
     348                                <img src="<?php echo PLUGIN_URL; ?>/assets/images/admin/responsive.svg" class="hqt-svg-icon white">
     349                            </div>
     350                            <div class="d-flex flex-basis-100 align-items-center">
     351                                <h3 class="px-3"><?php _ex('Fully Responsive', 'admin', 'marmot'); ?></h3>
     352                            </div>
     353                        </div>
     354                    </div>
     355                    <div class="hqt-col-1-2 mb-4">
     356                        <div class="d-flex border-rad-10 overflow-hidden box-shadow">
     357                            <div class="p-2" style="background: #fb7015;">
     358                                <img src="<?php echo PLUGIN_URL; ?>/assets/images/admin/development.svg" class="hqt-svg-icon white">
     359                            </div>
     360                            <div class="d-flex flex-basis-100 align-items-center">
     361                                <h3 class="px-3"><?php _ex('No Coding Required', 'admin', 'marmot'); ?></h3>
     362                            </div>
     363                        </div>
     364                    </div>
     365                    <div class="hqt-col-1-2 mb-4">
     366                        <div class="d-flex border-rad-10 overflow-hidden box-shadow">
     367                            <div class="p-2" style="background: #ffa002;">
     368                                <img src="<?php echo PLUGIN_URL; ?>/assets/images/admin/content.svg" class="hqt-svg-icon white">
     369                            </div>
     370                            <div class="d-flex flex-basis-100 align-items-center">
     371                                <h3 class="px-3"><?php _ex('Customize Everything', 'admin', 'marmot'); ?></h3>
     372                            </div>
     373                        </div>
     374                    </div>
     375                </div>
     376            </div>
     377            <div class="hqt-col-1-2__sm hqt-col-1-3__lg hqt-col-1-2__xl px-6">
     378                <h2 class="mt-0 mb-2 text-medium"><?php _ex('Use Elementor templates for', 'admin', 'marmot'); ?></h2>
     379                <h3 class="mt-2 mb-0"><?php _ex('Header and Footer', 'admin', 'marmot'); ?></h3>
     380                <a href="https://marmot.hqwebs.net/?utm_source=wp-admin&utm_medium=button&utm_campaign=default&utm_content=learn-more" target="_blank">
     381                    <?php _ex('Learn how', 'admin', 'marmot'); ?>
     382                </a>
     383                <h3 class="mt-2 mb-0"><?php _ex('Single and Archive post page', 'admin', 'marmot'); ?></h3>
     384                <a href="https://marmot.hqwebs.net/?utm_source=wp-admin&utm_medium=button&utm_campaign=default&utm_content=learn-more" target="_blank">
     385                    <?php _ex('Learn how', 'admin', 'marmot'); ?>
     386                </a>
     387                <h3 class="mt-2 mb-0"><?php _ex('WooCommerce product and Woo Archive page', 'admin', 'marmot'); ?></h3>
     388                <a href="https://marmot.hqwebs.net/woocommerce-integration/?utm_source=wp-admin&utm_medium=button&utm_campaign=default&utm_content=learn-more" target="_blank">
     389                    <?php _ex('Learn how', 'admin', 'marmot'); ?>
     390                </a>
     391            </div>
     392        </div>
    307393        <?php
    308394        return ob_get_clean();
  • hq-widgets-for-elementor/trunk/inc/dependencies.php

    r2400865 r2404451  
    2424            'name' => 'HQTheme Extra',
    2525            'file' => 'hqtheme-extra/hqtheme-extra.php',
    26             'constant' => '',
    27             'action' => '',
     26            'constant' => '\HQExtra\VERSION',
    2827            'required' => true,
    2928            'dismiss' => false,
     
    3231            'name' => 'Elementor',
    3332            'file' => 'elementor/elementor.php',
    34             'constant' => '',
    35             'action' => 'elementor/loaded',
     33            'constant' => '\ELEMENTOR_VERSION',
    3634            'required' => true,
    3735            'dismiss' => false,
     
    5351    }
    5452
    55     public function is_theme_installed() {
     53    public static function is_theme_installed() {
    5654        foreach ((array) wp_get_themes() as $theme_dir => $theme) {
    5755            if ('Marmot' === $theme->name || 'Marmot' === $theme->parent_theme) {
     
    6260    }
    6361
    64     public function is_theme_active() {
     62    public static function is_theme_active() {
    6563        $theme = wp_get_theme();
    6664
     
    7775    public function check_plugins() {
    7876        foreach (static::$plugins as $plugin_name => $plugin_data) {
    79             if (!$this->is_plugin_active($plugin_data)) {
     77            if (!defined($plugin_data['constant'])) {
    8078                $type = '';
    8179                if ($plugin_data['required']) {
     
    120118    }
    121119
    122     public function is_plugin_active($plugin) {
    123         if (!empty($plugin['action']) && did_action($plugin['action'])) {
    124             return true;
    125         } elseif (!empty($plugin['constant']) && defined($plugin['action'])) {
    126             return true;
    127         } elseif (is_plugin_active($plugin['file'])) {
    128             return true;
    129         }
    130         return false;
    131     }
    132 
    133120}
  • hq-widgets-for-elementor/trunk/inc/widget/theme/contact-form-7.php

    r2389368 r2404451  
    1111use Elementor\Group_Control_Border;
    1212use Elementor\Group_Control_Box_Shadow;
    13 use function HQWidgetsForElementor\is_plugin_active;
    1413use const HQWidgetsForElementor\VERSION;
    1514use const HQWidgetsForElementor\PLUGIN_SLUG;
     
    7473
    7574    protected function _register_controls() {
    76         if (!is_plugin_active('contact-form-7/wp-contact-form-7.php')) {
     75        if (!defined('WPCF7_VERSION')) {
    7776            $this->start_controls_section('section_plugin_missing', [
    7877                'label' => __('Contact Form 7', 'hq-widgets-for-elementor'),
     
    999998
    1000999    protected function render() {
    1001         if (!is_plugin_active('contact-form-7/wp-contact-form-7.php')) {
     1000        if (!defined('WPCF7_VERSION')) {
    10021001            if (Plugin::instance()->editor->is_edit_mode()) {
    10031002                ?>
  • hq-widgets-for-elementor/trunk/inc/widget/theme/polylang-switcher.php

    r2389368 r2404451  
    1313use const HQWidgetsForElementor\PLUGIN_SLUG;
    1414use const HQWidgetsForElementor\VERSION;
    15 use function HQWidgetsForElementor\is_plugin_active;
    1615
    1716class Polylang_Switcher extends Widget_Base {
     
    4746
    4847    protected function _register_controls() {
    49         if (!is_plugin_active('polylang/polylang.php')) {
     48        if (!defined('POLYLANG_VERSION')) {
    5049            $this->start_controls_section('section_plugin_missing', [
    5150                'label' => __('Polylang', 'hq-widgets-for-elementor'),
     
    669668
    670669    protected function render() {
    671         if (!is_plugin_active('polylang/polylang.php')) {
     670        if (!defined('POLYLANG_VERSION')) {
    672671            \HQLib\Utils::editor_alert_box('Polylang plugin is missing.');
    673672            return;
     
    687686            $listHtml = '';
    688687            $currentHtml = '';
    689            
     688
    690689            foreach ($languages as $language) {
    691690                $this->remove_render_attribute('hq-polylang-menu-item', 'class');
     
    702701
    703702                $this->add_render_attribute('hq-polylang-menu-item', 'class', 'menu-item');
    704                
     703
    705704                if ($language['current_lang']) {
    706705                    $this->add_render_attribute('hq-polylang-menu-item', 'class', 'menu-item__active');
  • hq-widgets-for-elementor/trunk/inc/widget/woocommerce/add-to-cart.php

    r2389368 r2404451  
    1212use const HQWidgetsForElementor\PLUGIN_SLUG;
    1313use const HQWidgetsForElementor\PLUGIN_URL;
    14 use function HQWidgetsForElementor\is_plugin_active;
    1514
    1615class Add_To_Cart extends Product_Add_To_Cart {
     
    5554
    5655    protected function _register_controls() {
    57         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     56        if (!defined('WC_VERSION')) {
    5857            $this->start_controls_section('section_plugin_missing', [
    5958                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    124123
    125124    protected function render() {
    126         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     125        if (!defined('WC_VERSION')) {
    127126            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    128127            return;
  • hq-widgets-for-elementor/trunk/inc/widget/woocommerce/archive-description.php

    r2389368 r2404451  
    99use Elementor\Group_Control_Typography;
    1010use const HQWidgetsForElementor\PLUGIN_SLUG;
    11 use function HQWidgetsForElementor\is_plugin_active;
    1211
    1312class Archive_Description extends Widget_Base {
     
    3433
    3534    protected function _register_controls() {
    36         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     35        if (!defined('WC_VERSION')) {
    3736            $this->start_controls_section('section_plugin_missing', [
    3837                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    121120
    122121    protected function render() {
    123         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     122        if (!defined('WC_VERSION')) {
    124123            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    125124            return;
  • hq-widgets-for-elementor/trunk/inc/widget/woocommerce/archive-product-add-to-cart.php

    r2389368 r2404451  
    1616use const HQWidgetsForElementor\PLUGIN_SLUG;
    1717use const HQWidgetsForElementor\PLUGIN_URL;
    18 use function HQWidgetsForElementor\is_plugin_active;
    1918
    2019class Archive_Product_Add_To_Cart extends Widget_Button {
     
    5958
    6059    protected function _register_controls() {
    61         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     60        if (!defined('WC_VERSION')) {
    6261            $this->start_controls_section('section_plugin_missing', [
    6362                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    338337
    339338    protected function render() {
    340         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     339        if (!defined('WC_VERSION')) {
    341340            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    342341            return;
  • hq-widgets-for-elementor/trunk/inc/widget/woocommerce/archive-products.php

    r2389368 r2404451  
    99use const HQWidgetsForElementor\PLUGIN_SLUG;
    1010use HQWidgetsForElementor\Widget\Woocommerce\Products_Base;
    11 use function HQWidgetsForElementor\is_plugin_active;
    1211
    1312class Archive_Products extends Products_Base {
     
    3837
    3938    protected function _register_controls() {
    40         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     39        if (!defined('WC_VERSION')) {
    4140            $this->start_controls_section('section_plugin_missing', [
    4241                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    102101
    103102    public function render() {
    104         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     103        if (!defined('WC_VERSION')) {
    105104            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    106105            return;
  • hq-widgets-for-elementor/trunk/inc/widget/woocommerce/category-image.php

    r2389368 r2404451  
    88use Elementor\Controls_Manager;
    99use const HQWidgetsForElementor\PLUGIN_SLUG;
    10 use function HQWidgetsForElementor\is_plugin_active;
    1110
    1211class Category_Image extends Widget_Image {
     
    3332
    3433    protected function _register_controls() {
    35         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     34        if (!defined('WC_VERSION')) {
    3635            $this->start_controls_section('section_plugin_missing', [
    3736                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    5756
    5857    protected function render() {
    59         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     58        if (!defined('WC_VERSION')) {
    6059            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    6160            return;
  • hq-widgets-for-elementor/trunk/inc/widget/woocommerce/notices.php

    r2389368 r2404451  
    1414use const HQWidgetsForElementor\PLUGIN_SLUG;
    1515use const HQWidgetsForElementor\PLUGIN_URL;
    16 use function HQWidgetsForElementor\is_plugin_active;
    1716
    1817class Notices extends Widget_Base {
     
    203202
    204203    protected function render() {
    205         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     204        if (!defined('WC_VERSION')) {
    206205            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    207206            return;
  • hq-widgets-for-elementor/trunk/inc/widget/woocommerce/product-add-to-cart.php

    r2389368 r2404451  
    1616use const HQWidgetsForElementor\PLUGIN_SLUG;
    1717use const HQWidgetsForElementor\PLUGIN_URL;
    18 use function HQWidgetsForElementor\is_plugin_active;
    1918
    2019class Product_Add_To_Cart extends Widget_Button {
     
    5958
    6059    protected function _register_controls() {
    61         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     60        if (!defined('WC_VERSION')) {
    6261            $this->start_controls_section('section_plugin_missing', [
    6362                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    720719
    721720    protected function render() {
    722         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     721        if (!defined('WC_VERSION')) {
    723722            Utils::editor_alert_box('WooCommerce plugin is missing.');
    724723            return;
  • hq-widgets-for-elementor/trunk/inc/widget/woocommerce/product-additional-information.php

    r2389368 r2404451  
    1212use const HQWidgetsForElementor\PLUGIN_SLUG;
    1313use const HQWidgetsForElementor\PLUGIN_URL;
    14 use function HQWidgetsForElementor\is_plugin_active;
    1514
    1615class Product_Additional_Information extends Posts_Base {
     
    4241
    4342    protected function _register_controls() {
    44         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     43        if (!defined('WC_VERSION')) {
    4544            $this->start_controls_section('section_plugin_missing', [
    4645                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    224223
    225224    protected function render() {
    226         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     225        if (!defined('WC_VERSION')) {
    227226            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    228227            return;
  • hq-widgets-for-elementor/trunk/inc/widget/woocommerce/product-categories-grid.php

    r2389368 r2404451  
    1515use const HQWidgetsForElementor\PLUGIN_URL;
    1616use const HQWidgetsForElementor\VERSION;
    17 use function HQWidgetsForElementor\is_plugin_active;
    1817
    1918class Product_Categories_Grid extends Widget_Base {
     
    5150
    5251    protected function _register_controls() {
    53         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     52        if (!defined('WC_VERSION')) {
    5453            $this->start_controls_section('section_plugin_missing', [
    5554                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    568567
    569568    public function render() {
    570         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     569        if (!defined('WC_VERSION')) {
    571570            Utils::editor_alert_box('WooCommerce plugin is missing.');
    572571            return;
  • hq-widgets-for-elementor/trunk/inc/widget/woocommerce/product-content.php

    r2389368 r2404451  
    1010use const HQWidgetsForElementor\PLUGIN_URL;
    1111use const HQWidgetsForElementor\VERSION;
    12 use function HQWidgetsForElementor\is_plugin_active;
    1312
    1413class Product_Content extends Post_Content {
     
    4544
    4645    protected function _register_controls() {
    47         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     46        if (!defined('WC_VERSION')) {
    4847            $this->start_controls_section('section_plugin_missing', [
    4948                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    6665   
    6766    protected function render() {
    68         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     67        if (!defined('WC_VERSION')) {
    6968            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    7069            return;
  • hq-widgets-for-elementor/trunk/inc/widget/woocommerce/product-data-tabs.php

    r2389368 r2404451  
    1818use const HQWidgetsForElementor\PLUGIN_SLUG;
    1919use const HQWidgetsForElementor\PLUGIN_URL;
    20 use function HQWidgetsForElementor\is_plugin_active;
    2120
    2221class Product_Data_Tabs extends Posts_Base {
     
    6261
    6362    protected function _register_controls() {
    64         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     63        if (!defined('WC_VERSION')) {
    6564            $this->start_controls_section('section_plugin_missing', [
    6665                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    16041603
    16051604    protected function render() {
    1606         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     1605        if (!defined('WC_VERSION')) {
    16071606            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    16081607            return;
  • hq-widgets-for-elementor/trunk/inc/widget/woocommerce/product-featured-image.php

    r2389368 r2404451  
    88use HQWidgetsForElementor\Widget\Theme\Post_Featured_Image;
    99use const HQWidgetsForElementor\PLUGIN_SLUG;
    10 use function HQWidgetsForElementor\is_plugin_active;
    1110
    1211class Product_Featured_Image extends Post_Featured_Image {
     
    3332
    3433    protected function _register_controls() {
    35         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     34        if (!defined('WC_VERSION')) {
    3635            $this->start_controls_section('section_plugin_missing', [
    3736                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    5554
    5655    protected function render() {
    57         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     56        if (!defined('WC_VERSION')) {
    5857            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    5958            return;
  • hq-widgets-for-elementor/trunk/inc/widget/woocommerce/product-images.php

    r2389368 r2404451  
    1313use const HQWidgetsForElementor\PLUGIN_SLUG;
    1414use const HQWidgetsForElementor\PLUGIN_URL;
    15 use function HQWidgetsForElementor\is_plugin_active;
    1615
    1716class Product_Images extends Posts_Base {
     
    5756
    5857    protected function _register_controls() {
    59         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     58        if (!defined('WC_VERSION')) {
    6059            $this->start_controls_section('section_plugin_missing', [
    6160                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    466465
    467466    public function render() {
    468         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     467        if (!defined('WC_VERSION')) {
    469468            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    470469            return;
  • hq-widgets-for-elementor/trunk/inc/widget/woocommerce/product-link.php

    r2389368 r2404451  
    88use Elementor\Widget_Button;
    99use const HQWidgetsForElementor\PLUGIN_SLUG;
    10 use function HQWidgetsForElementor\is_plugin_active;
    1110
    1211class Product_Link extends Widget_Button {
     
    3332
    3433    protected function _register_controls() {
    35         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     34        if (!defined('WC_VERSION')) {
    3635            $this->start_controls_section('section_plugin_missing', [
    3736                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    6362
    6463    protected function render() {
    65         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     64        if (!defined('WC_VERSION')) {
    6665            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    6766            return;
  • hq-widgets-for-elementor/trunk/inc/widget/woocommerce/product-meta.php

    r2389368 r2404451  
    1010use Elementor\Widget_Base;
    1111use const HQWidgetsForElementor\PLUGIN_SLUG;
    12 use function HQWidgetsForElementor\is_plugin_active;
    1312
    1413class Product_Meta extends Widget_Base {
     
    3534
    3635    protected function _register_controls() {
    37         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     36        if (!defined('WC_VERSION')) {
    3837            $this->start_controls_section('section_plugin_missing', [
    3938                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    388387
    389388    protected function render() {
    390         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     389        if (!defined('WC_VERSION')) {
    391390            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    392391            return;
  • hq-widgets-for-elementor/trunk/inc/widget/woocommerce/product-price.php

    r2389368 r2404451  
    1414use const HQWidgetsForElementor\PLUGIN_SLUG;
    1515use const HQWidgetsForElementor\PLUGIN_URL;
    16 use function HQWidgetsForElementor\is_plugin_active;
    1716
    1817class Product_Price extends Posts_Base {
     
    4847
    4948    protected function _register_controls() {
    50         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     49        if (!defined('WC_VERSION')) {
    5150            $this->start_controls_section('section_plugin_missing', [
    5251                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    213212
    214213    protected function render() {
    215         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     214        if (!defined('WC_VERSION')) {
    216215            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    217216            return;
  • hq-widgets-for-elementor/trunk/inc/widget/woocommerce/product-rating.php

    r2389368 r2404451  
    1212use const HQWidgetsForElementor\PLUGIN_SLUG;
    1313use const HQWidgetsForElementor\PLUGIN_URL;
    14 use function HQWidgetsForElementor\is_plugin_active;
    1514
    1615class Product_Rating extends Widget_Base {
     
    4645
    4746    protected function _register_controls() {
    48         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     47        if (!defined('WC_VERSION')) {
    4948            $this->start_controls_section('section_plugin_missing', [
    5049                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    213212
    214213    protected function render() {
    215         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     214        if (!defined('WC_VERSION')) {
    216215            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    217216            return;
  • hq-widgets-for-elementor/trunk/inc/widget/woocommerce/product-related-products-grid.php

    r2389368 r2404451  
    77use Elementor\Controls_Manager;
    88use HQWidgetsForElementor\Widget\Woocommerce\Product_Related_Products;
    9 use function HQWidgetsForElementor\is_plugin_active;
    109
    1110class Product_Related_Products_Grid extends Product_Related_Products {
     
    3635
    3736    protected function _register_controls() {
    38         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     37        if (!defined('WC_VERSION')) {
    3938            $this->start_controls_section('section_plugin_missing', [
    4039                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    6160
    6261    public function render() {
    63         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     62        if (!defined('WC_VERSION')) {
    6463            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    6564            return;
  • hq-widgets-for-elementor/trunk/inc/widget/woocommerce/product-related-products-slider.php

    r2389368 r2404451  
    88use HQLib\Utils;
    99use HQWidgetsForElementor\Widget\Woocommerce\Product_Related_Products;
    10 use function HQWidgetsForElementor\is_plugin_active;
    1110
    1211class Product_Related_Products_Slider extends Product_Related_Products {
     
    3736
    3837    protected function _register_controls() {
    39         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     38        if (!defined('WC_VERSION')) {
    4039            $this->start_controls_section('section_plugin_missing', [
    4140                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    6261
    6362    public function render() {
    64         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     63        if (!defined('WC_VERSION')) {
    6564            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    6665            return;
  • hq-widgets-for-elementor/trunk/inc/widget/woocommerce/product-reviews.php

    r2389368 r2404451  
    1717use const HQWidgetsForElementor\PLUGIN_SLUG;
    1818use const HQWidgetsForElementor\PLUGIN_URL;
    19 use function HQWidgetsForElementor\is_plugin_active;
    2019
    2120class Product_Reviews extends Posts {
     
    6160
    6261    protected function _register_controls() {
    63         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     62        if (!defined('WC_VERSION')) {
    6463            $this->start_controls_section('section_plugin_missing', [
    6564                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    11631162
    11641163    public function render() {
    1165         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     1164        if (!defined('WC_VERSION')) {
    11661165            Utils::editor_alert_box('WooCommerce plugin is missing.');
    11671166            return;
  • hq-widgets-for-elementor/trunk/inc/widget/woocommerce/product-short-description.php

    r2389368 r2404451  
    1010use HQWidgetsForElementor\Widget\Posts_Base;
    1111use const HQWidgetsForElementor\PLUGIN_SLUG;
    12 use function HQWidgetsForElementor\is_plugin_active;
    1312
    1413class Product_Short_Description extends Posts_Base {
     
    3534
    3635    protected function _register_controls() {
    37         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     36        if (!defined('WC_VERSION')) {
    3837            $this->start_controls_section('section_plugin_missing', [
    3938                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    114113
    115114    protected function render() {
    116         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     115        if (!defined('WC_VERSION')) {
    117116            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    118117            return;
  • hq-widgets-for-elementor/trunk/inc/widget/woocommerce/product-stock.php

    r2389368 r2404451  
    1111use HQWidgetsForElementor\Widget\Posts_Base;
    1212use const HQWidgetsForElementor\PLUGIN_SLUG;
    13 use function HQWidgetsForElementor\is_plugin_active;
    1413
    1514class Product_Stock extends Posts_Base {
     
    3635
    3736    protected function _register_controls() {
    38         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     37        if (!defined('WC_VERSION')) {
    3938            $this->start_controls_section('section_plugin_missing', [
    4039                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    263262
    264263    protected function render() {
    265         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     264        if (!defined('WC_VERSION')) {
    266265            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    267266            return;
  • hq-widgets-for-elementor/trunk/inc/widget/woocommerce/product-upsells-grid.php

    r2389368 r2404451  
    99use HQWidgetsForElementor\Widget\Woocommerce\Product_Upsells;
    1010use const HQWidgetsForElementor\PLUGIN_SLUG;
    11 use function HQWidgetsForElementor\is_plugin_active;
    1211
    1312class Product_Upsells_Grid extends Product_Upsells {
     
    4241
    4342    protected function _register_controls() {
    44         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     43        if (!defined('WC_VERSION')) {
    4544            $this->start_controls_section('section_plugin_missing', [
    4645                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    6766
    6867    public function render() {
    69         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     68        if (!defined('WC_VERSION')) {
    7069            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    7170            return;
  • hq-widgets-for-elementor/trunk/inc/widget/woocommerce/product-upsells-slider.php

    r2389368 r2404451  
    99use HQWidgetsForElementor\Widget\Woocommerce\Product_Upsells;
    1010use const HQWidgetsForElementor\PLUGIN_SLUG;
    11 use function HQWidgetsForElementor\is_plugin_active;
    1211
    1312class Product_Upsells_Slider extends Product_Upsells {
     
    4241
    4342    protected function _register_controls() {
    44         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     43        if (!defined('WC_VERSION')) {
    4544            $this->start_controls_section('section_plugin_missing', [
    4645                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    6766
    6867    public function render() {
    69         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     68        if (!defined('WC_VERSION')) {
    7069            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    7170            return;
  • hq-widgets-for-elementor/trunk/inc/widget/woocommerce/products-grid.php

    r2389368 r2404451  
    88use const HQWidgetsForElementor\PLUGIN_SLUG;
    99use HQWidgetsForElementor\Widget\Woocommerce\Products;
    10 use function HQWidgetsForElementor\is_plugin_active;
    1110
    1211class Products_Grid extends Products {
     
    3736
    3837    protected function _register_controls() {
    39         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     38        if (!defined('WC_VERSION')) {
    4039            $this->start_controls_section('section_plugin_missing', [
    4140                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    6867
    6968    public function render() {
    70         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     69        if (!defined('WC_VERSION')) {
    7170            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    7271            return;
  • hq-widgets-for-elementor/trunk/inc/widget/woocommerce/products-slider.php

    r2389368 r2404451  
    77use Elementor\Controls_Manager;
    88use HQWidgetsForElementor\Widget\Woocommerce\Products;
    9 use function HQWidgetsForElementor\is_plugin_active;
    109
    1110class Products_Slider extends Products {
     
    3635
    3736    protected function _register_controls() {
    38         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     37        if (!defined('WC_VERSION')) {
    3938            $this->start_controls_section('section_plugin_missing', [
    4039                'label' => __('Woocommerce', 'hq-widgets-for-elementor'),
     
    6160
    6261    public function render() {
    63         if (!is_plugin_active('woocommerce/woocommerce.php')) {
     62        if (!defined('WC_VERSION')) {
    6463            \HQLib\Utils::editor_alert_box('WooCommerce plugin is missing.');
    6564            return;
  • hq-widgets-for-elementor/trunk/readme.txt

    r2400865 r2404451  
    55Tested up to: 5.5
    66Requires PHP: 7.2
    7 Stable tag: 1.0.2
     7Stable tag: 1.0.3
    88License: GPL v2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    138138= 1.0.2 - 2020-09-20 =
    139139* Fixing some visual bugs
     140
     141= 1.0.3 - 2020-10-22 =
     142* Fix Marmot theme dashboard redirect dependency
     143* Improving widgets dependencies
Note: See TracChangeset for help on using the changeset viewer.