Plugin Directory

Changeset 3127006


Ignore:
Timestamp:
07/29/2024 04:47:37 AM (20 months ago)
Author:
wcboost
Message:

update code of the version 1.0.7

Location:
wcboost-products-compare/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • wcboost-products-compare/trunk/includes/compare-list.php

    r3122349 r3127006  
    3232            $this->id = wc_rand_hash();
    3333
    34             if ( did_action( 'wp_loaded' ) ) {
     34            if ( ! did_action( 'wp_loaded' ) ) {
     35                add_action( 'wp_loaded', [ $this, 'load_products_from_session' ] );
     36            } else {
    3537                $this->load_products_from_session();
    36             } else {
    37                 add_action( 'wp_loaded', [ $this, 'load_products_from_session' ] );
    3838            }
    3939        }
     
    213213
    214214        if ( $reset_db ) {
    215             $this->id = '';
    216215            $this->delete();
    217216        }
     
    350349    public function delete_persistent_list() {
    351350        if ( $this->get_id() && get_current_user_id() && apply_filters( 'wcboost_products_compare_persistent_enabled', true ) ) {
    352             delete_user_meta( get_current_user_id(), '_woocommerce_persistent_cart_' . get_current_blog_id() );
     351            delete_user_meta( get_current_user_id(), '_wcboost_products_compare_' . get_current_blog_id() );
    353352        }
    354353    }
  • wcboost-products-compare/trunk/includes/plugin.php

    r3122349 r3127006  
    177177     * Initialize the list of compare products
    178178     *
    179      * @return void
    180      */
    181     public function initialize_list() {
    182         $this->list = new Compare_List();
    183 
    184         $this->list->init();
     179     * @param bool $force Force initialization
     180     *
     181     * @return void
     182     */
     183    public function initialize_list( $force = false ) {
     184        if ( ! $this->list || $force ) {
     185            $this->list = new Compare_List();
     186
     187            $this->list->init();
     188        }
    185189    }
    186190
     
    196200
    197201        if ( $reset_db ) {
    198             $this->initialize_list();
     202            $this->initialize_list( true );
    199203        }
    200204    }
  • wcboost-products-compare/trunk/languages/wcboost-products-compare.pot

    r3122349 r3127006  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WCBoost - Products Compare 1.0.6\n"
     5"Project-Id-Version: WCBoost - Products Compare 1.0.7\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wcboost-products-compare\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2024-07-20T04:09:17+00:00\n"
     12"POT-Creation-Date: 2024-07-29T04:38:16+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.9.0\n"
  • wcboost-products-compare/trunk/readme.txt

    r3122349 r3127006  
    33Tags: woocommerce, compare, product, product compare, woocommerce compare
    44Tested up to: 6.6
    5 Stable tag: 1.0.6
     5Stable tag: 1.0.7
    66Requires PHP: 7.0
    77Requires at least: 4.5
    88WC requires at least: 3.0.0
    9 WC tested up to: 8.9
     9WC tested up to: 9.1
    1010License: GPLv3
    1111License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    111111== Changelog ==
    112112
     113= 1.0.7 =
     114* Fixed - Cannot clear the comparison list.
     115* Tweak - WooCommerce 9.1 compatibility.
     116
    113117= 1.0.6 =
    114118* Improve - Support persistent caching for logged-in users.
     
    119123* Fixed - Adds the nofollow attribute to compare buttons
    120124* Tweak - WordPress 6.5 compatibility.
    121 * Tweak WooCommerce 8.9 compatibility.
     125* Tweak - WooCommerce 8.9 compatibility.
    122126
    123127= 1.0.4 =
  • wcboost-products-compare/trunk/wcboost-products-compare.php

    r3122349 r3127006  
    55 * Plugin URI: https://wcboost.com/plugin/woocommerce-products-compare/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash
    66 * Author: WCBoost
    7  * Version: 1.0.6
     7 * Version: 1.0.7
    88 * Author URI: https://wcboost.com/?utm_source=wp-plugins&utm_campaign=author-uri&utm_medium=wp-dash
    99 *
     
    1515 * Tested up to: 6.6
    1616 * WC requires at least: 3.0.0
    17  * WC tested up to: 8.9
     17 * WC tested up to: 9.1
    1818 *
    1919 * @package WCBoost
Note: See TracChangeset for help on using the changeset viewer.