Plugin Directory

Changeset 3057143


Ignore:
Timestamp:
03/23/2024 02:25:41 AM (22 months ago)
Author:
themealien
Message:

Update to version 2.2.2 from GitHub

Location:
variation-swatches-for-woocommerce
Files:
18 added
8 deleted
22 edited
1 copied

Legend:

Unmodified
Added
Removed
  • variation-swatches-for-woocommerce/tags/2.2.2/includes/class-addon-page.php

    r2602534 r3057143  
    3434
    3535        private function woosuite_core_get_api_site_url() {
    36             return apply_filters( 'woosuite_core_get_api_site_url', 'https://dw.woosuite.com/' );
     36            return apply_filters( 'woosuite_core_get_api_site_url', 'https://dw.aovup.com/' );
    3737        }
    3838    }
  • variation-swatches-for-woocommerce/tags/2.2.2/includes/class-admin.php

    r3015148 r3057143  
    282282        $screen   = get_current_screen();
    283283        $dir_name = dirname( __FILE__ );
     284
     285        wp_enqueue_style( 'tawcvs-admin-common-css', plugins_url( '/assets/css/common.css', $dir_name ), null, WCVS_PLUGIN_VERSION );
     286        wp_enqueue_script( 'tawcvs-admin-common-js', plugins_url( '/assets/js/common.js', $dir_name ), null, WCVS_PLUGIN_VERSION );
     287
     288        wp_localize_script(
     289            'tawcvs-admin-common-js',
     290            'tawcvs',
     291            array(
     292                'ajaxUrl' => admin_url( 'admin-ajax.php' ),
     293                'adminUrl' => admin_url()
     294            )
     295        );
    284296
    285297        if ( strpos( $screen->id, 'variation-swatches-addons' ) !== false ) {
  • variation-swatches-for-woocommerce/tags/2.2.2/includes/class-menu-page.php

    r2696047 r3057143  
    1515
    1616        add_action( 'admin_menu', array( $this, 'handle_save_actions' ), 5 );
    17         add_action( 'admin_menu', array( $this, 'admin_menu' ) );
     17        add_action( 'admin_menu', array( $this, 'admin_menu' ), 99 );
     18        add_action( 'admin_menu', array( $this, 'handle_external_link' ), 100 );
     19
    1820
    1921        add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) );
     
    2123    }
    2224
     25    /**
     26     * @return void
     27     */
     28    public function handle_external_link() {
     29        global $submenu;
     30        $pro_external_url = 'https://aovup.com/lp/variations-swatches-upgrade/?utm_source=dashboard&utm_medium=menu-link&utm_campaign=swatch-offer&utm_id=dashboard-upgrade';
     31
     32        if ( isset( $submenu['woosuite-core'] ) ) {
     33            foreach ( $submenu['woosuite-core'] as $index => $menu_data ) {
     34                if ( $menu_data[2] === 'aovup-swatchupgrade-to-pro' ) {
     35                    $submenu['woosuite-core'][ $index ][2] = $pro_external_url;
     36                    $submenu['woosuite-core'][ $index ][4] = 'aovup-pro-upgrade-link';
     37                }
     38            }
     39        }
     40    }
     41
    2342    public function admin_scripts() {
    2443        if ( TA_WC_Variation_Swatches::is_in_plugin_settings_page() ) {
     
    2948
    3049    public function admin_menu() {
    31         if ( TA_WC_Variation_Swatches::is_woo_core_active() ) {
    32             add_submenu_page(
     50        global $admin_page_hooks;
     51        if ( ! TA_WC_Variation_Swatches::is_woo_core_active() && empty ( $admin_page_hooks['woosuite-core'] ) ) {
     52            // Register fake top AovUp menu.
     53            add_menu_page(
     54                __( 'AOVup Core', 'wcvs' ),
     55                __( 'AOVup', 'wcvs' ),
     56                'manage_options',
    3357                'woosuite-core',
    34                 __( 'Variation Swatches', 'wcvs' ),
    35                 __( 'Variation Swatches', 'wcvs' ),
    36                 'manage_options',
    37                 'variation-swatches-settings',
    38                 array( $this, 'render' )
     58                null,
     59                WCVS_PLUGIN_URL . 'assets/images/admin-menu-icon.png',
     60                4.9
    3961            );
    40         } else {
    41             add_menu_page(
    42                 __( 'Variation Swatches', 'wcvs' ),
    43                 __( 'Variation Swatches', 'wcvs' ),
    44                 'manage_options',
    45                 'variation-swatches-settings',
    46                 array( $this, 'render' ),
    47                 'dashicons-ellipsis',
    48                 12 );
    49 
    50             add_submenu_page(
    51                 'variation-swatches-settings',
    52                 __( 'Settings', 'wcvs' ),
    53                 __( 'Settings', 'wcvs' ),
    54                 'manage_options',
    55                 'variation-swatches-settings',
    56                 array( $this, 'render' )
     62        }
     63
     64
     65        add_submenu_page(
     66            'woosuite-core',
     67            __( 'Variation Swatches', 'wcvs' ),
     68            __( 'Variation Swatches', 'wcvs' ),
     69            'manage_options',
     70            'variation-swatches-settings',
     71            array( $this, 'render' )
     72        );
     73
     74        add_submenu_page(
     75            'woosuite-core',
     76            __( 'Woosuite Addons', 'wcvs' ),
     77            __( 'Addons', 'wcvs' ),
     78            'manage_options',
     79            'variation-swatches-addons',
     80            array( $this, 'render_addons' )
     81        );
     82
     83        //Adding fake pages
     84        if ( ! TA_WC_Variation_Swatches::is_woo_core_active() ) {
     85            $list_of_fake_pages = array(
     86                array(
     87                    'label'    => __( 'Upgrade to Pro!', 'wcvs' ),
     88                    'path'     => 'woosuite-variation-swatches-pro/woosuite-variation-swatches-pro.php',
     89                    'position' => 999999
     90                )
     91
    5792            );
    58             add_submenu_page(
    59                 'variation-swatches-settings',
    60                 __( 'Woosuite Addons', 'wcvs' ),
    61                 __( 'Addons', 'wcvs' ),
    62                 'manage_options',
    63                 'variation-swatches-addons',
    64                 array( $this, 'render_addons' )
    65             );
     93            foreach ( $list_of_fake_pages as $fake_page_data ) {
     94                if ( Swatch_AovUp_Freemium::is_plugin_activated( $fake_page_data['path'] ) ) {
     95                    continue;
     96                }
     97                add_submenu_page(
     98                    'woosuite-core',
     99                    $fake_page_data['label'],
     100                    $fake_page_data['label'],
     101                    'manage_options',
     102                    'aovup-swatch' . sanitize_title( $fake_page_data['label'] ),
     103                    array( $this, 'render_fake_page' ),
     104                    $fake_page_data['position'] ?? null
     105                );
     106            }
     107        }
     108
     109        //Adding hack to remove the first sub menu page
     110        if ( ! TA_WC_Variation_Swatches::is_woo_core_active() ) {
     111            remove_submenu_page( 'woosuite-core', 'woosuite-core' );
    66112        }
    67113
     
    78124    public function render_addons() {
    79125        TA_WC_Variation_Swatches::get_template( 'admin/addons-pages.php' );
     126    }
     127
     128    public function render_fake_page() {
     129        TA_WC_Variation_Swatches::get_template( 'admin/freemium.php' );
    80130    }
    81131
  • variation-swatches-for-woocommerce/tags/2.2.2/includes/class-variation-swatches.php

    r3015148 r3057143  
    6060        if ( is_admin() ) {
    6161            require_once $current_dir . '/class-admin.php';
     62            require_once $current_dir . '/class-aovup-freemium.php';
    6263            if ( ! self::is_woo_core_active() ) {
    6364                require_once $current_dir . '/class-addon-page.php';
  • variation-swatches-for-woocommerce/tags/2.2.2/readme.txt

    r3015148 r3057143  
    33Tags: variation swatches, woocommerce color swatches, variation swatches for woocommerce
    44Requires at least: 4.5
    5 Tested up to: 6.4.2
    6 Stable tag: 2.2.1
     5Tested up to: 6.4.3
     6Stable tag: 2.2.2
    77WC requires at least: 3.2.0
    8 WC tested up to: 8.4.0
     8WC tested up to: 8.7.0
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    104104
    105105== Changelog ==
     106= 2.2.2 =
     107* Update: WooCommerce and WordPress Compatibility
     108* Move setting to submenu
     109
    106110= 2.2.1 =
    107111* Add support for Woo HPOS feature
  • variation-swatches-for-woocommerce/tags/2.2.2/templates/admin/addons-pages.php

    r2602534 r3057143  
    1212                    <div class="opt-module-banner-grid">
    1313                        <div class="opt-main-content-banner">
    14                             <h3 class="opt-banner-title"><?php _e('All Woosuite Plugins','wcvs');?></h3>
     14                            <h3 class="opt-banner-title"><?php _e('Supercharge Your Store!','wcvs');?></h3>
    1515                            <p><?php _e('You can view and check more details on our plugins below', 'wcvs');?></p>
    1616                        </div>
  • variation-swatches-for-woocommerce/tags/2.2.2/templates/admin/partials/panel-sidebar.php

    r2674287 r3057143  
    2121
    2222        if ( ! $all_plugins = get_transient( 'woosuite-all-plugins' ) ) {
    23             $request = wp_remote_request( 'https://dw.woosuite.com/wp-json/woosuite-server/v1/plugins/' );
     23            $request = wp_remote_request( 'https://dw.aovup.com/wp-json/woosuite-server/v1/plugins/' );
    2424
    2525            if ( ! is_wp_error( $request ) ) {
  • variation-swatches-for-woocommerce/tags/2.2.2/templates/admin/welcome-popup.php

    r3015148 r3057143  
    77        <div class="popup-content">
    88            <div class="popup-inner-content">
    9                 <p><strong>Variation Swatches 2.2.1 is here! 🥳🥳</strong></p>
     9                <p><strong>Variation Swatches 2.2.2 is here! 🥳🥳</strong></p>
    1010                <p>This version adds support for WooCommerce HPOS but more importantly extends the support of <a href="https://aovup.com/lp/variations-swatches-upgrade/?ref=update-message">our Pro version</a>.</p>
    1111                <p>A lot of our best features come from your feedback, so let us know what you would like to see next.</p>
  • variation-swatches-for-woocommerce/tags/2.2.2/variation-swatches-for-woocommerce.php

    r3015148 r3057143  
    44 * Plugin URI: https://aovup.com/plugins/woocommerce-variation-swatches/
    55 * Description: Creates variation swatches for WooCommerce, converts your variation dropdown into color, label, or photo swatches with ease, The original Variation Swatches for WooCommerce.
    6  * Version: 2.2.1
     6 * Version: 2.2.2
    77 * Author: AovUp
    88 * Author URI: https://aovup.com/
    99 * Requires at least: 4.5
    10  * Tested up to: 6.4.2
     10 * Tested up to: 6.4.3
    1111 * Text Domain: wcvs
    1212 * Domain Path: /languages
    1313 * WC requires at least: 3.0.0
    14  * WC tested up to: 8.4.0
     14 * WC tested up to: 8.7.0
    1515 *
    1616 * License: GPLv2 or later
     
    2828
    2929if ( ! defined( 'WCVS_PLUGIN_VERSION' ) ) {
    30     define( 'WCVS_PLUGIN_VERSION', '2.2.1' );
     30    define( 'WCVS_PLUGIN_VERSION', '2.2.2' );
    3131}
    3232
  • variation-swatches-for-woocommerce/trunk/includes/class-addon-page.php

    r2602534 r3057143  
    3434
    3535        private function woosuite_core_get_api_site_url() {
    36             return apply_filters( 'woosuite_core_get_api_site_url', 'https://dw.woosuite.com/' );
     36            return apply_filters( 'woosuite_core_get_api_site_url', 'https://dw.aovup.com/' );
    3737        }
    3838    }
  • variation-swatches-for-woocommerce/trunk/includes/class-admin.php

    r3015148 r3057143  
    282282        $screen   = get_current_screen();
    283283        $dir_name = dirname( __FILE__ );
     284
     285        wp_enqueue_style( 'tawcvs-admin-common-css', plugins_url( '/assets/css/common.css', $dir_name ), null, WCVS_PLUGIN_VERSION );
     286        wp_enqueue_script( 'tawcvs-admin-common-js', plugins_url( '/assets/js/common.js', $dir_name ), null, WCVS_PLUGIN_VERSION );
     287
     288        wp_localize_script(
     289            'tawcvs-admin-common-js',
     290            'tawcvs',
     291            array(
     292                'ajaxUrl' => admin_url( 'admin-ajax.php' ),
     293                'adminUrl' => admin_url()
     294            )
     295        );
    284296
    285297        if ( strpos( $screen->id, 'variation-swatches-addons' ) !== false ) {
  • variation-swatches-for-woocommerce/trunk/includes/class-menu-page.php

    r2696047 r3057143  
    1515
    1616        add_action( 'admin_menu', array( $this, 'handle_save_actions' ), 5 );
    17         add_action( 'admin_menu', array( $this, 'admin_menu' ) );
     17        add_action( 'admin_menu', array( $this, 'admin_menu' ), 99 );
     18        add_action( 'admin_menu', array( $this, 'handle_external_link' ), 100 );
     19
    1820
    1921        add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) );
     
    2123    }
    2224
     25    /**
     26     * @return void
     27     */
     28    public function handle_external_link() {
     29        global $submenu;
     30        $pro_external_url = 'https://aovup.com/lp/variations-swatches-upgrade/?utm_source=dashboard&utm_medium=menu-link&utm_campaign=swatch-offer&utm_id=dashboard-upgrade';
     31
     32        if ( isset( $submenu['woosuite-core'] ) ) {
     33            foreach ( $submenu['woosuite-core'] as $index => $menu_data ) {
     34                if ( $menu_data[2] === 'aovup-swatchupgrade-to-pro' ) {
     35                    $submenu['woosuite-core'][ $index ][2] = $pro_external_url;
     36                    $submenu['woosuite-core'][ $index ][4] = 'aovup-pro-upgrade-link';
     37                }
     38            }
     39        }
     40    }
     41
    2342    public function admin_scripts() {
    2443        if ( TA_WC_Variation_Swatches::is_in_plugin_settings_page() ) {
     
    2948
    3049    public function admin_menu() {
    31         if ( TA_WC_Variation_Swatches::is_woo_core_active() ) {
    32             add_submenu_page(
     50        global $admin_page_hooks;
     51        if ( ! TA_WC_Variation_Swatches::is_woo_core_active() && empty ( $admin_page_hooks['woosuite-core'] ) ) {
     52            // Register fake top AovUp menu.
     53            add_menu_page(
     54                __( 'AOVup Core', 'wcvs' ),
     55                __( 'AOVup', 'wcvs' ),
     56                'manage_options',
    3357                'woosuite-core',
    34                 __( 'Variation Swatches', 'wcvs' ),
    35                 __( 'Variation Swatches', 'wcvs' ),
    36                 'manage_options',
    37                 'variation-swatches-settings',
    38                 array( $this, 'render' )
     58                null,
     59                WCVS_PLUGIN_URL . 'assets/images/admin-menu-icon.png',
     60                4.9
    3961            );
    40         } else {
    41             add_menu_page(
    42                 __( 'Variation Swatches', 'wcvs' ),
    43                 __( 'Variation Swatches', 'wcvs' ),
    44                 'manage_options',
    45                 'variation-swatches-settings',
    46                 array( $this, 'render' ),
    47                 'dashicons-ellipsis',
    48                 12 );
    49 
    50             add_submenu_page(
    51                 'variation-swatches-settings',
    52                 __( 'Settings', 'wcvs' ),
    53                 __( 'Settings', 'wcvs' ),
    54                 'manage_options',
    55                 'variation-swatches-settings',
    56                 array( $this, 'render' )
     62        }
     63
     64
     65        add_submenu_page(
     66            'woosuite-core',
     67            __( 'Variation Swatches', 'wcvs' ),
     68            __( 'Variation Swatches', 'wcvs' ),
     69            'manage_options',
     70            'variation-swatches-settings',
     71            array( $this, 'render' )
     72        );
     73
     74        add_submenu_page(
     75            'woosuite-core',
     76            __( 'Woosuite Addons', 'wcvs' ),
     77            __( 'Addons', 'wcvs' ),
     78            'manage_options',
     79            'variation-swatches-addons',
     80            array( $this, 'render_addons' )
     81        );
     82
     83        //Adding fake pages
     84        if ( ! TA_WC_Variation_Swatches::is_woo_core_active() ) {
     85            $list_of_fake_pages = array(
     86                array(
     87                    'label'    => __( 'Upgrade to Pro!', 'wcvs' ),
     88                    'path'     => 'woosuite-variation-swatches-pro/woosuite-variation-swatches-pro.php',
     89                    'position' => 999999
     90                )
     91
    5792            );
    58             add_submenu_page(
    59                 'variation-swatches-settings',
    60                 __( 'Woosuite Addons', 'wcvs' ),
    61                 __( 'Addons', 'wcvs' ),
    62                 'manage_options',
    63                 'variation-swatches-addons',
    64                 array( $this, 'render_addons' )
    65             );
     93            foreach ( $list_of_fake_pages as $fake_page_data ) {
     94                if ( Swatch_AovUp_Freemium::is_plugin_activated( $fake_page_data['path'] ) ) {
     95                    continue;
     96                }
     97                add_submenu_page(
     98                    'woosuite-core',
     99                    $fake_page_data['label'],
     100                    $fake_page_data['label'],
     101                    'manage_options',
     102                    'aovup-swatch' . sanitize_title( $fake_page_data['label'] ),
     103                    array( $this, 'render_fake_page' ),
     104                    $fake_page_data['position'] ?? null
     105                );
     106            }
     107        }
     108
     109        //Adding hack to remove the first sub menu page
     110        if ( ! TA_WC_Variation_Swatches::is_woo_core_active() ) {
     111            remove_submenu_page( 'woosuite-core', 'woosuite-core' );
    66112        }
    67113
     
    78124    public function render_addons() {
    79125        TA_WC_Variation_Swatches::get_template( 'admin/addons-pages.php' );
     126    }
     127
     128    public function render_fake_page() {
     129        TA_WC_Variation_Swatches::get_template( 'admin/freemium.php' );
    80130    }
    81131
  • variation-swatches-for-woocommerce/trunk/includes/class-variation-swatches.php

    r3015148 r3057143  
    6060        if ( is_admin() ) {
    6161            require_once $current_dir . '/class-admin.php';
     62            require_once $current_dir . '/class-aovup-freemium.php';
    6263            if ( ! self::is_woo_core_active() ) {
    6364                require_once $current_dir . '/class-addon-page.php';
  • variation-swatches-for-woocommerce/trunk/readme.txt

    r3015148 r3057143  
    33Tags: variation swatches, woocommerce color swatches, variation swatches for woocommerce
    44Requires at least: 4.5
    5 Tested up to: 6.4.2
    6 Stable tag: 2.2.1
     5Tested up to: 6.4.3
     6Stable tag: 2.2.2
    77WC requires at least: 3.2.0
    8 WC tested up to: 8.4.0
     8WC tested up to: 8.7.0
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    104104
    105105== Changelog ==
     106= 2.2.2 =
     107* Update: WooCommerce and WordPress Compatibility
     108* Move setting to submenu
     109
    106110= 2.2.1 =
    107111* Add support for Woo HPOS feature
  • variation-swatches-for-woocommerce/trunk/templates/admin/addons-pages.php

    r2602534 r3057143  
    1212                    <div class="opt-module-banner-grid">
    1313                        <div class="opt-main-content-banner">
    14                             <h3 class="opt-banner-title"><?php _e('All Woosuite Plugins','wcvs');?></h3>
     14                            <h3 class="opt-banner-title"><?php _e('Supercharge Your Store!','wcvs');?></h3>
    1515                            <p><?php _e('You can view and check more details on our plugins below', 'wcvs');?></p>
    1616                        </div>
  • variation-swatches-for-woocommerce/trunk/templates/admin/partials/panel-sidebar.php

    r2674287 r3057143  
    2121
    2222        if ( ! $all_plugins = get_transient( 'woosuite-all-plugins' ) ) {
    23             $request = wp_remote_request( 'https://dw.woosuite.com/wp-json/woosuite-server/v1/plugins/' );
     23            $request = wp_remote_request( 'https://dw.aovup.com/wp-json/woosuite-server/v1/plugins/' );
    2424
    2525            if ( ! is_wp_error( $request ) ) {
  • variation-swatches-for-woocommerce/trunk/templates/admin/welcome-popup.php

    r3015148 r3057143  
    77        <div class="popup-content">
    88            <div class="popup-inner-content">
    9                 <p><strong>Variation Swatches 2.2.1 is here! 🥳🥳</strong></p>
     9                <p><strong>Variation Swatches 2.2.2 is here! 🥳🥳</strong></p>
    1010                <p>This version adds support for WooCommerce HPOS but more importantly extends the support of <a href="https://aovup.com/lp/variations-swatches-upgrade/?ref=update-message">our Pro version</a>.</p>
    1111                <p>A lot of our best features come from your feedback, so let us know what you would like to see next.</p>
  • variation-swatches-for-woocommerce/trunk/variation-swatches-for-woocommerce.php

    r3015148 r3057143  
    44 * Plugin URI: https://aovup.com/plugins/woocommerce-variation-swatches/
    55 * Description: Creates variation swatches for WooCommerce, converts your variation dropdown into color, label, or photo swatches with ease, The original Variation Swatches for WooCommerce.
    6  * Version: 2.2.1
     6 * Version: 2.2.2
    77 * Author: AovUp
    88 * Author URI: https://aovup.com/
    99 * Requires at least: 4.5
    10  * Tested up to: 6.4.2
     10 * Tested up to: 6.4.3
    1111 * Text Domain: wcvs
    1212 * Domain Path: /languages
    1313 * WC requires at least: 3.0.0
    14  * WC tested up to: 8.4.0
     14 * WC tested up to: 8.7.0
    1515 *
    1616 * License: GPLv2 or later
     
    2828
    2929if ( ! defined( 'WCVS_PLUGIN_VERSION' ) ) {
    30     define( 'WCVS_PLUGIN_VERSION', '2.2.1' );
     30    define( 'WCVS_PLUGIN_VERSION', '2.2.2' );
    3131}
    3232
Note: See TracChangeset for help on using the changeset viewer.