Plugin Directory

Changeset 3306868


Ignore:
Timestamp:
06/05/2025 07:42:21 AM (7 months ago)
Author:
templateinvaders
Message:

version 2.10.0

Location:
ti-woocommerce-wishlist
Files:
295 added
38 edited

Legend:

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

    r3199516 r3306868  
    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.9.2
     3 * @version 2.10.0
    44 * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
    55 */
  • ti-woocommerce-wishlist/trunk/assets/css/admin-form.min.css

    r3199516 r3306868  
    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.9.2
     3 * @version 2.10.0
    44 * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
    55 */
  • ti-woocommerce-wishlist/trunk/assets/css/admin-rtl.min.css

    r3199516 r3306868  
    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.9.2
     3 * @version 2.10.0
    44 * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
    55 */
  • ti-woocommerce-wishlist/trunk/assets/css/admin-setup-rtl.min.css

    r3199516 r3306868  
    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.9.2
     3 * @version 2.10.0
    44 * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
    55 */
  • ti-woocommerce-wishlist/trunk/assets/css/admin-setup.min.css

    r3199516 r3306868  
    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.9.2
     3 * @version 2.10.0
    44 * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
    55 */
  • ti-woocommerce-wishlist/trunk/assets/css/admin.min.css

    r3199516 r3306868  
    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.9.2
     3 * @version 2.10.0
    44 * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
    55 */
  • ti-woocommerce-wishlist/trunk/assets/css/public-rtl.min.css

    r3199516 r3306868  
    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.9.2
     3 * @version 2.10.0
    44 * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
    55 */
  • ti-woocommerce-wishlist/trunk/assets/css/public.min.css

    r3199516 r3306868  
    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.9.2
     3 * @version 2.10.0
    44 * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
    55 */
  • ti-woocommerce-wishlist/trunk/assets/css/theme-rtl.min.css

    r3199516 r3306868  
    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.9.2
     3 * @version 2.10.0
    44 * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
    55 */
  • ti-woocommerce-wishlist/trunk/assets/css/theme.min.css

    r3199516 r3306868  
    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.9.2
     3 * @version 2.10.0
    44 * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
    55 */
  • ti-woocommerce-wishlist/trunk/assets/css/webfont-rtl.min.css

    r3199516 r3306868  
    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.9.2
     3 * @version 2.10.0
    44 * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
    55 */
  • ti-woocommerce-wishlist/trunk/assets/css/webfont.min.css

    r3199516 r3306868  
    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.9.2
     3 * @version 2.10.0
    44 * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
    55 */
  • ti-woocommerce-wishlist/trunk/assets/js/admin.min.js

    r3199516 r3306868  
    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.9.2
     3 * @version 2.10.0
    44 * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
    55 */
  • ti-woocommerce-wishlist/trunk/assets/js/public.min.js

    r3199516 r3306868  
    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.9.2
     3 * @version 2.10.0
    44 * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
    55 */
  • ti-woocommerce-wishlist/trunk/integrations/advanced-product-fields-for-woocommerce.php

    r3167298 r3306868  
    55 * @name Advanced Product Fields (Product Addons) for WooCommerce
    66 *
    7  * @version 1.6.1
     7 * @version 1.6.13
    88 *
    99 * @slug advanced-product-fields-for-woocommerce
     
    4646use SW_WAPF\Includes\Classes\Field_Groups;
    4747use SW_WAPF\Includes\Classes\Fields;
    48 use SW_WAPF\Includes\Classes\Helper;
    49 use SW_WAPF\Includes\Controllers\Product_Controller;
    5048use SW_WAPF\Includes\Models\Field;
     49
     50if ( ! function_exists( 'tinv_wishlist_item_meta_hidden_fields_wapf' ) ) {
     51
     52    /**
     53     * Filter hidden fields data
     54     *
     55     * @param array $hidden_fields Fields names array.
     56     *
     57     * @return array
     58     */
     59
     60    function tinv_wishlist_item_meta_hidden_fields_wapf( $hidden_fields ) {
     61        if ( class_exists( 'SW_WAPF\WAPF' ) ) {
     62            $hidden_fields = array_values( array_diff( $hidden_fields, [ 'wapf', 'wapf_field_groups' ] ) );
     63        }
     64
     65        return $hidden_fields;
     66    }
     67
     68    add_filter( 'tinvwl_wishlist_item_meta_hidden_fields', 'tinv_wishlist_item_meta_hidden_fields_wapf', 10, 1 );
     69}
     70
    5171
    5272if ( ! function_exists( 'tinv_wishlist_item_meta_wapf' ) ) {
     
    236256        }
    237257        if ( $wapf_data ) {
    238             $wl_product['meta']['wapf'] = $wapf_data;
     258            $wl_product['meta']['wapf'] = array_merge( $wl_product['meta']['wapf'], $wapf_data );
    239259        }
    240260
  • ti-woocommerce-wishlist/trunk/integrations/cleantalk-spam-protect.php

    r3167298 r3306868  
    55 * @name Anti-Spam by CleanTalk
    66 *
    7  * @version 5.173
     7 * @version 6.56
    88 *
    99 * @slug cleantalk-spam-protect
     
    5757
    5858        foreach ( array_keys( $item_data ) as $key ) {
    59             if ( strpos( $key, 'apbct_' ) === 0 ) {
     59            if ( strpos( $key, 'apbct_' ) === 0 || $key === "ct_bot_detector_event_token" ) {
    6060                unset( $item_data[ $key ] );
    6161            }
  • ti-woocommerce-wishlist/trunk/integrations/duracelltomi-google-tag-manager.php

    r3167298 r3306868  
    55 * @name Google Tag Manager for WordPress
    66 *
    7  * @version 1.10
     7 * @version 1.21.1
    88 *
    99 * @slug duracelltomi-google-tag-manager
  • ti-woocommerce-wishlist/trunk/integrations/elex-woocommerce-catalog-mode.php

    r3167298 r3306868  
    55 * @name ELEX WooCommerce Catalog Mode
    66 *
    7  * @version 1.0.6
     7 * @version 1.5.0
    88 *
    99 * @slug elex-woocommerce-catalog-mode
     
    1414
    1515// If this file is called directly, abort.
    16 if (!defined('ABSPATH')) {
     16if ( ! defined( 'ABSPATH' ) ) {
    1717    exit;
    1818}
     
    2525$name = "ELEX WooCommerce Catalog Mode";
    2626
    27 $available = class_exists('Elex_CM_Price_Discount_Admin');
     27$available = defined( 'ELEX_CATALOG_MODE_MAIN_URL_PATH' );
    2828
    2929$tinvwl_integrations = is_array( $tinvwl_integrations ) ? $tinvwl_integrations : [];
    3030
    31 $tinvwl_integrations[$slug] = array(
    32     'name' => $name,
     31$tinvwl_integrations[ $slug ] = array(
     32    'name'      => $name,
    3333    'available' => $available,
    3434);
    3535
    36 if (!tinv_get_option('integrations', $slug)) {
     36if ( ! tinv_get_option( 'integrations', $slug ) ) {
    3737    return;
    3838}
    3939
    40 if (!$available) {
     40if ( ! $available ) {
    4141    return;
    4242}
     
    4646 * Run hooks on page redirect.
    4747 */
    48 function tinvwl_elex_init()
    49 {
    50     if (class_exists('Elex_CM_Price_Discount_Admin')) {
     48function tinvwl_elex_init() {
     49    if ( defined( 'ELEX_CATALOG_MODE_MAIN_URL_PATH' ) ) {
    5150
    5251        global $post;
    53         $product = wc_get_product($post->ID);
    54         if (!empty($product)) {
    55 
    56             if ('yes' == get_option('eh_pricing_discount_cart_catalog_mode') && 'yes' == get_option('elex_catalog_remove_addtocart_product')) {
    57                 if (!(get_option('eh_pricing_discount_price_catalog_mode_exclude_admin') == 'yes' && in_array('administrator', (array)wp_get_current_user()->roles))) {
    58                     add_action('woocommerce_single_product_summary', 'tinvwl_elex_single_product_summary', 40);
     52        $product = wc_get_product( $post->ID );
     53        if ( ! empty( $product ) ) {
     54            if ( 'yes' == get_option( 'eh_pricing_discount_cart_catalog_mode' ) && 'yes' == get_option( 'elex_catalog_remove_addtocart_product' ) ) {
     55                if ( ! ( get_option( 'eh_pricing_discount_price_catalog_mode_exclude_admin' ) == 'yes' && in_array( 'administrator', (array) wp_get_current_user()->roles ) ) ) {
     56                    add_action( 'woocommerce_single_product_summary', 'tinvwl_elex_single_product_summary', 40 );
    5957                }
    60             } elseif (('yes' == get_post_meta($post->ID, 'product_adjustment_hide_addtocart_catalog', true)) && (('yes' == get_post_meta($post->ID, 'product_adjustment_hide_addtocart_catalog_product', true)) || ('' == get_post_meta($post->ID, 'product_adjustment_hide_addtocart_catalog_product', true)))) {
    61                 if (!(get_post_meta($post->ID, 'product_adjustment_exclude_admin_catalog', true) == 'yes' && in_array('administrator', (array)wp_get_current_user()->roles))) {
    62                     add_action('woocommerce_single_product_summary', 'tinvwl_elex_single_product_summary', 40);
     58            } elseif ( ( 'yes' == get_post_meta( $post->ID, 'product_adjustment_hide_addtocart_catalog', true ) ) && ( ( 'yes' == get_post_meta( $post->ID, 'product_adjustment_hide_addtocart_catalog_product', true ) ) || ( '' == get_post_meta( $post->ID, 'product_adjustment_hide_addtocart_catalog_product', true ) ) ) ) {
     59                if ( ! ( get_post_meta( $post->ID, 'product_adjustment_exclude_admin_catalog', true ) == 'yes' && in_array( 'administrator', (array) wp_get_current_user()->roles ) ) ) {
     60                    add_action( 'woocommerce_single_product_summary', 'tinvwl_elex_single_product_summary', 40 );
    6361                }
    6462            }
     
    6765}
    6866
    69 add_action('template_redirect', 'tinvwl_elex_init');
     67add_action( 'template_redirect', 'tinvwl_elex_init' );
    7068
    7169// Add a custom hook for single page.
    72 function tinvwl_elex_single_product_summary()
    73 {
    74     add_filter('tinvwl_allow_addtowishlist_single_product_summary', '__return_true');
    75     do_action('tinvwl_single_product_summary');
     70function tinvwl_elex_single_product_summary() {
     71    add_filter( 'tinvwl_allow_addtowishlist_single_product_summary', '__return_true' );
     72    do_action( 'tinvwl_single_product_summary' );
    7673}
  • ti-woocommerce-wishlist/trunk/integrations/honeypot.php

    r3167298 r3306868  
    55 * @name WP Armour - Honeypot Anti Spam
    66 *
    7  * @version 2.1.15
     7 * @version 2.2.11
    88 *
    99 * @slug honeypot
  • ti-woocommerce-wishlist/trunk/integrations/mycred.php

    r3167298 r3306868  
    55 * @name myCRED
    66 *
    7  * @version 2.5
     7 * @version 2.9.4.3
    88 *
    99 * @slug mycred
  • ti-woocommerce-wishlist/trunk/integrations/product-quantity-for-woocommerce.php

    r3167298 r3306868  
    55 * @name All in One Product Quantity for WooCommerce
    66 *
    7  * @version 4.4.1
     7 * @version 5.1.1
    88 *
    99 * @slug product-quantity-for-woocommerce
     
    5454    function tinv_wishlist_cart_quantity_alg_wc_pq( $qty, $wl_product ) {
    5555
    56         $qty = alg_wc_pq()->core->get_product_qty_min_max( $wl_product['product_id'], 0, 'min', $wl_product['variation_id'] );
     56        $qty = alg_wc_pq()->core->get_product_qty_min_max( $wl_product['product_id'], alg_wc_pq()->core->get_product_qty_default( $wl_product['product_id']), 'min', $wl_product['variation_id'] );
    5757
    5858        return $qty;
  • ti-woocommerce-wishlist/trunk/integrations/pw-woocommerce-gift-cards.php

    r3167298 r3306868  
    55 * @name PW WooCommerce Gift Cards
    66 *
    7  * @version 1.298
     7 * @version 2.14
    88 *
    99 * @slug pw-woocommerce-gift-cards
     
    1414
    1515// If this file is called directly, abort.
    16 if (!defined('ABSPATH')) {
     16if ( ! defined( 'ABSPATH' ) ) {
    1717    exit;
    1818}
     
    2525$name = "PW WooCommerce Gift Cards";
    2626
    27 $available = defined('PWGC_VERSION');
     27$available = defined( 'PWGC_VERSION' );
    2828
    29 $tinvwl_integrations = is_array($tinvwl_integrations) ? $tinvwl_integrations : [];
     29$tinvwl_integrations = is_array( $tinvwl_integrations ) ? $tinvwl_integrations : [];
    3030
    31 $tinvwl_integrations[$slug] = array(
    32     'name' => $name,
     31$tinvwl_integrations[ $slug ] = array(
     32    'name'      => $name,
    3333    'available' => $available,
    3434);
    3535
    36 if (!tinv_get_option('integrations', $slug)) {
     36if ( ! tinv_get_option( 'integrations', $slug ) ) {
    3737    return;
    3838}
    3939
    40 if (!$available) {
     40if ( ! $available ) {
    4141    return;
    4242}
    4343
    44 if (defined('PWGC_VERSION')) {
     44if ( defined( 'PWGC_VERSION' ) ) {
    4545
    46     if (!function_exists('tinv_wishlist_item_meta_pw_woocommerce_gift_cards')) {
     46    if ( ! function_exists( 'tinv_wishlist_item_meta_pw_woocommerce_gift_cards' ) ) {
    4747
    4848        /**
     
    5555         * @return array
    5656         */
    57         function tinv_wishlist_item_meta_pw_woocommerce_gift_cards($item_data, $product_id, $variation_id)
    58         {
     57        function tinv_wishlist_item_meta_pw_woocommerce_gift_cards( $item_data, $product_id, $variation_id ) {
    5958
    60             if (defined('PWGC_VERSION')) {
     59            if ( defined( 'PWGC_VERSION' ) ) {
    6160                global $pw_gift_cards;
    6261
    63                 foreach ($pw_gift_cards->gift_card_meta as $key => $display) {
    64                     if (isset($item_data[$key])) {
    65                         $item_data[$key]['key'] = $display;
     62                foreach ( $pw_gift_cards->gift_card_meta as $key => $display ) {
     63                    if ( isset( $item_data[ $key ] ) ) {
     64                        $item_data[ $key ]['key'] = $display;
    6665                    }
    6766                }
     
    7271        }
    7372
    74         add_filter('tinvwl_wishlist_item_meta_post', 'tinv_wishlist_item_meta_pw_woocommerce_gift_cards', 10, 3);
     73        add_filter( 'tinvwl_wishlist_item_meta_post', 'tinv_wishlist_item_meta_pw_woocommerce_gift_cards', 10, 3 );
    7574    } // End if().
    7675
    77     if (!function_exists('tinvwl_item_price_pw_woocommerce_gift_cards')) {
     76    if ( ! function_exists( 'tinvwl_item_price_pw_woocommerce_gift_cards' ) ) {
    7877
    7978        /**
     
    8685         * @return string
    8786         */
    88         function tinvwl_item_price_pw_woocommerce_gift_cards($price, $wl_product, $product)
    89         {
     87        function tinvwl_item_price_pw_woocommerce_gift_cards( $price, $wl_product, $product ) {
    9088
    91             if (defined('PWGC_VERSION')) {
    92                 if ($product->get_type() == PWGC_PRODUCT_TYPE_SLUG) {
    93                     $id = ($wl_product['variation_id']) ? $wl_product['variation_id'] : $wl_product['product_id'];
    94                     $p = wc_get_product($id);
     89            if ( defined( 'PWGC_VERSION' ) ) {
     90                if ( $product->get_type() == PWGC_PRODUCT_TYPE_SLUG ) {
     91                    $id = ( $wl_product['variation_id'] ) ? $wl_product['variation_id'] : $wl_product['product_id'];
     92                    $p  = wc_get_product( $id );
    9593
    96                     if ($p) {
     94                    if ( $p ) {
    9795                        return $p->get_price_html();
    9896                    }
     
    103101        }
    104102
    105         add_filter('tinvwl_wishlist_item_price', 'tinvwl_item_price_pw_woocommerce_gift_cards', 10, 3);
     103        add_filter( 'tinvwl_wishlist_item_price', 'tinvwl_item_price_pw_woocommerce_gift_cards', 10, 3 );
    106104    } // End if().
    107105
    108106
    109     add_filter('tinvwl_addtowishlist_modify_type', 'tinvwl_addtowishlist_modify_type_pw_woocommerce_gift_cards', 10, 2);
     107    add_filter( 'tinvwl_addtowishlist_modify_type', 'tinvwl_addtowishlist_modify_type_pw_woocommerce_gift_cards', 10, 2 );
    110108
    111     function tinvwl_addtowishlist_modify_type_pw_woocommerce_gift_cards($type, $post)
    112     {
    113         if (defined('PWGC_VERSION')) {
    114             if ($type == PWGC_PRODUCT_TYPE_SLUG) {
     109    function tinvwl_addtowishlist_modify_type_pw_woocommerce_gift_cards( $type, $post ) {
     110        if ( defined( 'PWGC_VERSION' ) ) {
     111            if ( $type == PWGC_PRODUCT_TYPE_SLUG ) {
    115112                return 'variable';
    116113            }
     
    121118
    122119
    123     function tinv_add_to_wishlist_pw_woocommerce_gift_cards()
    124     {
    125         wp_add_inline_script('tinvwl', "
     120    function tinv_add_to_wishlist_pw_woocommerce_gift_cards() {
     121        wp_add_inline_script( 'tinvwl', "
    126122                    jQuery('body').on('tinvwl_add_to_wishlist_button_click', function(e, el){
    127123                        if ('pw-gift-card' === jQuery(el).data('tinv-wl-producttype')){
     
    135131                        }
    136132                    });
    137             ");
     133            " );
    138134    }
    139135
    140     add_action('wp_enqueue_scripts', 'tinv_add_to_wishlist_pw_woocommerce_gift_cards', 100, 1);
     136    add_action( 'wp_enqueue_scripts', 'tinv_add_to_wishlist_pw_woocommerce_gift_cards', 100, 1 );
    141137}
  • ti-woocommerce-wishlist/trunk/integrations/uni-woo-custom-product-options.php

    r3167298 r3306868  
    55 * @name Product Options and Price Calculation Formulas for WooCommerce – Uni CPO
    66 *
    7  * @version 4.9.9.1
     7 * @version 4.9.47
    88 *
    99 * @slug uni-woo-custom-product-options
     
    1414
    1515// If this file is called directly, abort.
    16 if (!defined('ABSPATH')) {
     16if ( ! defined( 'ABSPATH' ) ) {
    1717    exit;
    1818}
     
    2525$name = "Product Options and Price Calculation Formulas for WooCommerce – Uni CPO";
    2626
    27 $available = class_exists('Uni_Cpo');
    28 
    29 $tinvwl_integrations = is_array($tinvwl_integrations) ? $tinvwl_integrations : [];
    30 
    31 $tinvwl_integrations[$slug] = array(
    32     'name' => $name,
     27$available = class_exists( 'Uni_Cpo' );
     28
     29$tinvwl_integrations = is_array( $tinvwl_integrations ) ? $tinvwl_integrations : [];
     30
     31$tinvwl_integrations[ $slug ] = array(
     32    'name'      => $name,
    3333    'available' => $available,
    3434);
    3535
    36 if (!tinv_get_option('integrations', $slug)) {
     36if ( ! tinv_get_option( 'integrations', $slug ) ) {
    3737    return;
    3838}
    3939
    40 if (!$available) {
     40if ( ! $available ) {
    4141    return;
    4242}
    4343
    44 if (!function_exists('tinv_wishlist_item_meta_uni_woo_custom_product_options')) {
     44if ( ! function_exists( 'tinv_wishlist_item_meta_uni_woo_custom_product_options' ) ) {
    4545
    4646    /**
     
    5454     */
    5555
    56     function tinv_wishlist_item_meta_uni_woo_custom_product_options($item_data, $product_id, $variation_id)
    57     {
    58 
    59         if (class_exists('Uni_Cpo')) {
    60             foreach (array_keys($item_data) as $key) {
    61                 if (strpos($key, 'cpo_') === 0) {
    62                     unset($item_data[$key]);
     56    function tinv_wishlist_item_meta_uni_woo_custom_product_options( $item_data, $product_id, $variation_id ) {
     57
     58        if ( class_exists( 'Uni_Cpo' ) ) {
     59            foreach ( array_keys( $item_data ) as $key ) {
     60                if ( strpos( $key, 'cpo_' ) === 0 ) {
     61                    unset( $item_data[ $key ] );
    6362                }
    6463            }
    6564
    66             if (!empty($item_data)) {
     65            if ( ! empty( $item_data ) ) {
    6766                $options_eval_result = [];
    68                 $form_data = array();
    69                 $formatted_vars = array();
    70                 $variables = array();
    71                 $product_data = Uni_Cpo_Product::get_product_data_by_id($product_id);
    72                 foreach ($item_data as $key => $value) {
    73                     $form_data[$key] = $value['display'];
     67                $form_data           = array();
     68                $formatted_vars      = array();
     69                $variables           = array();
     70                $product_data        = Uni_Cpo_Product::get_product_data_by_id( $product_id );
     71                foreach ( $item_data as $key => $value ) {
     72                    $form_data[ $key ] = $value['display'];
    7473                }
    7574
    7675                array_walk(
    7776                    $options_eval_result,
    78                     function ($v) use (&$variables, &$formatted_vars, &$nice_names_vars) {
    79                         foreach ($v as $slug => $value) {
     77                    function ( $v ) use ( &$variables, &$formatted_vars, &$nice_names_vars ) {
     78                        foreach ( $v as $slug => $value ) {
    8079                            // prepare $variables for calculation purpose
    81                             $variables['{' . $slug . '}'] = $value['calc'];
     80                            $variables[ '{' . $slug . '}' ] = $value['calc'];
    8281                            // prepare $formatted_vars for conditional logic purpose
    83                             $formatted_vars[$slug] = $value['cart_meta'];
     82                            $formatted_vars[ $slug ] = $value['cart_meta'];
    8483                        }
    8584                    }
     
    8786
    8887                // non option variables
    89                 if ('on' === $product_data['nov_data']['nov_enable']
    90                     && !empty($product_data['nov_data']['nov'])
     88                if ( 'on' === $product_data['nov_data']['nov_enable']
     89                     && ! empty( $product_data['nov_data']['nov'] )
    9190                ) {
    92                     $variables = uni_cpo_process_formula_with_non_option_vars($variables, $product_data, $formatted_vars);
    93                 }
    94 
    95                 $filtered_form_data = array_filter($form_data, function ($k) use ($form_data) {
    96                     return false !== strpos($k, UniCpo()->get_var_slug()) && !empty($form_data[$k]);
    97                 }, ARRAY_FILTER_USE_KEY);
    98 
    99                 if (!empty($filtered_form_data)) {
    100                     $posts = uni_cpo_get_posts_by_slugs(array_keys($filtered_form_data));
    101 
    102                     if (!empty($posts)) {
    103                         $posts_ids = wp_list_pluck($posts, 'ID');
    104                         foreach ($posts_ids as $post_id) {
    105                             $option = uni_cpo_get_option($post_id);
    106                             if (is_object($option)) {
    107                                 $calculate_result = $option->calculate($filtered_form_data);
    108 
    109                                 if (is_array($calculate_result) && isset($calculate_result[$option->get_slug()])) {
    110                                     if (is_array($calculate_result[$option->get_slug()]['order_meta'])) {
    111                                         $calculate_result[$option->get_slug()]['order_meta'] = array_map(function ($item) {
    112                                             if (!is_numeric($item)) {
    113                                                 return esc_html__($item);
     91                    $variables = uni_cpo_process_formula_with_non_option_vars( $variables, $product_data, $formatted_vars );
     92                }
     93
     94                $filtered_form_data = array_filter( $form_data, function ( $k ) use ( $form_data ) {
     95                    return false !== strpos( $k, UniCpo()->get_var_slug() ) && ! empty( $form_data[ $k ] );
     96                }, ARRAY_FILTER_USE_KEY );
     97
     98                if ( ! empty( $filtered_form_data ) ) {
     99                    $posts = uni_cpo_get_posts_by_slugs( array_keys( $filtered_form_data ) );
     100
     101                    if ( ! empty( $posts ) ) {
     102                        $posts_ids = wp_list_pluck( $posts, 'ID' );
     103                        foreach ( $posts_ids as $post_id ) {
     104                            $option = uni_cpo_get_option( $post_id );
     105                            if ( is_object( $option ) ) {
     106                                $calculate_result = $option->calculate( $filtered_form_data );
     107
     108                                if ( is_array( $calculate_result ) && isset( $calculate_result[ $option->get_slug() ] ) ) {
     109                                    if ( is_array( $calculate_result[ $option->get_slug() ]['order_meta'] ) ) {
     110                                        $calculate_result[ $option->get_slug() ]['order_meta'] = array_map( function ( $item ) {
     111                                            if ( ! is_numeric( $item ) ) {
     112                                                return esc_html__( $item );
    114113                                            } else {
    115114                                                return $item;
    116115                                            }
    117                                         }, $calculate_result[$option->get_slug()]['order_meta']);
    118                                         $display_value = implode(', ', $calculate_result[$option->get_slug()]['order_meta']);
     116                                        }, $calculate_result[ $option->get_slug() ]['order_meta'] );
     117                                        $display_value                                         = implode( ', ', $calculate_result[ $option->get_slug() ]['order_meta'] );
    119118                                    } else {
    120                                         if (!is_numeric($calculate_result[$option->get_slug()]['order_meta'])) {
    121                                             $display_value = esc_html__($calculate_result[$option->get_slug()]['order_meta']);
     119                                        if ( ! is_numeric( $calculate_result[ $option->get_slug() ]['order_meta'] ) ) {
     120                                            $display_value = esc_html__( $calculate_result[ $option->get_slug() ]['order_meta'] );
    122121                                        } else {
    123                                             $display_value = $calculate_result[$option->get_slug()]['order_meta'];
     122                                            $display_value = $calculate_result[ $option->get_slug() ]['order_meta'];
    124123                                        }
    125124                                    }
    126                                     $display_key = uni_cpo_sanitize_label($option->cpo_order_label());
     125                                    $display_key   = uni_cpo_sanitize_label( $option->cpo_order_label() );
    127126                                    $display_value = uni_cpo_replace_curly(
    128127                                        $display_value,
     
    131130                                        $variables
    132131                                    );
    133                                     $display_value = uni_cpo_get_proper_option_label_cart($display_value);
    134                                     $display_key = uni_cpo_replace_curly(
     132                                    $display_value = uni_cpo_get_proper_option_label_cart( $display_value );
     133                                    $display_key   = uni_cpo_replace_curly(
    135134                                        $display_key,
    136135                                        $formatted_vars,
     
    138137                                        $variables
    139138                                    );
    140                                     $display_key = trim($display_key, ' ');
    141                                     $display_key = uni_cpo_get_proper_option_label_cart($display_key);
    142 
    143                                     $item_data[$option->get_slug()]['display'] = $display_value;
     139                                    $display_key   = trim( $display_key, ' ' );
     140                                    $display_key   = uni_cpo_get_proper_option_label_cart( $display_key );
     141
     142                                    $item_data[ $option->get_slug() ]['display'] = $display_value;
    144143                                }
    145                                 $item_data[$option->get_slug()]['key'] = $display_key;
     144                                $item_data[ $option->get_slug() ]['key'] = $display_key;
    146145                            }
    147146                        }
     
    157156    }
    158157
    159     add_filter('tinvwl_wishlist_item_meta_post', 'tinv_wishlist_item_meta_uni_woo_custom_product_options', 10, 3);
    160 }
    161 
    162 if (!function_exists('tinvwl_item_price_uni_woo_custom_product_options')) {
     158    add_filter( 'tinvwl_wishlist_item_meta_post', 'tinv_wishlist_item_meta_uni_woo_custom_product_options', 10, 3 );
     159}
     160
     161if ( ! function_exists( 'tinvwl_item_price_uni_woo_custom_product_options' ) ) {
    163162
    164163    /**
     
    171170     * @return string
    172171     */
    173     function tinvwl_item_price_uni_woo_custom_product_options($price, $wl_product, $product)
    174     {
    175 
    176         if (class_exists('Uni_Cpo')) {
    177             $product_data = Uni_Cpo_Product::get_product_data_by_id($product->get_id());
    178 
    179             if ('on' === $product_data['settings_data']['calc_enable']) {
    180                 $form_data = $wl_product['meta'];
     172    function tinvwl_item_price_uni_woo_custom_product_options( $price, $wl_product, $product ) {
     173
     174        if ( class_exists( 'Uni_Cpo' ) ) {
     175            $product_data = Uni_Cpo_Product::get_product_data_by_id( $product->get_id() );
     176
     177            if ( 'on' === $product_data['settings_data']['calc_enable'] ) {
     178                $form_data           = $wl_product['meta'];
    181179                $options_eval_result = array();
    182                 $variables = array();
    183                 $is_calc_disabled = false;
    184                 $formatted_vars = array();
    185 
    186                 $main_formula = $product_data['formula_data']['main_formula'];
    187                 $filtered_form_data = array_filter($form_data, function ($k) use ($form_data) {
    188                     return false !== strpos($k, UniCpo()->get_var_slug()) && !empty($form_data[$k]);
    189                 }, ARRAY_FILTER_USE_KEY);
    190 
    191 
    192                 if (!empty($filtered_form_data)) {
    193                     $posts = uni_cpo_get_posts_by_slugs(array_keys($filtered_form_data));
    194 
    195                     if (!empty($posts)) {
    196                         $posts_ids = wp_list_pluck($posts, 'ID');
    197                         foreach ($posts_ids as $post_id) {
    198                             $option = uni_cpo_get_option($post_id);
    199 
    200                             if (is_object($option)) {
    201                                 $calculate_result = $option->calculate($filtered_form_data);
    202                                 if (!empty($calculate_result)) {
    203                                     $options_eval_result[$option->get_slug()] = $calculate_result;
     180                $variables           = array();
     181                $is_calc_disabled    = false;
     182                $formatted_vars      = array();
     183
     184                $main_formula       = $product_data['formula_data']['main_formula'];
     185                $filtered_form_data = array_filter( $form_data, function ( $k ) use ( $form_data ) {
     186                    return false !== strpos( $k, UniCpo()->get_var_slug() ) && ! empty( $form_data[ $k ] );
     187                }, ARRAY_FILTER_USE_KEY );
     188
     189
     190                if ( ! empty( $filtered_form_data ) ) {
     191                    $posts = uni_cpo_get_posts_by_slugs( array_keys( $filtered_form_data ) );
     192
     193                    if ( ! empty( $posts ) ) {
     194                        $posts_ids = wp_list_pluck( $posts, 'ID' );
     195                        foreach ( $posts_ids as $post_id ) {
     196                            $option = uni_cpo_get_option( $post_id );
     197
     198                            if ( is_object( $option ) ) {
     199                                $calculate_result = $option->calculate( $filtered_form_data );
     200                                if ( ! empty( $calculate_result ) ) {
     201                                    $options_eval_result[ $option->get_slug() ] = $calculate_result;
    204202                                }
    205203                            }
     
    210208                }
    211209
    212                 array_walk($options_eval_result, function ($v) use (&$variables, &$formatted_vars) {
    213                     foreach ($v as $slug => $value) {
     210                array_walk( $options_eval_result, function ( $v ) use ( &$variables, &$formatted_vars ) {
     211                    foreach ( $v as $slug => $value ) {
    214212                        // prepare $variables for calculation purpose
    215                         $variables['{' . $slug . '}'] = $value['calc'];
     213                        $variables[ '{' . $slug . '}' ] = $value['calc'];
    216214                        // prepare $formatted_vars for conditional logic purpose
    217                         $formatted_vars[$slug] = $value['cart_meta'];
    218                     }
    219                 });
    220                 $variables['{uni_cpo_price}'] = $product->get_price('edit');
     215                        $formatted_vars[ $slug ] = $value['cart_meta'];
     216                    }
     217                } );
     218                $variables['{uni_cpo_price}'] = $product->get_price( 'edit' );
    221219                // non option variables
    222                 if ('on' === $product_data['nov_data']['nov_enable'] && !empty($product_data['nov_data']['nov'])) {
    223                     $variables = uni_cpo_process_formula_with_non_option_vars($variables, $product_data, $formatted_vars);
     220                if ( 'on' === $product_data['nov_data']['nov_enable'] && ! empty( $product_data['nov_data']['nov'] ) ) {
     221                    $variables = uni_cpo_process_formula_with_non_option_vars( $variables, $product_data, $formatted_vars );
    224222                }
    225223                // formula conditional logic
    226224
    227                 if ('on' === $product_data['formula_data']['rules_enable'] && !empty($product_data['formula_data']['formula_scheme']) && is_array($product_data['formula_data']['formula_scheme'])) {
    228                     $conditional_formula = uni_cpo_process_formula_scheme($formatted_vars, $product_data);
    229                     if ($conditional_formula) {
     225                if ( 'on' === $product_data['formula_data']['rules_enable'] && ! empty( $product_data['formula_data']['formula_scheme'] ) && is_array( $product_data['formula_data']['formula_scheme'] ) ) {
     226                    $conditional_formula = uni_cpo_process_formula_scheme( $formatted_vars, $product_data );
     227                    if ( $conditional_formula ) {
    230228                        $main_formula = $conditional_formula;
    231229                    }
    232230                }
    233231
    234                 if ('disable' === $main_formula) {
     232                if ( 'disable' === $main_formula ) {
    235233                    $is_calc_disabled = true;
    236234                }
    237235                //
    238236
    239                 if (!$is_calc_disabled) {
    240                     $main_formula = uni_cpo_process_formula_with_vars($main_formula, $variables);
     237                if ( ! $is_calc_disabled ) {
     238                    $main_formula = uni_cpo_process_formula_with_vars( $main_formula, $variables );
    241239                    // calculates formula
    242                     $price_calculated = uni_cpo_calculate_formula($main_formula);
    243                     $price_min = $product_data['settings_data']['min_price'];
    244                     $price_max = $product_data['settings_data']['max_price'];
     240                    $price_calculated = uni_cpo_calculate_formula( $main_formula );
     241                    $price_min        = $product_data['settings_data']['min_price'];
     242                    $price_max        = $product_data['settings_data']['max_price'];
    245243                    // check for min price
    246                     if ($price_calculated < $price_min) {
     244                    if ( $price_calculated < $price_min ) {
    247245                        $price_calculated = $price_min;
    248246                    }
    249247                    // check for max price
    250                     if (!empty($price_max) && $price_calculated >= $price_max) {
     248                    if ( ! empty( $price_max ) && $price_calculated >= $price_max ) {
    251249                        $is_calc_disabled = true;
    252250                    }
    253251
    254                     if (true !== $is_calc_disabled) {
     252                    if ( true !== $is_calc_disabled ) {
    255253                        // filter, so 3rd party scripts can hook up
    256254                        $price_calculated = apply_filters(
     
    261259                        );
    262260
    263                         return wc_price($price_calculated);
     261                        return wc_price( $price_calculated );
    264262                    } else {
    265                         return wc_price($price_max);
     263                        return wc_price( $price_max );
    266264                    }
    267265
    268266                } else {
    269                     return wc_price(0);
     267                    return wc_price( 0 );
    270268                }
    271269            }
     
    276274    }
    277275
    278     add_filter('tinvwl_wishlist_item_price', 'tinvwl_item_price_uni_woo_custom_product_options', 10, 3);
     276    add_filter( 'tinvwl_wishlist_item_price', 'tinvwl_item_price_uni_woo_custom_product_options', 10, 3 );
    279277} // End if().
  • ti-woocommerce-wishlist/trunk/integrations/wc-fields-factory.php

    r3167298 r3306868  
    55 * @name WC Fields Factory
    66 *
    7  * @version 4.1.5
     7 * @version 4.1.8
    88 *
    99 * @slug wc-fields-factory
     
    380380        [
    381381            'test_form' => false,
    382             'test_type' => false,
    383382        ]
    384383    );
  • ti-woocommerce-wishlist/trunk/integrations/woo-extra-product-options.php

    r3167298 r3306868  
    55 * @name Extra product options For WooCommerce | Custom Product Addons and Fields
    66 *
    7  * @version 3.1.9
     7 * @version 3.3.2
    88 *
    99 * @slug woo-extra-product-options
  • ti-woocommerce-wishlist/trunk/integrations/woo-payment-gateway.php

    r3167298 r3306868  
    55 * @name Braintree For WooCommerce
    66 *
    7  * @version 3.1.8
     7 * @version 3.2.70
    88 *
    99 * @slug woo-payment-gateway
  • ti-woocommerce-wishlist/trunk/integrations/woo-product-bundle.php

    r3167298 r3306868  
    55 * @name WPC Product Bundles for WooCommerce
    66 *
    7  * @version 7.3.3
     7 * @version 8.2.8
    88 *
    99 * @slug woo-product-bundle
  • ti-woocommerce-wishlist/trunk/integrations/woocommerce-product-addon.php

    r3167298 r3306868  
    55 * @name PPOM for WooCommerce
    66 *
    7  * @version 21.2
     7 * @version 33.0.12
    88 *
    99 * @slug woocommerce-product-addon
     
    1414
    1515// If this file is called directly, abort.
    16 if (!defined('ABSPATH')) {
     16if ( ! defined( 'ABSPATH' ) ) {
    1717    exit;
    1818}
     
    2525$name = "PPOM for WooCommerce";
    2626
    27 $available = defined('PPOM_VERSION');
     27$available = defined( 'PPOM_VERSION' );
    2828
    2929$tinvwl_integrations = is_array( $tinvwl_integrations ) ? $tinvwl_integrations : [];
    3030
    31 $tinvwl_integrations[$slug] = array(
    32     'name' => $name,
     31$tinvwl_integrations[ $slug ] = array(
     32    'name'      => $name,
    3333    'available' => $available,
    3434);
    3535
    36 if (!tinv_get_option('integrations', $slug)) {
     36if ( ! tinv_get_option( 'integrations', $slug ) ) {
    3737    return;
    3838}
    3939
    40 if (!$available) {
     40if ( ! $available ) {
    4141    return;
    4242}
    4343
    44 if (!function_exists('tinv_wishlist_metasupport_woocommerce_product_add_on')) {
    45 
    46     /**
    47      * Set description for meta WooCommerce Product Add-on
    48      *
    49      * @param array $meta Meta array.
    50      * @param integer $product_id Product ID.
    51      *
    52      * @return array
    53      */
    54     function tinv_wishlist_metasupport_woocommerce_product_add_on($meta, $product_id)
    55     {
    56         if (isset($meta['ppom'])) {
    57             $meta = array();
    58         }
    59 
    60         return $meta;
    61     }
    62 
    63     add_filter('tinvwl_wishlist_item_meta_post', 'tinv_wishlist_metasupport_woocommerce_product_add_on', 10, 2);
    64 } // End if().
    65 
    66 if (!function_exists('tinv_wishlist_item_meta_woocommerce_product_add_on')) {
     44
     45if ( ! function_exists( 'tinv_wishlist_item_meta_woocommerce_product_add_on' ) ) {
    6746
    6847    /**
     
    7554     * @return array
    7655     */
    77     function tinv_wishlist_item_meta_woocommerce_product_add_on($meta, $wl_product, $product)
    78     {
    79         if (isset($wl_product['meta']) && isset($wl_product['meta']['ppom']) && class_exists('NM_PersonalizedProduct')) {
    80 
    81             $ppom = json_decode($wl_product['meta']['ppom']);
     56    function tinv_wishlist_item_meta_woocommerce_product_add_on( $meta, $wl_product, $product ) {
     57        if ( isset( $wl_product['meta'] ) && isset( $wl_product['meta']['ppom'] ) && class_exists( 'NM_PersonalizedProduct' ) ) {
     58
     59            $ppom         = json_decode( $wl_product['meta']['ppom'] );
    8260            $product_meta = $ppom->fields ? $ppom->fields : '';
    8361
    8462            $item_meta = array();
    8563
    86             if ($product_meta) {
    87 
    88                 foreach ($product_meta as $key => $value) {
    89 
    90                     if (empty($value)) {
     64            if ( $product_meta ) {
     65
     66                foreach ( $product_meta as $key => $value ) {
     67
     68                    if ( empty( $value ) ) {
    9169                        continue;
    9270                    }
    9371
    9472                    $product_id = $wl_product['product_id'];
    95                     $field_meta = ppom_get_field_meta_by_dataname($product_id, $key);
    96 
    97                     if (empty($field_meta)) {
     73                    $field_meta = ppom_get_field_meta_by_dataname( $product_id, $key );
     74
     75                    if ( empty( $field_meta ) ) {
    9876                        continue;
    9977                    }
    10078
    101                     $field_type = $field_meta['type'];
     79                    $field_type  = $field_meta['type'];
    10280                    $field_title = $field_meta['title'];
    10381
    10482
    105                     switch ($field_type) {
     83                    switch ( $field_type ) {
    10684                        case 'quantities':
    10785                            $total_qty = 0;
    108                             foreach ($value as $label => $qty) {
    109                                 if (!empty($qty)) {
     86                            foreach ( $value as $label => $qty ) {
     87                                if ( ! empty( $qty ) ) {
    11088                                    $item_meta[] = array(
    111                                         'key' => $label,
     89                                        'key'     => $label,
    11290                                        'display' => $qty,
    11391                                    );
    114                                     $total_qty += $qty;
     92                                    $total_qty   += $qty;
    11593                                }
    11694                            }
     
    11997                        case 'file':
    12098                            $file_thumbs_html = '';
    121                             foreach ($value as $file_id => $file_uploaded) {
    122                                 $file_name = $file_uploaded['org'];
    123                                 $file_thumbs_html .= ppom_show_file_thumb($file_name);
    124                             }
    125                             $item_meta[] = array(
    126                                 'key' => $field_title,
     99                            foreach ( $value as $file_id => $file_uploaded ) {
     100                                $file_name        = $file_uploaded['org'];
     101                                $file_thumbs_html .= ppom_show_file_thumb( $file_name );
     102                            }
     103                            $item_meta[] = array(
     104                                'key'     => $field_title,
    127105                                'display' => $file_thumbs_html,
    128106                            );
     
    132110                        case 'cropper':
    133111                            $file_thumbs_html = '';
    134                             foreach ($value as $file_id => $file_cropped) {
    135 
    136                                 $file_name = $file_cropped['org'];
    137                                 $file_thumbs_html .= ppom_show_file_thumb($file_name, true);
    138                             }
    139                             $item_meta[] = array(
    140                                 'key' => $field_title,
     112                            foreach ( $value as $file_id => $file_cropped ) {
     113
     114                                $file_name        = $file_cropped['org'];
     115                                $file_thumbs_html .= ppom_show_file_thumb( $file_name, true );
     116                            }
     117                            $item_meta[] = array(
     118                                'key'     => $field_title,
    141119                                'display' => $file_thumbs_html,
    142120                            );
     
    144122
    145123                        case 'image':
    146                             if ($value) {
    147                                 foreach ($value as $id => $images_meta) {
    148                                     $images_meta = json_decode(stripslashes($images_meta), true);
    149                                     $image_url = stripslashes($images_meta['link']);
    150                                     $image_html = '<img class="img-thumbnail" style="width:' . esc_attr(ppom_get_thumbs_size()) . '" src="' . esc_url($image_url) . '" title="' . esc_attr($images_meta['title']) . '">';
    151                                     $meta_key = $field_title . '(' . $images_meta['title'] . ')';
     124                            if ( $value ) {
     125                                foreach ( $value as $id => $images_meta ) {
     126                                    $images_meta = json_decode( stripslashes( $images_meta ), true );
     127                                    $image_url   = stripslashes( $images_meta['link'] );
     128                                    $image_html  = '<img class="img-thumbnail" style="width:' . esc_attr( ppom_get_thumbs_size() ) . '" src="' . esc_url( $image_url ) . '" title="' . esc_attr( $images_meta['title'] ) . '">';
     129                                    $meta_key    = $field_title . '(' . $images_meta['title'] . ')';
    152130                                    $item_meta[] = array(
    153                                         'key' => $meta_key,
     131                                        'key'     => $meta_key,
    154132                                        'display' => $image_html,
    155133                                    );
     
    159137
    160138                        case 'audio':
    161                             if ($value) {
     139                            if ( $value ) {
    162140                                $ppom_file_count = 1;
    163                                 foreach ($value as $id => $audio_meta) {
    164                                     $audio_meta = json_decode(stripslashes($audio_meta), true);
    165                                     $audio_url = stripslashes($audio_meta['link']);
    166                                     $audio_html = '<a href="' . esc_url($audio_url) . '" title="' . esc_attr($audio_meta['title']) . '">' . $audio_meta['title'] . '</a>';
    167                                     $meta_key = $field_title . ': ' . $ppom_file_count++;
     141                                foreach ( $value as $id => $audio_meta ) {
     142                                    $audio_meta  = json_decode( stripslashes( $audio_meta ), true );
     143                                    $audio_url   = stripslashes( $audio_meta['link'] );
     144                                    $audio_html  = '<a href="' . esc_url( $audio_url ) . '" title="' . esc_attr( $audio_meta['title'] ) . '">' . $audio_meta['title'] . '</a>';
     145                                    $meta_key    = $field_title . ': ' . $ppom_file_count ++;
    168146                                    $item_meta[] = array(
    169                                         'key' => $meta_key,
     147                                        'key'     => $meta_key,
    170148                                        'display' => $audio_html,
    171149                                    );
     
    176154                        case 'bulkquantity':
    177155                            $item_meta[] = array(
    178                                 'key' => $key,
     156                                'key'     => $key,
    179157                                'display' => $value['option'] . ' (' . $value['qty'] . ')',
    180158                            );
     
    182160
    183161                        default:
    184                             $value = is_object($value) ? implode(",", (array)$value) : $value;
    185                             $item_meta[] = array(
    186                                 'key' => $field_title,
    187                                 'display' => stripcslashes($value),
     162                            $value       = is_object( $value ) ? implode( ",", (array) $value ) : $value;
     163                            $item_meta[] = array(
     164                                'key'     => $field_title,
     165                                'display' => stripcslashes( $value ),
    188166                            );
    189167                            break;
     
    193171            } // End if().
    194172
    195             if (0 < count($item_meta)) {
     173            if ( 0 < count( $item_meta ) ) {
    196174                ob_start();
    197                 tinv_wishlist_template('ti-wishlist-item-data.php', array('item_data' => $item_meta));
     175                tinv_wishlist_template( 'ti-wishlist-item-data.php', array( 'item_data' => $item_meta ) );
    198176                $meta .= ob_get_clean();
    199177            }
     
    203181    }
    204182
    205     add_filter('tinvwl_wishlist_item_meta_data', 'tinv_wishlist_item_meta_woocommerce_product_add_on', 10, 3);
     183    add_filter( 'tinvwl_wishlist_item_meta_data', 'tinv_wishlist_item_meta_woocommerce_product_add_on', 10, 3 );
    206184} // End if().
     185
     186function tinvwl_add_to_cart_meta_woocommerce_product_add_on( $wl_product ) {
     187
     188    if ( isset( $wl_product['action'] ) && 'add' === $wl_product['action'] && isset( $wl_product['meta']['ppom'] ) ) {
     189
     190        $decoded = json_decode( $wl_product['meta']['ppom'], true );
     191
     192        if ( JSON_ERROR_NONE === json_last_error() && is_array( $decoded ) ) {
     193            $wl_product['meta']['ppom'] = $decoded;
     194        }
     195    }
     196
     197    return $wl_product;
     198}
     199
     200add_filter( 'tinvwl_addproduct_tocart', 'tinvwl_add_to_cart_meta_woocommerce_product_add_on' );
     201
     202if ( ! function_exists( 'tinvwl_item_price_woocommerce_product_add_on' ) ) {
     203
     204    /**
     205     * Modify price for PPOM for WooCommerce
     206     *
     207     * @param string $price Returned price.
     208     * @param array $wl_product Wishlist Product.
     209     * @param \WC_Product $product Woocommerce Product.
     210     *
     211     * @return string
     212     */
     213    function tinvwl_item_price_woocommerce_product_add_on( $price, $wl_product, $product ) {
     214
     215        if ( defined( 'PPOM_VERSION' ) ) {
     216
     217            if ( isset( $wl_product['meta'] ) && isset( $wl_product['meta']['ppom'] ) ) {
     218                $decoded = json_decode( $wl_product['meta']['ppom'], true );
     219
     220                if ( JSON_ERROR_NONE === json_last_error() && is_array( $decoded ) && isset( $decoded['ppom_option_price'] ) ) {
     221                    $option_price = json_decode( $decoded['ppom_option_price'], true );
     222
     223                    if ( JSON_ERROR_NONE === json_last_error() && is_array( $option_price ) && ! empty( $option_price ) ) {
     224
     225                        $options_total = 0;
     226
     227                        foreach ( $option_price as $option ) {
     228
     229                            $options_total = $options_total + $option['price'];
     230                        }
     231
     232
     233                        if ( $options_total > 0 ) {
     234                            $price = wc_price( floatval( $product->get_price() ) + floatval( $options_total ) );
     235                        }
     236
     237                    }
     238                }
     239
     240                return $price;
     241            }
     242        }
     243
     244
     245        return $price;
     246    }
     247
     248    add_filter( 'tinvwl_wishlist_item_price', 'tinvwl_item_price_woocommerce_product_add_on', 10, 3 );
     249} // End if().
  • ti-woocommerce-wishlist/trunk/integrations/wp-fastest-cache.php

    r3167298 r3306868  
    55 * @name WP Fastest Cache
    66 *
    7  * @version 0.9.1.0
     7 * @version 1.3.7
    88 *
    99 * @slug wp-fastest-cache
     
    1414
    1515// If this file is called directly, abort.
    16 if (!defined('ABSPATH')) {
     16if ( ! defined( 'ABSPATH' ) ) {
    1717    exit;
    1818}
     
    2525$name = "WP Fastest Cache";
    2626
    27 $available = defined('WPFC_WP_PLUGIN_DIR');
     27$available = defined( 'WPFC_WP_PLUGIN_DIR' );
    2828
    2929$tinvwl_integrations = is_array( $tinvwl_integrations ) ? $tinvwl_integrations : [];
    3030
    31 $tinvwl_integrations[$slug] = array(
    32     'name' => $name,
     31$tinvwl_integrations[ $slug ] = array(
     32    'name'      => $name,
    3333    'available' => $available,
    3434);
    3535
    36 if (!tinv_get_option('integrations', $slug)) {
     36if ( ! tinv_get_option( 'integrations', $slug ) ) {
    3737    return;
    3838}
    3939
    40 if (!$available) {
     40if ( ! $available ) {
    4141    return;
    4242}
    4343
    44 if (!function_exists('tinvwl_wp_fastest_cache_reject')) {
     44if ( ! function_exists( 'tinvwl_wp_fastest_cache_reject' ) ) {
    4545    /**
    4646     * Disable cache for WP Fastest Cache
    4747     */
    48     function tinvwl_wp_fastest_cache_reject()
    49     {
    50         if (defined('WPFC_WP_PLUGIN_DIR')) {
    51             $rules_json = get_option('WpFastestCacheExclude');
    52             $ids = array(
    53                 tinv_get_option('page', 'wishlist'),
    54                 tinv_get_option('page', 'manage'),
     48    function tinvwl_wp_fastest_cache_reject() {
     49        if ( defined( 'WPFC_WP_PLUGIN_DIR' ) ) {
     50            $rules_json = get_option( 'WpFastestCacheExclude' );
     51            $ids        = array(
     52                tinv_get_option( 'page', 'wishlist' ),
     53                tinv_get_option( 'page', 'manage' ),
    5554            );
    56             $pages = $ids;
    57             $languages = apply_filters('wpml_active_languages', array(), array(
     55            $pages      = $ids;
     56            $languages  = apply_filters( 'wpml_active_languages', array(), array(
    5857                'skip_missing' => 0,
    59                 'orderby' => 'code',
    60             ));
    61             if (!empty($languages)) {
    62                 foreach ($ids as $id) {
    63                     foreach ($languages as $l) {
    64                         $pages[] = apply_filters('wpml_object_id', $id, 'page', true, $l['language_code']);
     58                'orderby'      => 'code',
     59            ) );
     60            if ( ! empty( $languages ) ) {
     61                foreach ( $ids as $id ) {
     62                    foreach ( $languages as $l ) {
     63                        $pages[] = apply_filters( 'wpml_object_id', $id, 'page', true, $l['language_code'] );
    6564                    }
    6665                }
    67                 $pages = array_unique($pages);
     66                $pages = array_unique( $pages );
    6867            }
    69             $pages = array_filter($pages);
    70             if (!empty($pages)) {
    71                 foreach ($pages as $i => $page) {
    72                     $pages[$i] = preg_replace("/^\//", '', str_replace(get_site_url(), '', get_permalink($page))); // @codingStandardsIgnoreLine Squiz.Strings.DoubleQuoteUsage.NotRequired
     68            $pages = array_filter( $pages );
     69            if ( ! empty( $pages ) ) {
     70                foreach ( $pages as $i => $page ) {
     71                    $pages[ $i ] = preg_replace( "/^\//", '', str_replace( get_site_url(), '', get_permalink( $page ) ) ); // @codingStandardsIgnoreLine Squiz.Strings.DoubleQuoteUsage.NotRequired
    7372                }
    7473            }
    75             $pages = array_unique($pages);
    76             $pages = array_filter($pages);
     74            $pages = array_unique( $pages );
     75            $pages = array_filter( $pages );
    7776
    78             $rules_std = json_decode($rules_json, true);
    79             $ex_pages = array();
    80             $rules_std = is_array($rules_std) ? $rules_std : array();
    81             foreach ($rules_std as $value) {
    82                 $value['type'] = isset($value['type']) ? $value['type'] : 'page';
    83                 if ('page' === $value['type']) {
     77            $rules_std = json_decode( $rules_json, true );
     78            $ex_pages  = array();
     79            $rules_std = is_array( $rules_std ) ? $rules_std : array();
     80            foreach ( $rules_std as $value ) {
     81                $value['type'] = isset( $value['type'] ) ? $value['type'] : 'page';
     82                if ( 'page' === $value['type'] ) {
    8483                    $ex_pages[] = $value['content'];
    8584                }
    8685            }
    87             $ex_pages = array_unique($ex_pages);
    88             $ex_pages = array_filter($ex_pages);
    89             $changed = false;
     86            $ex_pages = array_unique( $ex_pages );
     87            $ex_pages = array_filter( $ex_pages );
     88            $changed  = false;
    9089
    91             foreach ($pages as $page) {
    92                 $page = preg_replace('/\/$/', '', $page);
     90            foreach ( $pages as $page ) {
     91                $page = preg_replace( '/\/$/', '', $page );
    9392
    94                 if (!in_array($page, $ex_pages)) {
    95                     $changed = true;
     93                if ( ! in_array( $page, $ex_pages ) ) {
     94                    $changed     = true;
    9695                    $rules_std[] = array(
    97                         'prefix' => 'startwith',
     96                        'prefix'  => 'startwith',
    9897                        'content' => $page,
    99                         'type' => 'page',
     98                        'type'    => 'page',
    10099                    );
    101100                }
    102101            }
    103             if ($changed) {
    104                 $data = json_encode($rules_std);
    105                 update_option('WpFastestCacheExclude', $data);
     102            if ( $changed ) {
     103                $data = json_encode( $rules_std );
     104                update_option( 'WpFastestCacheExclude', $data );
    106105            }
    107106        } // End if().
    108107    }
    109108
    110     add_action('admin_init', 'tinvwl_wp_fastest_cache_reject');
     109    add_action( 'admin_init', 'tinvwl_wp_fastest_cache_reject' );
    111110} // End if().
  • ti-woocommerce-wishlist/trunk/integrations/wp-multilang.php

    r3167298 r3306868  
    55 * @name WP Multilang
    66 *
    7  * @version 2.3.0
     7 * @version 2.4.19.1
    88 *
    99 * @slug wp-multilang
     
    1414
    1515// If this file is called directly, abort.
    16 if (!defined('ABSPATH')) {
     16if ( ! defined( 'ABSPATH' ) ) {
    1717    exit;
    1818}
     
    2525$name = "WP Multilang";
    2626
    27 $available = function_exists('wpm_translate_string');
     27$available = function_exists( 'wpm_translate_string' );
    2828
    2929$tinvwl_integrations = is_array( $tinvwl_integrations ) ? $tinvwl_integrations : [];
    3030
    31 $tinvwl_integrations[$slug] = array(
    32     'name' => $name,
     31$tinvwl_integrations[ $slug ] = array(
     32    'name'      => $name,
    3333    'available' => $available,
    3434);
    3535
    36 if (!tinv_get_option('integrations', $slug)) {
     36if ( ! tinv_get_option( 'integrations', $slug ) ) {
    3737    return;
    3838}
    3939
    40 if (!$available) {
     40if ( ! $available ) {
    4141    return;
    4242}
    4343
    4444// WP Multilang string translations.
    45 if (function_exists('wpm_translate_string')) {
     45if ( function_exists( 'wpm_translate_string' ) ) {
    4646
    47     add_filter('tinvwl_default_wishlist_title', 'wpm_translate_string');
    48     add_filter('tinvwl_view_wishlist_text', 'wpm_translate_string');
    49     add_filter('tinvwl_added_to_wishlist_text', 'wpm_translate_string');
    50     add_filter('tinvwl_already_in_wishlist_text', 'wpm_translate_string');
    51     add_filter('tinvwl_removed_from_wishlist_text', 'wpm_translate_string');
    52     add_filter('tinvwl_remove_from_wishlist_text', 'wpm_translate_string');
     47    add_filter( 'tinvwl_default_wishlist_title', 'wpm_translate_string' );
     48    add_filter( 'tinvwl_view_wishlist_text', 'wpm_translate_string' );
     49    add_filter( 'tinvwl_added_to_wishlist_text', 'wpm_translate_string' );
     50    add_filter( 'tinvwl_already_in_wishlist_text', 'wpm_translate_string' );
     51    add_filter( 'tinvwl_removed_from_wishlist_text', 'wpm_translate_string' );
     52    add_filter( 'tinvwl_remove_from_wishlist_text', 'wpm_translate_string' );
    5353
    54     add_filter('tinvwl_added_to_wishlist_text_loop', 'wpm_translate_string');
    55     add_filter('tinvwl_remove_from_wishlist_text_loop', 'wpm_translate_string');
     54    add_filter( 'tinvwl_added_to_wishlist_text_loop', 'wpm_translate_string' );
     55    add_filter( 'tinvwl_remove_from_wishlist_text_loop', 'wpm_translate_string' );
    5656
    57     add_filter('tinvwl_add_to_cart_text', 'wpm_translate_string');
     57    add_filter( 'tinvwl_add_to_cart_text', 'wpm_translate_string' );
    5858
    59     add_filter('tinvwl_add_selected_to_cart_text', 'wpm_translate_string');
    60     add_filter('tinvwl_add_all_to_cart_text', 'wpm_translate_string');
     59    add_filter( 'tinvwl_add_selected_to_cart_text', 'wpm_translate_string' );
     60    add_filter( 'tinvwl_add_all_to_cart_text', 'wpm_translate_string' );
    6161
    62     add_filter('tinvwl_share_on_text', 'wpm_translate_string');
     62    add_filter( 'tinvwl_share_on_text', 'wpm_translate_string' );
    6363
    64     add_filter('tinvwl_wishlist_products_counter_text', 'wpm_translate_string');
     64    add_filter( 'tinvwl_wishlist_products_counter_text', 'wpm_translate_string' );
    6565
    6666} // End if().
  • ti-woocommerce-wishlist/trunk/integrations/wpc-variations-radio-buttons.php

    r3167298 r3306868  
    55 * @name WPC Variations Radio Buttons for WooCommerce
    66 *
    7  * @version 2.2.1
     7 * @version 3.6.1
    88 *
    99 * @slug wpc-variations-radio-buttons
     
    1414
    1515// If this file is called directly, abort.
    16 if (!defined('ABSPATH')) {
     16if ( ! defined( 'ABSPATH' ) ) {
    1717    exit;
    1818}
     
    2525$name = "WPC Variations Radio Buttons for WooCommerce";
    2626
    27 $available = defined('WOOVR_VERSION');
     27$available = defined( 'WOOVR_VERSION' );
    2828
    2929$tinvwl_integrations = is_array( $tinvwl_integrations ) ? $tinvwl_integrations : [];
    3030
    31 $tinvwl_integrations[$slug] = array(
    32     'name' => $name,
     31$tinvwl_integrations[ $slug ] = array(
     32    'name'      => $name,
    3333    'available' => $available,
    3434);
    3535
    36 if (!tinv_get_option('integrations', $slug)) {
     36if ( ! tinv_get_option( 'integrations', $slug ) ) {
    3737    return;
    3838}
    3939
    40 if (!$available) {
     40if ( ! $available ) {
    4141    return;
    4242}
    4343
    44 if (defined('WOOVR_VERSION')) {
     44if ( defined( 'WOOVR_VERSION' ) ) {
    4545
    4646    /**
     
    5454     */
    5555
    56     function tinv_wishlist_item_meta_wpc_variations_radio_buttons($item_data, $product_id, $variation_id)
    57     {
     56    function tinv_wishlist_item_meta_wpc_variations_radio_buttons( $item_data, $product_id, $variation_id ) {
    5857
    59         foreach (array_keys($item_data) as $key) {
    60             if (strpos($key, 'woovr_') === 0) {
    61                 unset($item_data[$key]);
     58        foreach ( array_keys( $item_data ) as $key ) {
     59            if ( strpos( $key, 'woovr_' ) === 0 ) {
     60                unset( $item_data[ $key ] );
    6261            }
    6362        }
     
    6766    }
    6867
    69     add_filter('tinvwl_wishlist_item_meta_post', 'tinv_wishlist_item_meta_wpc_variations_radio_buttons', 10, 3);
     68    add_filter( 'tinvwl_wishlist_item_meta_post', 'tinv_wishlist_item_meta_wpc_variations_radio_buttons', 10, 3 );
    7069}
  • ti-woocommerce-wishlist/trunk/integrations/yith-woocommerce-product-bundles.php

    r3167298 r3306868  
    55 * @name YITH WooCommerce Product Bundles
    66 *
    7  * @version 1.1.15
     7 * @version 2.15.0
    88 *
    99 * @slug yith-woocommerce-product-bundles
  • ti-woocommerce-wishlist/trunk/integrations/yith-woocommerce-quick-view.php

    r3167298 r3306868  
    55 * @name YITH WooCommerce Quick View
    66 *
    7  * @version 1.3.13
     7 * @version 2.4.0
    88 *
    99 * @slug yith-woocommerce-quick-view
     
    1414
    1515// If this file is called directly, abort.
    16 if (!defined('ABSPATH')) {
     16if ( ! defined( 'ABSPATH' ) ) {
    1717    exit;
    1818}
     
    2525$name = "YITH WooCommerce Quick View";
    2626
    27 $available = defined('YITH_WCQV');
     27$available = defined( 'YITH_WCQV' );
    2828
    2929$tinvwl_integrations = is_array( $tinvwl_integrations ) ? $tinvwl_integrations : [];
    3030
    31 $tinvwl_integrations[$slug] = array(
    32     'name' => $name,
     31$tinvwl_integrations[ $slug ] = array(
     32    'name'      => $name,
    3333    'available' => $available,
    3434);
    3535
    36 if (!tinv_get_option('integrations', $slug)) {
     36if ( ! tinv_get_option( 'integrations', $slug ) ) {
    3737    return;
    3838}
    3939
    40 if (!$available) {
     40if ( ! $available ) {
    4141    return;
    4242}
    4343
    44 if (defined('YITH_WCQV')) {
     44if ( defined( 'YITH_WCQV' ) ) {
    4545
    46     if (!function_exists('tinv_wishlist_meta_support_yith_wcqv')) {
     46    if ( ! function_exists( 'tinv_wishlist_meta_support_yith_wcqv' ) ) {
    4747
    4848        /**
     
    5353         * @return array
    5454         */
    55         function tinv_wishlist_meta_support_yith_wcqv($meta)
    56         {
     55        function tinv_wishlist_meta_support_yith_wcqv( $meta ) {
    5756
    58             foreach ($meta as $k => $v) {
     57            foreach ( $meta as $k => $v ) {
    5958                $prefix = 'yith_';
    60                 if (0 === strpos($k, $prefix)) {
    61                     unset($meta[$k]);
     59                if ( 0 === strpos( $k, $prefix ) ) {
     60                    unset( $meta[ $k ] );
    6261                }
    6362            }
     
    6665        }
    6766
    68         add_filter('tinvwl_wishlist_item_meta_post', 'tinv_wishlist_meta_support_yith_wcqv');
     67        add_filter( 'tinvwl_wishlist_item_meta_post', 'tinv_wishlist_meta_support_yith_wcqv' );
    6968    } // End if().
    7069}
  • ti-woocommerce-wishlist/trunk/languages/ti-woocommerce-wishlist.pot

    r3199516 r3306868  
    1 # Copyright (C) 2024 TI WooCommerce Wishlist Plugin - 2.9.2
    2 # This file is distributed under the same license as the TI WooCommerce Wishlist Plugin - 2.9.2 package.
     1# Copyright (C) 2025 TI WooCommerce Wishlist Plugin - 2.10.0
     2# This file is distributed under the same license as the TI WooCommerce Wishlist Plugin - 2.10.0 package.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: TI WooCommerce Wishlist Plugin - 2.9.2\n"
     5"Project-Id-Version: TI WooCommerce Wishlist Plugin - 2.10.0\n"
    66"MIME-Version: 1.0\n"
    77"Content-Type: text/plain; charset=UTF-8\n"
     
    99"Language-Team: TemplateInvaders (https://templateinvaders.com/)\n"
    1010"Last-Translator: TemplateInvaders (https://templateinvaders.com/)\n"
    11 "POT-Creation-Date: 2024-11-29 15:00+0000\n"
     11"POT-Creation-Date: 2025-06-05 07:36+0000\n"
    1212"Report-Msgid-Bugs-To: https://templateinvaders.com/help/\n"
    1313"X-Poedit-Basepath: ..\n"
     
    12741274msgstr ""
    12751275
    1276 #: public/cart.class.php:609
     1276#: public/cart.class.php:607
    12771277msgid "Sorry, the &quot;%s&quot; cannot be purchased."
    12781278msgid_plural "Sorry, the following products cannot be purchased: &quot;%s&quot;."
     
    12801280msgstr[1] ""
    12811281
    1282 #: public/cart.class.php:620
     1282#: public/cart.class.php:618
    12831283msgid "You cannot add &quot;%s&quot; to the cart because the product is out of stock."
    12841284msgid_plural "You cannot add the following products to the cart because they are out of stock: &quot;%s&quot;."
     
    12861286msgstr[1] ""
    12871287
    1288 #: public/cart.class.php:631
     1288#: public/cart.class.php:629
    12891289msgid "External product &quot;%s&quot; cannot be bought."
    12901290msgid_plural "The following external products cannot be bought: &quot;%s&quot;."
     
    12921292msgstr[1] ""
    12931293
    1294 #: public/cart.class.php:642
     1294#: public/cart.class.php:640
    12951295msgid "Please choose product options for &quot;%s&quot;."
    12961296msgid_plural "Please choose options for the following products: &quot;%s&quot;."
     
    12981298msgstr[1] ""
    12991299
    1300 #: public/cart.class.php:653
     1300#: public/cart.class.php:651
    13011301msgid "You cannot add another &quot;%s&quot; to your cart."
    13021302msgid_plural "You cannot add &quot;%s&quot; more to your cart."
     
    13041304msgstr[1] ""
    13051305
    1306 #: public/cart.class.php:664
     1306#: public/cart.class.php:662
    13071307msgid "You cannot add that amount of &quot;%s&quot; to the cart because there is not enough stock."
    13081308msgid_plural "You cannot add the following products to the cart because there is not enough stock: &quot;%s&quot;."
     
    13101310msgstr[1] ""
    13111311
    1312 #: public/cart.class.php:675
     1312#: public/cart.class.php:673
    13131313msgid "Product &quot;%s&quot; could not be added to the cart because some requirements are not met."
    13141314msgid_plural "Products: &quot;%s&quot; could not be added to the cart because some requirements are not met."
  • ti-woocommerce-wishlist/trunk/public/cart.class.php

    r3167298 r3306868  
    8484        }
    8585
    86         add_action( 'woocommerce_checkout_create_order', array( $this, 'add_order_item_meta' ) );
    87 
    88         add_action( 'woocommerce_checkout_update_order_meta', array( $this, 'purchased_items' ) );
     86        add_action( 'woocommerce_checkout_order_created', array( $this, 'add_order_item_meta' ) );
     87        add_action( 'woocommerce_store_api_checkout_update_order_meta', array( $this, 'add_order_item_meta' ) );
     88
     89        add_action( 'woocommerce_checkout_order_created', array( $this, 'purchased_items' ) );
     90        add_action( 'woocommerce_store_api_checkout_update_order_meta', array( $this, 'purchased_items' ) );
     91
    8992        add_action( 'woocommerce_order_status_changed', array( $this, 'order_status_analytics' ), 9, 3 );
    9093    }
     
    350353     *  Run action when purchased product from a wishlist.
    351354     *
    352      * @param int $order Order ID.
    353      */
    354     public function purchased_items( $order_id ) {
    355         $order = wc_get_order( $order_id );
    356         if ( ! $order ) {
    357             return;
    358         }
     355     * @param \WC_Order $order Order object.
     356     */
     357    public function purchased_items( $order ) {
    359358        foreach ( $order->get_items() as $item ) {
    360 
    361359            $_wishlist_cart = self::get_order_item_meta( $item, '_tinvwl_wishlist_cart' );
    362360
  • ti-woocommerce-wishlist/trunk/readme.txt

    r3199516 r3306868  
    33Tags: woocommerce, wishlist, woocommerce wishlist, shop, ecommerce
    44Requires at least: 6.1
    5 Tested up to: 6.7
    6 Stable tag: 2.9.2
     5Tested up to: 6.8
     6Stable tag: 2.10.0
    77Requires PHP: 7.4
    88License: GPLv3
     
    159159
    160160== Changelog ==
     161= 2.10.0 =
     162*Release Date - 5 June 2025*
     163
     164- **Added**: Support for WordPress 6.8.x
     165- **Added**: Support for WooCommerce 9.8.x
     166- **Added**: filter 'tinvwl_wishlist_item_meta_hidden_fields'
     167- **Updated**: Integration with [YITH WooCommerce Product Bundles](https://wordpress.org/plugins/yith-woocommerce-product-bundles/) plugin
     168- **Updated**: Integration with [YITH WooCommerce Quick View](https://wordpress.org/plugins/yith-woocommerce-quick-view/) plugin
     169- **Updated**: Integration with [WPC Variations Radio Buttons for WooCommerce](https://wordpress.org/plugins/wpc-variations-radio-buttons/) plugin
     170- **Updated**: Integration with [WPC Product Bundles for WooCommerce](https://wordpress.org/plugins/woo-product-bundle/) plugin
     171- **Updated**: Integration with [WP Multilang – Translation and Multilingual Plugin](https://wordpress.org/plugins/wp-multilang/)
     172- **Updated**: Integration with [WP Fastest Cache](https://wordpress.org/plugins/wp-fastest-cache/) plugin
     173- **Updated**: Integration with [WP Armour – Honeypot Anti Spam](https://wordpress.org/plugins/honeypot/) plugin
     174- **Updated**: Integration with [PW WooCommerce Gift Cards](https://wordpress.org/plugins/pw-woocommerce-gift-cards/) plugin
     175- **Updated**: Integration with [Product Options and Price Calculation Formulas for WooCommerce – Uni CPO](https://wordpress.org/plugins/uni-woo-custom-product-options/) plugin
     176- **Updated**: Integration with [PPOM – Product Addons & Custom Fields for WooCommerce](https://wordpress.org/plugins/woocommerce-product-addon/) plugin
     177- **Updated**: Integration with [Payment Plugins Braintree For WooCommerce](https://wordpress.org/plugins/woo-payment-gateway/) plugin
     178- **Updated**: Integration with [myCred – Points Management System For Gamification, Ranks, Badges, and Loyalty Rewards Program](https://wordpress.org/plugins/mycred/) plugin
     179- **Updated**: Integration with [Min Max Step Quantity Limits Manager for WooCommerce](https://wordpress.org/plugins/product-quantity-for-woocommerce/) plugin
     180- **Updated**: Integration with [GTM4WP – A Google Tag Manager (GTM) plugin for WordPress](https://wordpress.org/plugins/duracelltomi-google-tag-manager/) plugin
     181- **Updated**: Integration with [Extra Product Options For WooCommerce | Custom Product Addons and Fields](https://wordpress.org/plugins/woo-extra-product-options/) plugin
     182- **Updated**: Integration with [ELEX WooCommerce Catalog Mode](https://wordpress.org/plugins/elex-woocommerce-catalog-mode/) plugin
     183- **Updated**: Integration with [Spam protection, Anti-Spam, FireWall by CleanTalk](https://wordpress.org/plugins/cleantalk-spam-protect/) plugin
     184- **Updated**: Integration with [Advanced Product Fields (Product Addons) for WooCommerce](https://wordpress.org/plugins/advanced-product-fields-for-woocommerce/) plugin
     185- **Fixed**: Vulnerability CVE-2025-47577 by updating integration with [WC Fields Factory](https://wordpress.org/plugins/wc-fields-factory/) plugin
     186
    161187= 2.9.2 =
    162188*Release Date - 29 November 2024*
     
    183209== Upgrade Notice ==
    184210
    185 = 2.9.1 =
    186 **Fixed**: SQL Injection vulnerability related to multilingual plugins
     211= 2.10.0 =
     212**Fixed**: Vulnerability CVE-2025-47577 by updating integration with [WC Fields Factory](https://wordpress.org/plugins/wc-fields-factory/) plugin
  • ti-woocommerce-wishlist/trunk/ti-woocommerce-wishlist.php

    r3199516 r3306868  
    55 * Plugin URI:        https://wordpress.org/plugins/ti-woocommerce-wishlist/
    66 * Description:       Wishlist functionality for your WooCommerce store.
    7  * Version:           2.9.2
     7 * Version:           2.10.0
    88 * Requires at least: 6.1
    9  * Tested up to: 6.7
     9 * Tested up to: 6.8
    1010 * Requires PHP: 7.4
    1111 * Requires Plugins: woocommerce
    1212 * WC requires at least: 3.2
    13  * WC tested up to: 9.4
     13 * WC tested up to: 9.8
    1414 * Author:            TemplateInvaders
    1515 * Author URI:        https://templateinvaders.com/
     
    3030defined( 'TINVWL_PREFIX' ) || define( 'TINVWL_PREFIX', 'tinvwl' );
    3131defined( 'TINVWL_DOMAIN' ) || define( 'TINVWL_DOMAIN', 'ti-woocommerce-wishlist' );
    32 defined( 'TINVWL_FVERSION' ) || define( 'TINVWL_FVERSION', '2.9.2' );
     32defined( 'TINVWL_FVERSION' ) || define( 'TINVWL_FVERSION', '2.10.0' );
    3333defined( 'TINVWL_LOAD_FREE' ) || define( 'TINVWL_LOAD_FREE', plugin_basename( __FILE__ ) );
    3434defined( 'TINVWL_NAME' ) || define( 'TINVWL_NAME', 'TI WooCommerce Wishlist' );
  • ti-woocommerce-wishlist/trunk/tinv-wishlists-function.php

    r3167298 r3306868  
    870870        }
    871871        if ( array_key_exists( 'tinvwl-hidden-fields', $meta ) ) {
    872             $hiddenFields = json_decode( $meta['tinvwl-hidden-fields'], true );
     872            $hiddenFields = apply_filters( 'tinvwl_wishlist_item_meta_hidden_fields', json_decode( $meta['tinvwl-hidden-fields'], true ) );
    873873            if ( $hiddenFields !== null ) {
    874874                foreach ( $hiddenFields as $hiddenKey ) {
Note: See TracChangeset for help on using the changeset viewer.