Plugin Directory

Changeset 3039108


Ignore:
Timestamp:
02/21/2024 10:33:10 AM (23 months ago)
Author:
templateinvaders
Message:

version 2.8.1

Location:
ti-woocommerce-wishlist
Files:
294 added
21 edited

Legend:

Unmodified
Added
Removed
  • ti-woocommerce-wishlist/trunk/assets/css/admin-form-rtl.min.css

    r3001363 r3039108  
    11/**
    22 * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist.  Add Wishlist functionality to your store for free.
    3  * @version 2.8.0
     3 * @version 2.8.1
    44 * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
    55 */
  • ti-woocommerce-wishlist/trunk/assets/css/admin-form.min.css

    r3001363 r3039108  
    11/**
    22 * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist.  Add Wishlist functionality to your store for free.
    3  * @version 2.8.0
     3 * @version 2.8.1
    44 * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
    55 */
  • ti-woocommerce-wishlist/trunk/assets/css/admin-rtl.min.css

    r3001363 r3039108  
    11/**
    22 * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist.  Add Wishlist functionality to your store for free.
    3  * @version 2.8.0
     3 * @version 2.8.1
    44 * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
    55 */
  • ti-woocommerce-wishlist/trunk/assets/css/admin-setup-rtl.min.css

    r3001363 r3039108  
    11/**
    22 * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist.  Add Wishlist functionality to your store for free.
    3  * @version 2.8.0
     3 * @version 2.8.1
    44 * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
    55 */
  • ti-woocommerce-wishlist/trunk/assets/css/admin-setup.min.css

    r3001363 r3039108  
    11/**
    22 * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist.  Add Wishlist functionality to your store for free.
    3  * @version 2.8.0
     3 * @version 2.8.1
    44 * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
    55 */
  • ti-woocommerce-wishlist/trunk/assets/css/admin.min.css

    r3001363 r3039108  
    11/**
    22 * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist.  Add Wishlist functionality to your store for free.
    3  * @version 2.8.0
     3 * @version 2.8.1
    44 * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
    55 */
  • ti-woocommerce-wishlist/trunk/assets/css/public-rtl.min.css

    r3001363 r3039108  
    11/**
    22 * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist.  Add Wishlist functionality to your store for free.
    3  * @version 2.8.0
     3 * @version 2.8.1
    44 * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
    55 */
  • ti-woocommerce-wishlist/trunk/assets/css/public.min.css

    r3001363 r3039108  
    11/**
    22 * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist.  Add Wishlist functionality to your store for free.
    3  * @version 2.8.0
     3 * @version 2.8.1
    44 * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
    55 */
  • ti-woocommerce-wishlist/trunk/assets/css/theme-rtl.min.css

    r3001363 r3039108  
    11/**
    22 * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist.  Add Wishlist functionality to your store for free.
    3  * @version 2.8.0
     3 * @version 2.8.1
    44 * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
    55 */
  • ti-woocommerce-wishlist/trunk/assets/css/theme.min.css

    r3001363 r3039108  
    11/**
    22 * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist.  Add Wishlist functionality to your store for free.
    3  * @version 2.8.0
     3 * @version 2.8.1
    44 * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
    55 */
  • ti-woocommerce-wishlist/trunk/assets/css/webfont-rtl.min.css

    r3001363 r3039108  
    11/**
    22 * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist.  Add Wishlist functionality to your store for free.
    3  * @version 2.8.0
     3 * @version 2.8.1
    44 * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
    55 */
  • ti-woocommerce-wishlist/trunk/assets/css/webfont.min.css

    r3001363 r3039108  
    11/**
    22 * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist.  Add Wishlist functionality to your store for free.
    3  * @version 2.8.0
     3 * @version 2.8.1
    44 * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
    55 */
  • ti-woocommerce-wishlist/trunk/assets/js/admin.min.js

    r3001363 r3039108  
    11/**
    22 * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist.  Add Wishlist functionality to your store for free.
    3  * @version 2.8.0
     3 * @version 2.8.1
    44 * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
    55 */
  • ti-woocommerce-wishlist/trunk/assets/js/public.min.js

    r3001363 r3039108  
    11/**
    22 * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist.  Add Wishlist functionality to your store for free.
    3  * @version 2.8.0
     3 * @version 2.8.1
    44 * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
    55 */
  • ti-woocommerce-wishlist/trunk/includes/api/wishlist.class.php

    r3001363 r3039108  
    105105        $user_id = absint( $request->get_param( 'user_id' ) );
    106106
    107         if ( empty( $user_id ) || ! $this->user_id_exists( $user_id ) ) {
     107        if ( $user_id && ! $this->user_id_exists( $user_id ) ) {
    108108            return new WP_Error( 'ti_woocommerce_wishlist_api_wishlist_user_not_exists', __( 'WordPress user does not exist.', 'ti-woocommerce-wishlist' ), [ 'status' => 400 ] );
    109109        }
    110 
    111         $wl        = new TInvWL_Wishlist();
    112         $wishlists = $wl->get_by_user( $user_id );
    113 
    114         if ( ! $wishlists ) {
    115             return new WP_Error( 'ti_woocommerce_wishlist_api_wishlist_not_found', __( 'No wishlists found for this user.', 'ti-woocommerce-wishlist' ), [ 'status' => 400 ] );
    116         }
    117 
     110        $wl = new TInvWL_Wishlist();
     111
     112        if ( 0 === $user_id ) {
     113
     114            $wishlists[] = $wl->add_sharekey_default();
     115
     116        } else {
     117
     118            $wishlists = $wl->get_by_user( $user_id );
     119
     120            if ( ! $wishlists ) {
     121                return new WP_Error( 'ti_woocommerce_wishlist_api_wishlist_not_found', __( 'No wishlists found for this user.', 'ti-woocommerce-wishlist' ), [ 'status' => 400 ] );
     122            }
     123        }
    118124        $response = array_map( function ( $wishlist ) use ( $request ) {
    119125            return $this->prepare_wishlist_data( $wishlist, 'get_by_user', $request->get_params() );
     
    176182        $args = [
    177183            'wishlist_id' => $wishlist['wishlist']['ID'],
    178             'external'    => false,
    179             'count'       => $request->get_param( 'count' ),
    180             'offset'      => $request->get_param( 'offset' ),
    181             'order'       => $request->get_param( 'order' ),
     184            'external'    => false
    182185        ];
     186
     187        if ( null !== ( $count = $request->get_param( 'count' ) ) ) {
     188            $args['count'] = $count;
     189        }
     190        if ( null !== ( $offset = $request->get_param( 'offset' ) ) ) {
     191            $args['offset'] = $offset;
     192        }
     193        if ( null !== ( $order = $request->get_param( 'order' ) ) ) {
     194            $args['order'] = $order;
     195        }
     196
    183197
    184198        $products = $wlp->get( $args );
  • ti-woocommerce-wishlist/trunk/includes/wishlist.class.php

    r3001363 r3039108  
    512512            self::$default_sharekey = $tinvwl_wishlist_sharekey = $sharekey;
    513513            @setcookie( 'tinv_wishlistkey', self::$default_sharekey, time() + 31 * DAY_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN );
    514             set_transient( '_tinvwl_update_wishlists_data', '1' );
     514//          set_transient( '_tinvwl_update_wishlists_data', '1' );
    515515        }
    516516
  • ti-woocommerce-wishlist/trunk/languages/ti-woocommerce-wishlist.pot

    r3001363 r3039108  
    1 # Copyright (C) 2023 TI WooCommerce Wishlist Plugin - 2.8.0
    2 # This file is distributed under the same license as the TI WooCommerce Wishlist Plugin - 2.8.0 package.
     1# Copyright (C) 2024 TI WooCommerce Wishlist Plugin - 2.8.1
     2# This file is distributed under the same license as the TI WooCommerce Wishlist Plugin - 2.8.1 package.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: TI WooCommerce Wishlist Plugin - 2.8.0\n"
     5"Project-Id-Version: TI WooCommerce Wishlist Plugin - 2.8.1\n"
    66"MIME-Version: 1.0\n"
    77"Content-Type: text/plain; charset=UTF-8\n"
     
    1212"Last-Translator: TemplateInvaders (https://templateinvaders.com/)\n"
    1313"MIME-Version: 1.0\n"
    14 "Project-Id-Version: TI WooCommerce Wishlist Plugin - 2.8.0\n"
     14"Project-Id-Version: TI WooCommerce Wishlist Plugin - 2.8.1\n"
    1515"Report-Msgid-Bugs-To: https://templateinvaders.com/help/\n"
    1616"X-Poedit-Basepath: ..\n"
     
    933933msgstr ""
    934934
    935 #: includes/api/wishlist.class.php:83, includes/api/wishlist.class.php:89, includes/api/wishlist.class.php:279, includes/api/wishlist.class.php:286
     935#: includes/api/wishlist.class.php:83, includes/api/wishlist.class.php:89, includes/api/wishlist.class.php:293, includes/api/wishlist.class.php:300
    936936msgid "Invalid wishlist share key."
    937937msgstr ""
     
    941941msgstr ""
    942942
    943 #: includes/api/wishlist.class.php:115
     943#: includes/api/wishlist.class.php:121
    944944msgid "No wishlists found for this user."
    945945msgstr ""
    946946
    947 #: includes/api/wishlist.class.php:149, includes/api/wishlist.class.php:153
     947#: includes/api/wishlist.class.php:155, includes/api/wishlist.class.php:159
    948948msgid "Update wishlist data failed."
    949949msgstr ""
    950950
    951 #: includes/api/wishlist.class.php:208, includes/api/wishlist.class.php:223
     951#: includes/api/wishlist.class.php:222, includes/api/wishlist.class.php:237
    952952msgid "Add product to wishlist failed."
    953953msgstr ""
    954954
    955 #: includes/api/wishlist.class.php:245
     955#: includes/api/wishlist.class.php:259
    956956msgid "Invalid item ID."
    957957msgstr ""
    958958
    959 #: includes/api/wishlist.class.php:252, includes/api/wishlist.class.php:262
     959#: includes/api/wishlist.class.php:266, includes/api/wishlist.class.php:276
    960960msgid "Product not found."
    961961msgstr ""
    962962
    963 #: includes/api/wishlist.class.php:256
     963#: includes/api/wishlist.class.php:270
    964964msgid "Remove product from wishlist failed."
    965965msgstr ""
    966966
    967 #: includes/api/wishlist.class.php:265
     967#: includes/api/wishlist.class.php:279
    968968msgid "Product removed from a wishlist."
    969969msgstr ""
  • ti-woocommerce-wishlist/trunk/public/tinvwl.class.php

    r3001363 r3039108  
    598598
    599599    function logout( $user_id ) {
    600         set_transient( '_tinvwl_update_wishlists_data', '1' );
     600//      set_transient( '_tinvwl_update_wishlists_data', '1' );
    601601    }
    602602
     
    608608    function transfert_local_to_user_register( $user_id ) {
    609609
    610         set_transient( '_tinvwl_update_wishlists_data', '1' );
     610//      set_transient( '_tinvwl_update_wishlists_data', '1' );
    611611
    612612        $wl       = new TInvWL_Wishlist( $this->_name );
  • ti-woocommerce-wishlist/trunk/public/wishlistcounter.class.php

    r2928776 r3039108  
    226226            $wishlist = $this->get_user_wishlists();
    227227            $wlp      = new TInvWL_Product();
    228             $counts   = $wlp->get( array(
    229                 'external'    => false,
    230                 'wishlist_id' => $wishlist['ID'],
    231                 'sql'         => 'SELECT COUNT(`quantity`) AS `quantity` FROM {table} t1 INNER JOIN ' . $wpdb->prefix . 'posts t2 on t1.product_id = t2.ID AND t2.post_status IN ("publish","private") WHERE {where} ',
    232             ) );
    233             $counts   = array_shift( $counts );
    234             $count    = absint( $counts['quantity'] );
     228            if ( $wishlist ) {
     229                $counts = $wlp->get( array(
     230                    'external'    => false,
     231                    'wishlist_id' => $wishlist['ID'],
     232                    'sql'         => 'SELECT COUNT(`quantity`) AS `quantity` FROM {table} t1 INNER JOIN ' . $wpdb->prefix . 'posts t2 on t1.product_id = t2.ID AND t2.post_status IN ("publish","private") WHERE {where} ',
     233                ) );
     234                $counts = array_shift( $counts );
     235                $count  = absint( $counts['quantity'] );
     236            }
    235237        } else {
    236238            $wishlist = $this->get_guest_wishlist();
     
    247249        }
    248250
    249         return $count ? $count : ( tinv_get_option( 'topline', 'hide_zero_counter' ) ? false : 0 );
     251        return $count ?: ( tinv_get_option( 'topline', 'hide_zero_counter' ) ? false : 0 );
    250252    }
    251253
  • ti-woocommerce-wishlist/trunk/readme.txt

    r3001363 r3039108  
    44Requires at least: 6.1
    55Tested up to: 6.4
    6 Stable tag: 2.8.0
     6Stable tag: 2.8.1
    77Requires PHP: 7.4
    88License: GPLv3
     
    159159
    160160== Changelog ==
     161= 2.8.1 =
     162*Release Date - 21 February 2024*
     163
     164- **Added**: Support for WooCommerce 8.6.x
     165- **Added**: Wishlist creation for guests via REST API. Use the route wp-json/wc/v3/wishlist/get_by_user/0
     166- **Fixed**: PHP warning in wishlist products counter
     167- **Fixed**: PHP error on plugin uninstall
     168- **Removed**: Network activation restriction
     169- **Fixed**: Issue with REST API get products request arguments
     170
     171
    161172= 2.8.0 =
    162173*Release Date - 24 November 2023*
  • ti-woocommerce-wishlist/trunk/ti-woocommerce-wishlist.php

    r3001363 r3039108  
    55 * Plugin URI:        https://wordpress.org/plugins/ti-woocommerce-wishlist/
    66 * Description:       Wishlist functionality for your WooCommerce store.
    7  * Version:           2.8.0
     7 * Version:           2.8.1
    88 * Requires at least: 6.1
    99 * Tested up to: 6.4
    1010 * Requires PHP: 7.4
    1111 * WC requires at least: 3.2
    12  * WC tested up to: 8.3
     12 * WC tested up to: 8.6
    1313 * Author:            TemplateInvaders
    1414 * Author URI:        https://templateinvaders.com/
     
    2929defined( 'TINVWL_PREFIX' ) || define( 'TINVWL_PREFIX', 'tinvwl' );
    3030defined( 'TINVWL_DOMAIN' ) || define( 'TINVWL_DOMAIN', 'ti-woocommerce-wishlist' );
    31 defined( 'TINVWL_FVERSION' ) || define( 'TINVWL_FVERSION', '2.8.0' );
     31defined( 'TINVWL_FVERSION' ) || define( 'TINVWL_FVERSION', '2.8.1' );
    3232defined( 'TINVWL_LOAD_FREE' ) || define( 'TINVWL_LOAD_FREE', plugin_basename( __FILE__ ) );
    3333defined( 'TINVWL_NAME' ) || define( 'TINVWL_NAME', 'TI WooCommerce Wishlist' );
     
    128128    function uninstall_tinv_wishlist(): void {
    129129        if ( ! defined( 'TINVWL_LOAD_PREMIUM' ) ) {
     130
     131            require_once TINVWL_PATH . 'tinv-wishlists-function.php';
     132
    130133            if ( tinv_get_option( 'uninstall', 'delete_data' ) ) {
    131134                TInvWL_Activator::uninstall();
     
    214217        }
    215218
    216         if ( defined( 'TINVWL_LOAD_PREMIUM' ) && defined( 'TINVWL_LOAD_FREE' ) || defined( 'TINVWL_LOAD_PREMIUM' ) && is_plugin_active_for_network( TINVWL_LOAD_PREMIUM ) || defined( 'TINVWL_LOAD_FREE' ) && is_plugin_active_for_network( TINVWL_LOAD_FREE ) ) {
     219        if ( defined( 'TINVWL_LOAD_PREMIUM' ) && defined( 'TINVWL_LOAD_FREE' ) ) {
    217220            $redirect = tinv_wishlist_status( plugin_basename( __FILE__ ) );
    218221            if ( $redirect ) {
Note: See TracChangeset for help on using the changeset viewer.