WooCommerce Wishlist Plugin - Version 2.0.10

Version Description

Release Date - 7 November 2022

  • WordPress 6.1 support
  • Added integration with WC Fields Factory plugin
  • Added type of action for AJAX response
  • Added redirect to the wishlist page in case of product is already on the wishlist and the event popup is disabled in the settings
  • Fixed issue with marks product already in the wishlist
Download this release

Release Info

Developer templateinvaders
Plugin Icon 128x128 WooCommerce Wishlist Plugin
Version 2.0.10
Comparing to
See all releases

Code changes from version 2.0.9 to 2.0.10

assets/css/admin-form-rtl.min.css CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * 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.0.9
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  .tiwlform-number-container{display:inline-block;margin:2px;position:relative;vertical-align:middle}
1
  /**
2
  * 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.0.10
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  .tiwlform-number-container{display:inline-block;margin:2px;position:relative;vertical-align:middle}
assets/css/admin-form.min.css CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * 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.0.9
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  .tiwlform-number-container{display:inline-block;margin:2px;position:relative;vertical-align:middle}
1
  /**
2
  * 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.0.10
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  .tiwlform-number-container{display:inline-block;margin:2px;position:relative;vertical-align:middle}
assets/css/admin-rtl.min.css CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * 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.0.9
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  *{-webkit-box-sizing:border-box;box-sizing:border-box}
1
  /**
2
  * 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.0.10
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  *{-webkit-box-sizing:border-box;box-sizing:border-box}
assets/css/admin-setup-rtl.min.css CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * 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.0.9
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  html{background:#f6f3ed}
1
  /**
2
  * 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.0.10
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  html{background:#f6f3ed}
assets/css/admin-setup.min.css CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * 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.0.9
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  html{background:#f6f3ed}
1
  /**
2
  * 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.0.10
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  html{background:#f6f3ed}
assets/css/admin.min.css CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * 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.0.9
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  *{-webkit-box-sizing:border-box;box-sizing:border-box}
1
  /**
2
  * 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.0.10
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  *{-webkit-box-sizing:border-box;box-sizing:border-box}
assets/css/public-rtl.min.css CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * 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.0.9
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  .tinv-wishlist form,.tinv-wishlist p:last-child,.tinv-wishlist table{margin-bottom:0}
1
  /**
2
  * 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.0.10
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  .tinv-wishlist form,.tinv-wishlist p:last-child,.tinv-wishlist table{margin-bottom:0}
assets/css/public.min.css CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * 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.0.9
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  .tinv-wishlist form,.tinv-wishlist p:last-child,.tinv-wishlist table{margin-bottom:0}
1
  /**
2
  * 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.0.10
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  .tinv-wishlist form,.tinv-wishlist p:last-child,.tinv-wishlist table{margin-bottom:0}
assets/css/theme-rtl.min.css CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * 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.0.9
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  .tinv-wishlist,.tinv-wishlist input,.tinv-wishlist select,.tinv-wishlist textarea,.tinv-wishlist button,.tinv-wishlist input[type=button],.tinv-wishlist input[type=reset],.tinv-wishlist input[type=submit]{font-family:Georgia,serif;font-size:14px;font-weight:400;text-transform:none;line-height:1.75}
1
  /**
2
  * 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.0.10
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  .tinv-wishlist,.tinv-wishlist input,.tinv-wishlist select,.tinv-wishlist textarea,.tinv-wishlist button,.tinv-wishlist input[type=button],.tinv-wishlist input[type=reset],.tinv-wishlist input[type=submit]{font-family:Georgia,serif;font-size:14px;font-weight:400;text-transform:none;line-height:1.75}
assets/css/theme.min.css CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * 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.0.9
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  .tinv-wishlist,.tinv-wishlist input,.tinv-wishlist select,.tinv-wishlist textarea,.tinv-wishlist button,.tinv-wishlist input[type=button],.tinv-wishlist input[type=reset],.tinv-wishlist input[type=submit]{font-family:Georgia,serif;font-size:14px;font-weight:400;text-transform:none;line-height:1.75}
1
  /**
2
  * 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.0.10
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  .tinv-wishlist,.tinv-wishlist input,.tinv-wishlist select,.tinv-wishlist textarea,.tinv-wishlist button,.tinv-wishlist input[type=button],.tinv-wishlist input[type=reset],.tinv-wishlist input[type=submit]{font-family:Georgia,serif;font-size:14px;font-weight:400;text-transform:none;line-height:1.75}
assets/css/webfont-rtl.min.css CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * 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.0.9
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  @font-face{font-family:"tinvwl-webfont";font-display:block;src:url("../fonts/tinvwl-webfont.eot?ver=xu2uyi");src:url("../fonts/tinvwl-webfont.eot?ver=xu2uyi#iefix") format("embedded-opentype"),url("../fonts/tinvwl-webfont.woff2?ver=xu2uyi") format("woff2"),url("../fonts/tinvwl-webfont.woff?ver=xu2uyi") format("woff"),url("../fonts/tinvwl-webfont.ttf?ver=xu2uyi") format("truetype"),url("../fonts/tinvwl-webfont.svg?ver=xu2uyi#tinvwl-webfont") format("svg");font-weight:normal;font-style:normal}
1
  /**
2
  * 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.0.10
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  @font-face{font-family:"tinvwl-webfont";font-display:block;src:url("../fonts/tinvwl-webfont.eot?ver=xu2uyi");src:url("../fonts/tinvwl-webfont.eot?ver=xu2uyi#iefix") format("embedded-opentype"),url("../fonts/tinvwl-webfont.woff2?ver=xu2uyi") format("woff2"),url("../fonts/tinvwl-webfont.woff?ver=xu2uyi") format("woff"),url("../fonts/tinvwl-webfont.ttf?ver=xu2uyi") format("truetype"),url("../fonts/tinvwl-webfont.svg?ver=xu2uyi#tinvwl-webfont") format("svg");font-weight:normal;font-style:normal}
assets/css/webfont.min.css CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * 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.0.9
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  @font-face{font-family:"tinvwl-webfont";font-display:block;src:url("../fonts/tinvwl-webfont.eot?ver=xu2uyi");src:url("../fonts/tinvwl-webfont.eot?ver=xu2uyi#iefix") format("embedded-opentype"),url("../fonts/tinvwl-webfont.woff2?ver=xu2uyi") format("woff2"),url("../fonts/tinvwl-webfont.woff?ver=xu2uyi") format("woff"),url("../fonts/tinvwl-webfont.ttf?ver=xu2uyi") format("truetype"),url("../fonts/tinvwl-webfont.svg?ver=xu2uyi#tinvwl-webfont") format("svg");font-weight:normal;font-style:normal}
1
  /**
2
  * 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.0.10
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  @font-face{font-family:"tinvwl-webfont";font-display:block;src:url("../fonts/tinvwl-webfont.eot?ver=xu2uyi");src:url("../fonts/tinvwl-webfont.eot?ver=xu2uyi#iefix") format("embedded-opentype"),url("../fonts/tinvwl-webfont.woff2?ver=xu2uyi") format("woff2"),url("../fonts/tinvwl-webfont.woff?ver=xu2uyi") format("woff"),url("../fonts/tinvwl-webfont.ttf?ver=xu2uyi") format("truetype"),url("../fonts/tinvwl-webfont.svg?ver=xu2uyi#tinvwl-webfont") format("svg");font-weight:normal;font-style:normal}
assets/js/admin.min.js CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * 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.0.9
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  "use strict";function TInvWL($,h){this.pf="tinvwl",this.g="_",this.ho=h||!1,this.n="TInvWL",this.aj_act=function(t){return[this.pf,t].join(this.g)},this._csel=function(t,n){n=n||".";return"{0}{1}{2}".format(n,this.pf,t)},this._tm=function(t){t=$("script#{0}[type='text/template']".format(t));return t.length?t.html():""},this.formElm=function(){var e,n;$(this._csel("-form-onoff")).tiwl_onoff(),$("input[type=checkbox][tiwl-show], input[type=checkbox][tiwl-hide]").tiwl_onoffblock(),$("[tiwl-value][tiwl-show], [tiwl-value][tiwl-hide]").tiwl_byvalueblock(),void 0!==$.fn.wpColorPicker&&(e=function(t){t=t.substring(1),t=parseInt(t,16);return.2126*(t>>16&255)+.7152*(t>>8&255)+.0722*(t>>0&255)},n=this._csel("-form-color"),$(n).each(function(){var n=$(this),t=$(this).closest(".tinvwl-color-picker"),i=t.find(".tinvwl-eyedropper");n.css("background-color",n.val()),175<e(n.val())&&n.css("color","#000000"),n.iris({mode:"hsv",target:$(this).parent().parent(),change:function(t,n){175<e(n.color.toCSS())?$(this).css("color","#000000"):$(this).css("color",""),$(this).css("background-color",n.color.toCSS())}}),t.on("click",".iris-square-value",function(t){t.preventDefault(),n.iris("toggle")}),i.on("click",function(t){t.preventDefault(),n.iris("show")}),n.on("focusin",function(){n.iris("show")})}),$(document).on("click",function(t){($(t.target).is(n+", .iris-picker, .iris-picker-inner, .iris-slider-offset, .tinvwl-eyedropper, .tinvwl-eyedropper .ftinvwl-eyedropper")?$(n).not($(t.target).closest(".tinvwl-color-picker").find(n)):$(n)).iris("hide")}))},this.wizard_page=function(t){$(t).find("select").change(this._wizard_page_ch),this.wizard_page_ch($(t).find("select"))},this.wizard_page_ch=function(t){var n=(t=$(t)).parent(this._csel("-page-select")),i=n.find("input[type=hidden]").val(),e=n.find(this._csel("-error-icon")),o=n.find(this._csel("-error-desc"));""!==t.val()?(n.removeClass("tinvwl-error"),e.hide(),o.hide()):0==i&&(n.addClass("tinvwl-error"),e.show(),o.show())},this.pageElm=function(){$(this._csel("-header","div.")).prependTo("#wpbody-content"),$(this._csel("-page-select")).each(this._wizard_page),$(".bulkactions [type=submit]").each(this._control_bulkactions),$(".action-search [type=submit]").each(this._control_search)},this.control_bulkactions=function(t){$(t).on("click",this._control_bulkactions_ck)},this.control_bulkactions_ck=function(t,n){var i=(t=$(t)).parents(".bulkactions").eq(0).find("[name=action]"),t=t.parents("form").eq(0);i&&("-1"!==i.val()&&t.find("input[type=checkbox]:checked").length||n.preventDefault())},this.control_search=function(t){$(t).on("click",this._control_search_ck)},this.control_search_ck=function(t,n){t=(t=$(t)).parents(".action-search").eq(0).find("[name=s]");t&&""===t.val()&&n.preventDefault()},this.Run=function(){this.formElm(),this.pageElm()},this.cg=function(){var t,n=this.n;this.ho&&(n=n+(t=new Date).getFullYear()+t.getMonth()+t.getDate()),window[n]=this},this.cg(),String.prototype.format||(String.prototype.format=function(){var i=arguments;return this.replace(/{(\d+)}/g,function(t,n){return void 0!==i[n]?i[n]:t})});var o=this,n=o.n,ho=o.ho,c=ho?"t=new Date(),n=n+t.getFullYear()+t.getMonth()+t.getDate(),":"",i;for(i in o)"function"!=typeof o[i]||"_"===i[0]||o.hasOwnProperty("_"+i)||eval("o._"+i+"=function(a,b,c,d){var n='"+n+"',"+c+"o=window[n]||null;if (o) {return o."+i+"(this,a,b,c,d);};};")}!function(s){s.fn.tiwl_onoff=function(t){var o=s.extend(!0,{},{value:{on:"",off:""},class:"tiwlform-onoff",wrap:"container",button:"button"},t);return s(this).each(function(){var n=s(this),t=s("<div>").attr({class:o.class+"-"+o.button}),i=o.class+"-"+o.wrap,e=s("<div>").attr({id:n.attr("id")+"_"+o.wrap,class:i});return n.is("input")&&(e.attr("class",e.attr("class")+" "+n.attr("class")),n.is(":disabled")&&(e.toggleClass("disabled",n.is(":disabled")),n.prop("disabled",!1)),e.toggleClass("checked",n.is(":checked")),n.hide().removeAttr("class").wrap(e).before(t),e=n.parent(),n.on("change",function(t){if(e.hasClass("disabled"))return t.preventDefault();e.toggleClass("checked",s(this).is(":checked"))}),e.on("click",function(t){if(e.hasClass("disabled"))return t.preventDefault();n.is(":enabled")&&e.hasClass("checked")===n.is(":checked")&&n.click()})),n})},s.fn.tiwl_onoffblock=function(t){var c=s.extend(!0,{},{onEachElm:function(){},isChecked:function(){return s(this).is(":checked")}},t);return s(this).each(function(){function t(){function t(t,i){t=t.match(/[\w\d-\>\.\#\:\=\[\]]+/gim)||[],s.each(t,function(t,n){c.onEachElm.call(s(n).toggle(i))})}var n=s(this),i=n.attr("tiwl-show"),e=n.attr("tiwl-hide"),o=c.isChecked.call(n);return"string"==typeof i&&t(i,o),"string"==typeof e&&t(e,!o),n}var n=s(this);return n.is("input")&&"checkbox"==n.attr("type")?(s(this).on("change",t),t.call(n)):n})},s.fn.tiwl_byvalueblock=function(t){var i=s.extend(!0,{},{onEachElm:function(){},onClick:function(){return s(this).val()==s(this).attr("tiwl-value")}},t);return s(this).each(function(){function t(e){function t(t,i){t=t.match(/[\w\d-\>\.\#\:\=\[\]]+/gim)||[],s.each(t,function(t,n){e.onEachElm.call(s(n).toggle(i))})}var n=s(this),i=n.attr("tiwl-show"),o=n.attr("tiwl-hide"),c=e.onClick.call(n);return"string"==typeof i&&t(i,c),"string"==typeof o&&t(o,!c),n}var n=s(this);return n.is("input")||n.is("select")?(s(this).on("change",function(){t.call(this,i)}),t.call(n,i)):n})};var n=new TInvWL(s);s(document).ready(function(){var t;n.Run(),jQuery('input[name="general-show_notice"]').change(function(){var t=!jQuery(this).is(":checked"),n=jQuery('input[name="general-redirect_require_login"]');t&&!n.is(":checked")&&n.click().trigger("change"),n.closest(".tiwlform-onoff-container").toggleClass("disabled",t)}).change(),s(".tablenav").each(function(){var t=s(this);s.trim(t.find(".alignleft").html()).length||t.find(".alignleft").remove(),s.trim(t.find(".alignright").html()).length&&!t.find(".tablenav-pages").hasClass("one-page")||(t.find(".alignright").remove(),t.find(".tinv-wishlist-clear").remove()),s.trim(t.html()).length||t.remove()}),s(".tablenav .bulkactions select").addClass("tinvwl-select grey").wrap('<span class="tinvwl-select-wrap">').parent().append('<span class="tinvwl-caret"><span></span></span>'),s(".tablenav .bulkactions .button.action, .tablenav #search-submit").removeClass("button").addClass("tinvwl-btn grey"),s(".tinvwl-modal-btn").on("click",function(){s(this).next(".tinvwl-modal").addClass("tinvwl-modal-open")}),s(".tinvwl-overlay, .tinvwl-close-modal, .tinvwl_button_close").on("click",function(t){t.preventDefault(),s(this).parents(".tinvwl-modal:first").removeClass("tinvwl-modal-open")}),void 0!==s.fn.popover&&((t=s(".tinvwl-help")).popover({content:function(){return s(this).closest(".tinvwl-info-wrap").find(".tinvwl-info-desc").html()}}),t.on("click",function(){s(this).popover("toggle")}),t.on("focusout",function(){s(this).popover("hide")}),s(window).on("resize",function(){t.popover("hide")})),s("body").on("click",".tinvwl-confirm-reset",function(t){t.preventDefault(),confirm(tinvwl_comfirm.text_comfirm_reset)&&s(this).removeClass("tinvwl-confirm-reset").trigger("click")})}),s(document).on("click",".tinvwl-chat-notice .notice-dismiss",function(t){s.post(tinvwl_comfirm.ajax_url,{action:"tinvwl_admin_chat_notice"})})}(jQuery);
1
  /**
2
  * 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.0.10
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  "use strict";function TInvWL($,h){this.pf="tinvwl",this.g="_",this.ho=h||!1,this.n="TInvWL",this.aj_act=function(t){return[this.pf,t].join(this.g)},this._csel=function(t,n){n=n||".";return"{0}{1}{2}".format(n,this.pf,t)},this._tm=function(t){t=$("script#{0}[type='text/template']".format(t));return t.length?t.html():""},this.formElm=function(){var e,n;$(this._csel("-form-onoff")).tiwl_onoff(),$("input[type=checkbox][tiwl-show], input[type=checkbox][tiwl-hide]").tiwl_onoffblock(),$("[tiwl-value][tiwl-show], [tiwl-value][tiwl-hide]").tiwl_byvalueblock(),void 0!==$.fn.wpColorPicker&&(e=function(t){t=t.substring(1),t=parseInt(t,16);return.2126*(t>>16&255)+.7152*(t>>8&255)+.0722*(t>>0&255)},n=this._csel("-form-color"),$(n).each(function(){var n=$(this),t=$(this).closest(".tinvwl-color-picker"),i=t.find(".tinvwl-eyedropper");n.css("background-color",n.val()),175<e(n.val())&&n.css("color","#000000"),n.iris({mode:"hsv",target:$(this).parent().parent(),change:function(t,n){175<e(n.color.toCSS())?$(this).css("color","#000000"):$(this).css("color",""),$(this).css("background-color",n.color.toCSS())}}),t.on("click",".iris-square-value",function(t){t.preventDefault(),n.iris("toggle")}),i.on("click",function(t){t.preventDefault(),n.iris("show")}),n.on("focusin",function(){n.iris("show")})}),$(document).on("click",function(t){($(t.target).is(n+", .iris-picker, .iris-picker-inner, .iris-slider-offset, .tinvwl-eyedropper, .tinvwl-eyedropper .ftinvwl-eyedropper")?$(n).not($(t.target).closest(".tinvwl-color-picker").find(n)):$(n)).iris("hide")}))},this.wizard_page=function(t){$(t).find("select").change(this._wizard_page_ch),this.wizard_page_ch($(t).find("select"))},this.wizard_page_ch=function(t){var n=(t=$(t)).parent(this._csel("-page-select")),i=n.find("input[type=hidden]").val(),e=n.find(this._csel("-error-icon")),o=n.find(this._csel("-error-desc"));""!==t.val()?(n.removeClass("tinvwl-error"),e.hide(),o.hide()):0==i&&(n.addClass("tinvwl-error"),e.show(),o.show())},this.pageElm=function(){$(this._csel("-header","div.")).prependTo("#wpbody-content"),$(this._csel("-page-select")).each(this._wizard_page),$(".bulkactions [type=submit]").each(this._control_bulkactions),$(".action-search [type=submit]").each(this._control_search)},this.control_bulkactions=function(t){$(t).on("click",this._control_bulkactions_ck)},this.control_bulkactions_ck=function(t,n){var i=(t=$(t)).parents(".bulkactions").eq(0).find("[name=action]"),t=t.parents("form").eq(0);i&&("-1"!==i.val()&&t.find("input[type=checkbox]:checked").length||n.preventDefault())},this.control_search=function(t){$(t).on("click",this._control_search_ck)},this.control_search_ck=function(t,n){t=(t=$(t)).parents(".action-search").eq(0).find("[name=s]");t&&""===t.val()&&n.preventDefault()},this.Run=function(){this.formElm(),this.pageElm()},this.cg=function(){var t,n=this.n;this.ho&&(n=n+(t=new Date).getFullYear()+t.getMonth()+t.getDate()),window[n]=this},this.cg(),String.prototype.format||(String.prototype.format=function(){var i=arguments;return this.replace(/{(\d+)}/g,function(t,n){return void 0!==i[n]?i[n]:t})});var o=this,n=o.n,ho=o.ho,c=ho?"t=new Date(),n=n+t.getFullYear()+t.getMonth()+t.getDate(),":"",i;for(i in o)"function"!=typeof o[i]||"_"===i[0]||o.hasOwnProperty("_"+i)||eval("o._"+i+"=function(a,b,c,d){var n='"+n+"',"+c+"o=window[n]||null;if (o) {return o."+i+"(this,a,b,c,d);};};")}!function(s){s.fn.tiwl_onoff=function(t){var o=s.extend(!0,{},{value:{on:"",off:""},class:"tiwlform-onoff",wrap:"container",button:"button"},t);return s(this).each(function(){var n=s(this),t=s("<div>").attr({class:o.class+"-"+o.button}),i=o.class+"-"+o.wrap,e=s("<div>").attr({id:n.attr("id")+"_"+o.wrap,class:i});return n.is("input")&&(e.attr("class",e.attr("class")+" "+n.attr("class")),n.is(":disabled")&&(e.toggleClass("disabled",n.is(":disabled")),n.prop("disabled",!1)),e.toggleClass("checked",n.is(":checked")),n.hide().removeAttr("class").wrap(e).before(t),e=n.parent(),n.on("change",function(t){if(e.hasClass("disabled"))return t.preventDefault();e.toggleClass("checked",s(this).is(":checked"))}),e.on("click",function(t){if(e.hasClass("disabled"))return t.preventDefault();n.is(":enabled")&&e.hasClass("checked")===n.is(":checked")&&n.click()})),n})},s.fn.tiwl_onoffblock=function(t){var c=s.extend(!0,{},{onEachElm:function(){},isChecked:function(){return s(this).is(":checked")}},t);return s(this).each(function(){function t(){function t(t,i){t=t.match(/[\w\d-\>\.\#\:\=\[\]]+/gim)||[],s.each(t,function(t,n){c.onEachElm.call(s(n).toggle(i))})}var n=s(this),i=n.attr("tiwl-show"),e=n.attr("tiwl-hide"),o=c.isChecked.call(n);return"string"==typeof i&&t(i,o),"string"==typeof e&&t(e,!o),n}var n=s(this);return n.is("input")&&"checkbox"==n.attr("type")?(s(this).on("change",t),t.call(n)):n})},s.fn.tiwl_byvalueblock=function(t){var i=s.extend(!0,{},{onEachElm:function(){},onClick:function(){return s(this).val()==s(this).attr("tiwl-value")}},t);return s(this).each(function(){function t(e){function t(t,i){t=t.match(/[\w\d-\>\.\#\:\=\[\]]+/gim)||[],s.each(t,function(t,n){e.onEachElm.call(s(n).toggle(i))})}var n=s(this),i=n.attr("tiwl-show"),o=n.attr("tiwl-hide"),c=e.onClick.call(n);return"string"==typeof i&&t(i,c),"string"==typeof o&&t(o,!c),n}var n=s(this);return n.is("input")||n.is("select")?(s(this).on("change",function(){t.call(this,i)}),t.call(n,i)):n})};var n=new TInvWL(s);s(document).ready(function(){var t;n.Run(),jQuery('input[name="general-show_notice"]').change(function(){var t=!jQuery(this).is(":checked"),n=jQuery('input[name="general-redirect_require_login"]');t&&!n.is(":checked")&&n.click().trigger("change"),n.closest(".tiwlform-onoff-container").toggleClass("disabled",t)}).change(),s(".tablenav").each(function(){var t=s(this);s.trim(t.find(".alignleft").html()).length||t.find(".alignleft").remove(),s.trim(t.find(".alignright").html()).length&&!t.find(".tablenav-pages").hasClass("one-page")||(t.find(".alignright").remove(),t.find(".tinv-wishlist-clear").remove()),s.trim(t.html()).length||t.remove()}),s(".tablenav .bulkactions select").addClass("tinvwl-select grey").wrap('<span class="tinvwl-select-wrap">').parent().append('<span class="tinvwl-caret"><span></span></span>'),s(".tablenav .bulkactions .button.action, .tablenav #search-submit").removeClass("button").addClass("tinvwl-btn grey"),s(".tinvwl-modal-btn").on("click",function(){s(this).next(".tinvwl-modal").addClass("tinvwl-modal-open")}),s(".tinvwl-overlay, .tinvwl-close-modal, .tinvwl_button_close").on("click",function(t){t.preventDefault(),s(this).parents(".tinvwl-modal:first").removeClass("tinvwl-modal-open")}),void 0!==s.fn.popover&&((t=s(".tinvwl-help")).popover({content:function(){return s(this).closest(".tinvwl-info-wrap").find(".tinvwl-info-desc").html()}}),t.on("click",function(){s(this).popover("toggle")}),t.on("focusout",function(){s(this).popover("hide")}),s(window).on("resize",function(){t.popover("hide")})),s("body").on("click",".tinvwl-confirm-reset",function(t){t.preventDefault(),confirm(tinvwl_comfirm.text_comfirm_reset)&&s(this).removeClass("tinvwl-confirm-reset").trigger("click")})}),s(document).on("click",".tinvwl-chat-notice .notice-dismiss",function(t){s.post(tinvwl_comfirm.ajax_url,{action:"tinvwl_admin_chat_notice"})})}(jQuery);
assets/js/public.js CHANGED
@@ -916,16 +916,12 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
916
  }
917
  function mark_products(data) {
918
  var g = '1' == window.tinvwl_add_to_wishlist['simple_flow'];
919
- if (g || data.stats && '1' == tinvwl_add_to_wishlist.stats) {
920
- $('a.tinvwl_add_to_wishlist_button').each(function () {
921
- if (g) {
922
- $(this).removeClass('tinvwl-product-make-remove').removeClass('tinvwl-product-already-on-wishlist').removeClass('tinvwl-product-in-list').attr('data-tinv-wl-action', 'addto').attr('data-tinv-wl-list', '[]');
923
- }
924
- if (data.stats) {
925
- $(this).find('span.tinvwl-product-stats').remove();
926
- }
927
- });
928
- }
929
  $('body').trigger('tinvwl_wishlist_mark_products', [data]);
930
  $.each(data.products, function (i, item) {
931
  var id = i,
916
  }
917
  function mark_products(data) {
918
  var g = '1' == window.tinvwl_add_to_wishlist['simple_flow'];
919
+ $('a.tinvwl_add_to_wishlist_button').each(function () {
920
+ $(this).removeClass('tinvwl-product-make-remove').removeClass('tinvwl-product-in-list').attr('data-tinv-wl-action', 'addto').attr('data-tinv-wl-list', '[]');
921
+ if (data.stats) {
922
+ $(this).find('span.tinvwl-product-stats').remove();
923
+ }
924
+ });
 
 
 
 
925
  $('body').trigger('tinvwl_wishlist_mark_products', [data]);
926
  $.each(data.products, function (i, item) {
927
  var id = i,
assets/js/public.min.js CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * 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.0.9
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
- "use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function showTooltip(t,i){t.setAttribute("class","social social-clipboard tooltipped tooltipped-s"),t.setAttribute("aria-label",i)}function clearTooltip(t){t.currentTarget.setAttribute("class","social social-clipboard "),t.currentTarget.removeAttribute("aria-label")}!function(c){c.fn.tinvwl_to_wishlist=function(t){var i={api_url:window.location.href.split("?")[0],text_create:window.tinvwl_add_to_wishlist.text_create,text_already_in:window.tinvwl_add_to_wishlist.text_already_in,class:{dialogbox:".tinvwl_add_to_select_wishlist",select:".tinvwl_wishlist",newtitle:".tinvwl_new_input",dialogbutton:".tinvwl_button_add"},redirectTimer:null,onPrepareList:function(){},onGetDialogBox:function(){},onPrepareDialogBox:function(){c("body > .tinv-wishlist").length||c("body").append(c("<div>").addClass("tinv-wishlist")),c(this).appendTo("body > .tinv-wishlist")},onCreateWishList:function(t){c(this).append(c("<option>").html(t.title).val(t.ID).toggleClass("tinv_in_wishlist",t.in))},onSelectWishList:function(){},onDialogShow:function(t){c(t).addClass("tinv-modal-open"),c(t).removeClass("ftinvwl-pulse")},onDialogHide:function(t){c(t).removeClass("tinv-modal-open"),c(t).removeClass("ftinvwl-pulse")},onInited:function(){},onClick:function(){if(c(this).is(".disabled-add-wishlist"))return!1;c(this).is(".ftinvwl-animated")&&c(this).addClass("ftinvwl-pulse"),(this.tinvwl_dialog?this.tinvwl_dialog.show_list:o.onActionProduct).call(this)},onPrepareDataAction:function(t,i){c("body").trigger("tinvwl_wishlist_button_clicked",[t,i])},filterProductAlreadyIn:function(t){var t=t||[],e={};return c("form.cart[method=post], .woocommerce-variation-add-to-cart, form.vtajaxform[method=post]").find("input, select").each(function(){var t=c(this).attr("name"),i=c(this).attr("type"),n=c(this).val();("checkbox"!==i&&"radio"!==i||c(this).is(":checked"))&&(e["form"+t]=n)}),e=e.formvariation_id,t.filter(function(t){var i;return"object"===_typeof(t.in)&&"string"==typeof e?(i=parseInt(e),0<=t.in.indexOf(i)):t.in})},onMultiProductAlreadyIn:function(t){var t=t||[],n=(t=o.onPrepareList.call(t)||t,t=o.filterProductAlreadyIn.call(this,t)||t,c(this).parent().parent().find(".already-in").remove(),"");0===t.length||(n=c("<ul>"),c.each(t,function(t,i){n.append(c("<li>").html(c("<a>").html(i.title).attr({href:i.url})).val(i.ID))})),n.length&&c(this).closest(".tinv-modal-inner").find("img").after(c("<div>").addClass("already-in").html(o.text_already_in+" ").append(n))},onAction:{redirect:function(t){o.redirectTimer&&clearTimeout(o.redirectTimer),o.redirectTimer=window.setTimeout(function(){window.location.href=t},4e3)},force_redirect:function(t){window.location.href=t},wishlists:function(t){},msg:function(t){if(!t)return!1;var i=c(t).eq(0);c("body > .tinv-wishlist").length||c("body").append(c("<div>").addClass("tinv-wishlist")),c("body > .tinv-wishlist").append(i),d("body > .tinv-wishlist"),o.redirectTimer||(o.removeTimer=window.setTimeout(function(){i.remove(),o.redirectTimer&&clearTimeout(o.redirectTimer)},tinvwl_add_to_wishlist.popup_timer)),i.on("click",".tinv-close-modal, .tinvwl_button_close, .tinv-overlay",function(t){t.preventDefault(),i.remove(),o.redirectTimer&&clearTimeout(o.redirectTimer),o.removeTimer&&clearTimeout(o.removeTimer)})},status:function(t){c("body").trigger("tinvwl_wishlist_added_status",[this,t])},removed:function(t){},make_remove:function(t){},wishlists_data:function(t){l(JSON.stringify(t))}}},o=(i.onActionProduct=function(t,i){var d={form:{},tinv_wishlist_id:t||"",tinv_wishlist_name:i||"",product_type:c(this).attr("data-tinv-wl-producttype"),product_id:c(this).attr("data-tinv-wl-product")||0,product_variation:c(this).attr("data-tinv-wl-productvariation")||0,product_action:c(this).attr("data-tinv-wl-action")||"addto",redirect:window.location.href},n=this,e=[],r=new FormData;tinvwl_add_to_wishlist.wpml&&(d.lang=tinvwl_add_to_wishlist.wpml),tinvwl_add_to_wishlist.wpml_default&&(d.lang_default=tinvwl_add_to_wishlist.wpml_default),"1"==tinvwl_add_to_wishlist.stats&&(d.stats=tinvwl_add_to_wishlist.stats),c('form.cart[method=post][data-product_id="'+c(this).attr("data-tinv-wl-product")+'"], form.vtajaxform[method=post][data-product_id="'+c(this).attr("data-tinv-wl-product")+'"]').each(function(){e.push(c(this))}),e.length||(c(n).closest("form.cart[method=post], form.vtajaxform[method=post]").each(function(){e.push(c(this))}),e.length||e.push(c("form.cart[method=post]"))),c('.tinv-wraper[data-tinvwl_product_id="'+c(this).attr("data-tinv-wl-product")+'"]').each(function(){e.push(c(this))}),c.each(e,function(t,i){c(i).find("input:not(:disabled), select:not(:disabled), textarea:not(:disabled)").each(function(){function o(t,i){if("object"!==_typeof(i))return i;for(var n in void 0===t&&(t={}),i)if(""===n){var e=-1;for(e in t);t[e=parseInt(e)+1]=o(t[n],i[n])}else t[n]=o(t[n],i[n]);return t}var t,i=c(this).attr("name"),n=c(this).attr("type"),e=c(this).val(),a=10;if("button"!==n&&void 0!==i){for(;/^(.+)\[([^\[\]]*?)\]$/.test(i)&&0<a;){var s,l=i.match(/^(.+)\[([^\[\]]*?)\]$/);3===l.length&&((s={})[l[2]]=e,e=s),i=l[1],a--}"file"!==n||(t=c(this)[0].files)&&r.append(i,t[0]),"checkbox"===n||"radio"===n?c(this).is(":checked")&&(e.length||"object"===_typeof(e)||(e=!0),d.form[i]=o(d.form[i],e)):d.form[i]=o(d.form[i],e)}})}),d=o.onPrepareDataAction.call(n,n,d)||d,c.each(d,function(n,t){"form"===n?c.each(t,function(t,i){"object"===_typeof(i)&&(i=JSON.stringify(i)),r.append(n+"["+t+"]",i)}):r.append(n,t)}),c.ajax({url:o.api_url,method:"POST",contentType:!1,processData:!1,data:r}).done(function(t){if(c("body").trigger("tinvwl_wishlist_ajax_response",[this,t]),o.onDialogHide.call(n.tinvwl_dialog,n),"object"===_typeof(t))for(var i in t)"function"==typeof o.onAction[i]&&o.onAction[i].call(n,t[i]);else"function"==typeof o.onAction.msg&&o.onAction.msg.call(n,t)})},c.extend(!0,{},i,t));return c(this).each(function(){if(!c(this).attr("data-tinv-wl-list"))return!1;var t,e;o.dialogbox&&o.dialogbox.length&&(this.tinvwl_dialog=o.dialogbox),this.tinvwl_dialog||(this.tinvwl_dialog=o.onGetDialogBox.call(this)),this.tinvwl_dialog||(t=c(this).nextAll(o.class.dialogbox).eq(0)).length&&(this.tinvwl_dialog=t),this.tinvwl_dialog&&(o.onPrepareDialogBox.call(this.tinvwl_dialog),"function"!=typeof this.tinvwl_dialog.update_list&&(this.tinvwl_dialog.update_list=function(t){var n=c(this).find(o.class.select).eq(0);c(this).find(o.class.newtitle).hide().val(""),n.html(""),c.each(t,function(t,i){o.onCreateWishList.call(n,i)}),o.text_create&&o.onCreateWishList.call(n,{ID:"",title:o.text_create,in:!1}),o.onMultiProductAlreadyIn.call(n,t),o.onSelectWishList.call(n,t),c(this).find(o.class.newtitle).toggle(""===n.val())}),"function"!=typeof this.tinvwl_dialog.show_list&&(this.tinvwl_dialog.show_list=function(){var t=JSON.parse(c(this).attr("data-tinv-wl-list"))||[];t.length?(t=o.onPrepareList.call(t)||t,this.tinvwl_dialog.update_list(t),o.onDialogShow.call(this.tinvwl_dialog,this)):o.onActionProduct.call(this)}),c((e=this).tinvwl_dialog).find(o.class.dialogbutton).off("click").on("click",function(){var t,i=c(e.tinvwl_dialog).find(o.class.select),n=c(e.tinvwl_dialog).find(o.class.newtitle);i.val()||n.val()?o.onActionProduct.call(e,i.val(),n.val()):((t=n.is(":visible")?n:i).addClass("empty-name-wishlist"),window.setTimeout(function(){t.removeClass("empty-name-wishlist")},1e3))})),c(this).off("click").on("click",o.onClick),o.onInited.call(this,o)})},c(document).ready(function(){c("body").on("click keydown",".tinvwl_add_to_wishlist_button",function(t){if("keydown"===t.type){var i=void 0!==t.key?t.key:t.keyCode;if(!("Enter"===i||13===i||0<=["Spacebar"," "].indexOf(i)||32===i))return;t.preventDefault()}if(c("body").trigger("tinvwl_add_to_wishlist_button_click",[this]),c(this).is(".disabled-add-wishlist"))return t.preventDefault(),void window.alert(tinvwl_add_to_wishlist.i18n_make_a_selection_text);c(this).is(".inited-add-wishlist")||c(this).tinvwl_to_wishlist({onInited:function(t){c(this).addClass("inited-add-wishlist"),t.onClick.call(this)}})}),c("body").on("click keydown",'button[name="tinvwl-remove"]',function(t){if("keydown"===t.type){var i=void 0!==t.key?t.key:t.keyCode;if(!("Enter"===i||13===i||0<=["Spacebar"," "].indexOf(i)||32===i))return}t.preventDefault();var e=c(this);e.is(".inited-wishlist-action")||(e.addClass("inited-wishlist-action"),i={"tinvwl-product_id":e.val(),"tinvwl-action":"remove","tinvwl-security":tinvwl_add_to_wishlist.nonce,"tinvwl-paged":e.closest("form").data("tinvwl_paged"),"tinvwl-sharekey":e.closest("form").data("tinvwl_sharekey")},tinvwl_add_to_wishlist.wpml&&(i.lang=tinvwl_add_to_wishlist.wpml),tinvwl_add_to_wishlist.wpml_default&&(i.lang_default=tinvwl_add_to_wishlist.wpml_default),"1"==tinvwl_add_to_wishlist.stats&&(i.stats=tinvwl_add_to_wishlist.stats),c.ajax({url:tinvwl_add_to_wishlist.wc_ajax_url,method:"POST",cache:!1,data:i,beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",tinvwl_add_to_wishlist.nonce)}}).done(function(t){var i,n;c("body").trigger("tinvwl_wishlist_ajax_response",[this,t]),e.removeClass("inited-wishlist-action"),t.msg&&(i=c(t.msg).eq(0),c("body > .tinv-wishlist").length||c("body").append(c("<div>").addClass("tinv-wishlist")),c("body > .tinv-wishlist").append(i),d("body > .tinv-wishlist"),i.on("click",".tinv-close-modal, .tinvwl_button_close, .tinv-overlay",function(t){t.preventDefault(),i.remove()}),n=n||window.setTimeout(function(){i.remove(),n&&clearTimeout(n)},tinvwl_add_to_wishlist.popup_timer)),t.status&&(c("div.tinv-wishlist.woocommerce.tinv-wishlist-clear").replaceWith(t.content),c(".tinvwl-break-input").tinvwl_break_submit({selector:".tinvwl-break-input-filed"}),c(".tinvwl-break-checkbox").tinvwl_break_submit({selector:"table td input[type=checkbox]",validate:function(){return c(this).is(":checked")}}),jQuery.fn.tinvwl_get_wishlist_data()),t.wishlists_data&&l(JSON.stringify(t.wishlists_data))}))}),c("body").on("click keydown",'button[name="tinvwl-add-to-cart"]',function(t){if("keydown"===t.type){var i=void 0!==t.key?t.key:t.keyCode;if(!("Enter"===i||13===i||0<=["Spacebar"," "].indexOf(i)||32===i))return}t.preventDefault();var e=c(this);e.is(".inited-wishlist-action")||(e.addClass("inited-wishlist-action"),i={"tinvwl-product_id":e.val(),"tinvwl-action":"add_to_cart_single","tinvwl-security":tinvwl_add_to_wishlist.nonce,"tinvwl-paged":e.closest("form").data("tinvwl_paged"),"tinvwl-sharekey":e.closest("form").data("tinvwl_sharekey")},tinvwl_add_to_wishlist.wpml&&(i.lang=tinvwl_add_to_wishlist.wpml),tinvwl_add_to_wishlist.wpml_default&&(i.lang_default=tinvwl_add_to_wishlist.wpml_default),"1"==tinvwl_add_to_wishlist.stats&&(i.stats=tinvwl_add_to_wishlist.stats),c.ajax({url:tinvwl_add_to_wishlist.wc_ajax_url,method:"POST",cache:!1,data:i,beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",tinvwl_add_to_wishlist.nonce)}}).done(function(t){var i,n;c("body").trigger("tinvwl_wishlist_ajax_response",[this,t]),e.removeClass("inited-wishlist-action"),t.redirect&&(window.location.href=t.redirect),t.msg&&(i=c(t.msg).eq(0),c("body > .tinv-wishlist").length||c("body").append(c("<div>").addClass("tinv-wishlist")),c("body > .tinv-wishlist").append(i),d("body > .tinv-wishlist"),i.on("click",".tinv-close-modal, .tinvwl_button_close, .tinv-overlay",function(t){t.preventDefault(),i.remove()}),n=n||window.setTimeout(function(){i.remove(),n&&clearTimeout(n)},tinvwl_add_to_wishlist.popup_timer)),t.redirect||(c(document.body).trigger("wc_fragment_refresh"),c("div.tinv-wishlist.woocommerce.tinv-wishlist-clear").replaceWith(t.content),jQuery.fn.tinvwl_get_wishlist_data(),t.wishlists_data&&l(JSON.stringify(t.wishlists_data)))}))}),c("body").on("click keydown",'button[name="tinvwl-action-product_all"]',function(t){if("keydown"===t.type){var i=void 0!==t.key?t.key:t.keyCode;if(!("Enter"===i||13===i||0<=["Spacebar"," "].indexOf(i)||32===i))return}t.preventDefault();var e=c(this);e.is(".inited-wishlist-action")||(e.addClass("inited-wishlist-action"),i={"tinvwl-action":"add_to_cart_all","tinvwl-security":tinvwl_add_to_wishlist.nonce,"tinvwl-paged":e.closest("form").data("tinvwl_paged"),"tinvwl-sharekey":e.closest("form").data("tinvwl_sharekey")},tinvwl_add_to_wishlist.wpml&&(i.lang=tinvwl_add_to_wishlist.wpml),tinvwl_add_to_wishlist.wpml_default&&(i.lang_default=tinvwl_add_to_wishlist.wpml_default),"1"==tinvwl_add_to_wishlist.stats&&(i.stats=tinvwl_add_to_wishlist.stats),c.ajax({url:tinvwl_add_to_wishlist.wc_ajax_url,method:"POST",cache:!1,data:i,beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",tinvwl_add_to_wishlist.nonce)}}).done(function(t){var i,n;c("body").trigger("tinvwl_wishlist_ajax_response",[this,t]),e.removeClass("inited-wishlist-action"),t.redirect&&(window.location.href=t.redirect),t.msg&&(i=c(t.msg).eq(0),c("body > .tinv-wishlist").length||c("body").append(c("<div>").addClass("tinv-wishlist")),c("body > .tinv-wishlist").append(i),d("body > .tinv-wishlist"),i.on("click",".tinv-close-modal, .tinvwl_button_close, .tinv-overlay",function(t){t.preventDefault(),i.remove()}),n=n||window.setTimeout(function(){i.remove(),n&&clearTimeout(n)},tinvwl_add_to_wishlist.popup_timer)),t.redirect||(c(document.body).trigger("wc_fragment_refresh"),c("div.tinv-wishlist.woocommerce.tinv-wishlist-clear").replaceWith(t.content),jQuery.fn.tinvwl_get_wishlist_data(),t.wishlists_data&&l(JSON.stringify(t.wishlists_data)))}))}),c("body").on("click keydown",'button[name="tinvwl-action-product_apply"], button[name="tinvwl-action-product_selected"]',function(t){if("keydown"===t.type){var i=void 0!==t.key?t.key:t.keyCode;if(!("Enter"===i||13===i||0<=["Spacebar"," "].indexOf(i)||32===i))return}t.preventDefault();var e,n=[],o=(c('input[name="wishlist_pr[]"]:checked').each(function(){n.push(this.value)}),c(this));n.length&&("tinvwl-action-product_selected"===o.attr("name")||c("select#tinvwl_product_actions option").filter(":selected").val())?o.is(".inited-wishlist-action")||(o.addClass("inited-wishlist-action"),e="",e="tinvwl-action-product_selected"===o.attr("name")?"add_to_cart_selected":c("select#tinvwl_product_actions option").filter(":selected").val(),i={"tinvwl-products":n,"tinvwl-action":e,"tinvwl-security":tinvwl_add_to_wishlist.nonce,"tinvwl-paged":o.closest("form").data("tinvwl_paged"),"tinvwl-sharekey":o.closest("form").data("tinvwl_sharekey")},tinvwl_add_to_wishlist.wpml&&(i.lang=tinvwl_add_to_wishlist.wpml),tinvwl_add_to_wishlist.wpml_default&&(i.lang_default=tinvwl_add_to_wishlist.wpml_default),"1"==tinvwl_add_to_wishlist.stats&&(i.stats=tinvwl_add_to_wishlist.stats),c.ajax({url:tinvwl_add_to_wishlist.wc_ajax_url,method:"POST",cache:!1,data:i,beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",tinvwl_add_to_wishlist.nonce)}}).done(function(t){var i,n;c("body").trigger("tinvwl_wishlist_ajax_response",[this,t]),o.removeClass("inited-wishlist-action"),t.redirect&&(window.location.href=t.redirect),t.msg&&(i=c(t.msg).eq(0),c("body > .tinv-wishlist").length||c("body").append(c("<div>").addClass("tinv-wishlist")),c("body > .tinv-wishlist").append(i),d("body > .tinv-wishlist"),i.on("click",".tinv-close-modal, .tinvwl_button_close, .tinv-overlay",function(t){t.preventDefault(),i.remove()}),n=n||window.setTimeout(function(){i.remove(),n&&clearTimeout(n)},tinvwl_add_to_wishlist.popup_timer)),t.redirect||("add_to_cart_selected"===e&&c(document.body).trigger("wc_fragment_refresh"),c("div.tinv-wishlist.woocommerce.tinv-wishlist-clear").replaceWith(t.content),jQuery.fn.tinvwl_get_wishlist_data(),t.wishlists_data&&l(JSON.stringify(t.wishlists_data)))})):alert(window.tinvwl_add_to_wishlist.tinvwl_break_submit)}),c(document).on("hide_variation",".variations_form",function(t){var i=c('.tinvwl_add_to_wishlist_button:not(.tinvwl-loop)[data-tinv-wl-product="'+c(this).data("product_id")+'"]');if(i.attr("data-tinv-wl-productvariation",0),i.length&&i.attr("data-tinv-wl-list")){var n=JSON.parse(i.attr("data-tinv-wl-list")),e=!1,o="1"==window.tinvwl_add_to_wishlist.simple_flow;for(a in n)n[a].hasOwnProperty("in")&&Array.isArray(n[a].in)&&-1<(n[a].in||[]).indexOf(0)&&(e=!0);i.toggleClass("tinvwl-product-in-list",e).toggleClass("tinvwl-product-make-remove",e&&o).attr("data-tinv-wl-action",e&&o?"remove":"addto")}if(i.length&&i.attr("data-tinv-wl-product-stats")){i.find("span.tinvwl-product-stats").remove();var a,s=JSON.parse(i.attr("data-tinv-wl-product-stats"));for(a in s)-1<a.indexOf(0)&&(e=!0,c("body").trigger("tinvwl_wishlist_product_stats",[i,e]),i.append('<span class="tinvwl-product-stats">'+s[a]+"</span>"))}i.length&&!tinvwl_add_to_wishlist.allow_parent_variable&&(t.preventDefault(),i.addClass("disabled-add-wishlist"))}),c(document).on("show_variation",".variations_form",function(t,i,n){var e=c('.tinvwl_add_to_wishlist_button:not(.tinvwl-loop)[data-tinv-wl-product="'+c(this).data("product_id")+'"]');if(e.attr("data-tinv-wl-productvariation",i.variation_id),e.length&&e.attr("data-tinv-wl-list")){var o=JSON.parse(e.attr("data-tinv-wl-list")),a=!1,s="1"==window.tinvwl_add_to_wishlist.simple_flow;for(l in o)o[l].hasOwnProperty("in")&&Array.isArray(o[l].in)&&-1<(o[l].in||[]).indexOf(i.variation_id)&&(a=!0);e.toggleClass("tinvwl-product-in-list",a).toggleClass("tinvwl-product-make-remove",a&&s).attr("data-tinv-wl-action",a&&s?"remove":"addto")}if(e.length&&e.attr("data-tinv-wl-product-stats")){e.find("span.tinvwl-product-stats").remove();var l,d=JSON.parse(e.attr("data-tinv-wl-product-stats"));for(l in d)-1<l.indexOf(i.variation_id)&&(a=!0,c("body").trigger("tinvwl_wishlist_product_stats",[e,a]),e.append('<span class="tinvwl-product-stats">'+d[l]+"</span>"))}t.preventDefault(),e.removeClass("disabled-add-wishlist")}),c(window).on("storage onstorage",function(t){a===t.originalEvent.key&&localStorage.getItem(a)!==sessionStorage.getItem(a)&&(!localStorage.getItem(a)||"object"===_typeof(t=JSON.parse(localStorage.getItem(a)))&&null!==t&&(t.hasOwnProperty("products")||t.hasOwnProperty("counter"))&&l(localStorage.getItem(a)))});var i=[],n=!1,t=(c("a.tinvwl_add_to_wishlist_button").each(function(){"undefined"!==c(this).data("tinv-wl-product")&&c(this).data("tinv-wl-product")&&i.push(c(this).data("tinv-wl-product"))}),c(".wishlist_products_counter_number").each(function(){n=!0}),c.fn.tinvwl_get_wishlist_data=function(){if(o&&(tinvwl_add_to_wishlist.update_wishlists_data&&localStorage.setItem(a,""),localStorage.getItem(a))){var t=JSON.parse(localStorage.getItem(a));if("object"===_typeof(t)&&null!==t&&(t.hasOwnProperty("products")||t.hasOwnProperty("counter"))&&(!t.hasOwnProperty("lang")&&!tinvwl_add_to_wishlist.wpml||tinvwl_add_to_wishlist.wpml&&t.lang===tinvwl_add_to_wishlist.wpml))return void s(t)}tinvwl_add_to_wishlist.block_ajax_wishlists_data||(i.length||n)&&(t={"tinvwl-action":"get_data","tinvwl-security":tinvwl_add_to_wishlist.nonce},tinvwl_add_to_wishlist.wpml&&(t.lang=tinvwl_add_to_wishlist.wpml),tinvwl_add_to_wishlist.wpml_default&&(t.lang_default=tinvwl_add_to_wishlist.wpml_default),"1"==tinvwl_add_to_wishlist.stats&&(t.stats=tinvwl_add_to_wishlist.stats),c.ajax({url:tinvwl_add_to_wishlist.wc_ajax_url,method:"POST",cache:!1,data:t,beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",tinvwl_add_to_wishlist.nonce)}}).done(function(t){c("body").trigger("tinvwl_wishlist_ajax_response",[this,t]),t.wishlists_data&&l(JSON.stringify(t.wishlists_data))}))},c.fn.tinvwl_get_wishlist_data(),new MutationObserver(function(t){i=[],t.forEach(function(t){t=t.addedNodes;null!==t&&c(t).each(function(){var t=c(this).find(".tinvwl_add_to_wishlist_button");t.length&&t.each(function(){"undefined"!==c(this).data("tinv-wl-product")&&c(this).data("tinv-wl-product")&&i.push(c(this).data("tinv-wl-product"))})})}),i.length&&c.fn.tinvwl_get_wishlist_data()})),e=document.body;t.observe(e,{childList:!0,subtree:!0})});var o=!0,a=tinvwl_add_to_wishlist.hash_key;try{o="sessionStorage"in window&&null!==window.sessionStorage,window.sessionStorage.setItem("ti","test"),window.sessionStorage.removeItem("ti"),window.localStorage.setItem("ti","test"),window.localStorage.removeItem("ti")}catch(t){o=!1}function s(t){var s="1"==window.tinvwl_add_to_wishlist.simple_flow,i=((s||t.stats&&"1"==tinvwl_add_to_wishlist.stats)&&c("a.tinvwl_add_to_wishlist_button").each(function(){s&&c(this).removeClass("tinvwl-product-make-remove").removeClass("tinvwl-product-already-on-wishlist").removeClass("tinvwl-product-in-list").attr("data-tinv-wl-action","addto").attr("data-tinv-wl-list","[]"),t.stats&&c(this).find("span.tinvwl-product-stats").remove()}),c("body").trigger("tinvwl_wishlist_mark_products",[t]),c.each(t.products,function(t,o){var a=t;c('a.tinvwl_add_to_wishlist_button[data-tinv-wl-product="'+a+'"]').each(function(){var i,t=parseInt(c(this).attr("data-tinv-wl-productvariation")),n=c(this).data("tinv-wl-productvariations")||[],e=!1;for(i in o)o[i].hasOwnProperty("in")&&Array.isArray(o[i].in)&&(-1<(o[i].in||[]).indexOf(a)||-1<(o[i].in||[]).indexOf(t)||n.some(function(t){return 0<=(o[i].in||[]).indexOf(t)}))&&(e=!0);c("body").trigger("tinvwl_wishlist_product_marked",[this,e]),c(this).attr("data-tinv-wl-list",JSON.stringify(o)).toggleClass("tinvwl-product-in-list",e).toggleClass("tinvwl-product-make-remove",e&&s).attr("data-tinv-wl-action",e&&s?"remove":"addto")})}),t.stats&&"1"==tinvwl_add_to_wishlist.stats&&c.each(t.stats,function(t,n){c('a.tinvwl_add_to_wishlist_button[data-tinv-wl-product="'+t+'"]').each(function(){c(this).attr("data-tinv-wl-product-stats",JSON.stringify(n));var t,i=parseInt(c(this).attr("data-tinv-wl-productvariation"));for(t in n)-1<t.indexOf(i)&&(c("body").trigger("tinvwl_wishlist_product_stats",[this,!0]),c(this).append('<span class="tinvwl-product-stats">'+n[t]+"</span>"))})}),t.counter);"1"==window.tinvwl_add_to_wishlist.hide_zero_counter&&0===i&&(i="false"),jQuery("i.wishlist-icon").addClass("added"),"false"!==i?(jQuery(".wishlist_products_counter_number, body.theme-woostify .wishlist-item-count").html(i),jQuery("i.wishlist-icon").attr("data-icon-label",i)):(jQuery(".wishlist_products_counter_number, body.theme-woostify .wishlist-item-count").html("").closest("span.wishlist-counter-with-products").removeClass("wishlist-counter-with-products"),jQuery("i.wishlist-icon").removeAttr("data-icon-label")),i=!("0"==i||"false"==i),jQuery(".wishlist_products_counter").toggleClass("wishlist-counter-with-products",i),setTimeout(function(){jQuery("i.wishlist-icon").removeClass("added")},500)}function l(t){o&&(localStorage.setItem(a,t),sessionStorage.setItem(a,t),s(JSON.parse(t)))}function d(t){var t=c(t).find("select, input, textarea, button, a").filter(":visible"),i=t.first(),n=t.last();i.focus().blur(),n.on("keydown",function(t){9!==t.which||t.shiftKey||(t.preventDefault(),i.focus())}),i.on("keydown",function(t){9===t.which&&t.shiftKey&&(t.preventDefault(),n.focus())})}}(jQuery),function(e){e(document).ready(function(){if(e(".tinv-lists-nav").each(function(){e(this).html().trim().length||e(this).remove()}),e("body").on("click",".social-buttons .social:not(.social-email,.social-whatsapp,.social-clipboard)",function(t){var i=window.open(e(this).attr("href"),e(this).attr("title"),"width=420,height=320,resizable=yes,scrollbars=yes,status=yes");i&&(i.focus(),t.preventDefault())}),"undefined"!=typeof ClipboardJS){new ClipboardJS(".social-buttons .social.social-clipboard",{text:function(t){return t.getAttribute("href")}}).on("success",function(t){showTooltip(t.trigger,tinvwl_add_to_wishlist.tinvwl_clipboard)});for(var t=document.querySelectorAll(".social-buttons .social.social-clipboard"),i=0;i<t.length;i++)t[i].addEventListener("mouseleave",clearTooltip),t[i].addEventListener("blur",clearTooltip)}e("body").on("click",".social-buttons .social.social-clipboard",function(t){t.preventDefault()}),e("body").on("click",".tinv-wishlist .tinv-overlay, .tinv-wishlist .tinv-close-modal, .tinv-wishlist .tinvwl_button_close",function(t){t.preventDefault(),e(this).parents(".tinv-modal:first").removeClass("tinv-modal-open"),e("body").trigger("tinvwl_modal_closed",[this])}),e("body").on("click",".tinv-wishlist .tinvwl-btn-onclick",function(t){e(this).data("url")&&(t.preventDefault(),window.location=e(this).data("url"))});var n=e(".tinv-wishlist .navigation-button");n.length&&n.each(function(){var t=e(this).find("> li");t.length<5&&t.parent().addClass("tinvwl-btns-count-"+t.length)}),e(".tinv-login .showlogin").off("click").on("click",function(t){t.preventDefault(),e(this).closest(".tinv-login").find(".login").toggle()}),e(".tinv-wishlist table.tinvwl-table-manage-list tfoot td").each(function(){e(this).toggle(!!e(this).children().not(".look_in").length||!!e(this).children(".look_in").children().length)})})}(jQuery),function(e){e.fn.tinvwl_break_submit=function(t){var n=e.extend(!0,{},{selector:"input, select, textarea",ifempty:!0,invert:!1,validate:function(){return e(this).val()},rule:function(){var t=e(this).parents("form").eq(0).find(n.selector),i=n.invert;return 0===t.length?n.ifempty:(t.each(function(){i&&!n.invert||!i&&n.invert||(i=Boolean(n.validate.call(e(this))))}),i)}},t);return e(this).each(function(){e(this).on("click",function(t){var i=[];void 0!==e(this).attr("tinvwl_break_submit")&&(i=e(this).attr("tinvwl_break_submit").split(",")),-1!==jQuery.inArray(n.selector,i)&&(i=[]),n.rule.call(e(this))||0!==i.length||(alert(window.tinvwl_add_to_wishlist.tinvwl_break_submit),t.preventDefault()),i.push(n.selector),e(this).attr("tinvwl_break_submit",i),n.rule.call(e(this))&&e(this).removeAttr("tinvwl_break_submit")})})},e(document).ready(function(){e("body").on("click",".global-cb",function(){e(this).closest("table").eq(0).find(".product-cb input[type=checkbox], .wishlist-cb input[type=checkbox]").prop("checked",e(this).is(":checked"))})})}(jQuery);
1
  /**
2
  * 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.0.10
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
+ "use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function showTooltip(t,i){t.setAttribute("class","social social-clipboard tooltipped tooltipped-s"),t.setAttribute("aria-label",i)}function clearTooltip(t){t.currentTarget.setAttribute("class","social social-clipboard "),t.currentTarget.removeAttribute("aria-label")}!function(c){c.fn.tinvwl_to_wishlist=function(t){var i={api_url:window.location.href.split("?")[0],text_create:window.tinvwl_add_to_wishlist.text_create,text_already_in:window.tinvwl_add_to_wishlist.text_already_in,class:{dialogbox:".tinvwl_add_to_select_wishlist",select:".tinvwl_wishlist",newtitle:".tinvwl_new_input",dialogbutton:".tinvwl_button_add"},redirectTimer:null,onPrepareList:function(){},onGetDialogBox:function(){},onPrepareDialogBox:function(){c("body > .tinv-wishlist").length||c("body").append(c("<div>").addClass("tinv-wishlist")),c(this).appendTo("body > .tinv-wishlist")},onCreateWishList:function(t){c(this).append(c("<option>").html(t.title).val(t.ID).toggleClass("tinv_in_wishlist",t.in))},onSelectWishList:function(){},onDialogShow:function(t){c(t).addClass("tinv-modal-open"),c(t).removeClass("ftinvwl-pulse")},onDialogHide:function(t){c(t).removeClass("tinv-modal-open"),c(t).removeClass("ftinvwl-pulse")},onInited:function(){},onClick:function(){if(c(this).is(".disabled-add-wishlist"))return!1;c(this).is(".ftinvwl-animated")&&c(this).addClass("ftinvwl-pulse"),(this.tinvwl_dialog?this.tinvwl_dialog.show_list:o.onActionProduct).call(this)},onPrepareDataAction:function(t,i){c("body").trigger("tinvwl_wishlist_button_clicked",[t,i])},filterProductAlreadyIn:function(t){var t=t||[],e={};return c("form.cart[method=post], .woocommerce-variation-add-to-cart, form.vtajaxform[method=post]").find("input, select").each(function(){var t=c(this).attr("name"),i=c(this).attr("type"),n=c(this).val();("checkbox"!==i&&"radio"!==i||c(this).is(":checked"))&&(e["form"+t]=n)}),e=e.formvariation_id,t.filter(function(t){var i;return"object"===_typeof(t.in)&&"string"==typeof e?(i=parseInt(e),0<=t.in.indexOf(i)):t.in})},onMultiProductAlreadyIn:function(t){var t=t||[],n=(t=o.onPrepareList.call(t)||t,t=o.filterProductAlreadyIn.call(this,t)||t,c(this).parent().parent().find(".already-in").remove(),"");0===t.length||(n=c("<ul>"),c.each(t,function(t,i){n.append(c("<li>").html(c("<a>").html(i.title).attr({href:i.url})).val(i.ID))})),n.length&&c(this).closest(".tinv-modal-inner").find("img").after(c("<div>").addClass("already-in").html(o.text_already_in+" ").append(n))},onAction:{redirect:function(t){o.redirectTimer&&clearTimeout(o.redirectTimer),o.redirectTimer=window.setTimeout(function(){window.location.href=t},4e3)},force_redirect:function(t){window.location.href=t},wishlists:function(t){},msg:function(t){if(!t)return!1;var i=c(t).eq(0);c("body > .tinv-wishlist").length||c("body").append(c("<div>").addClass("tinv-wishlist")),c("body > .tinv-wishlist").append(i),d("body > .tinv-wishlist"),o.redirectTimer||(o.removeTimer=window.setTimeout(function(){i.remove(),o.redirectTimer&&clearTimeout(o.redirectTimer)},tinvwl_add_to_wishlist.popup_timer)),i.on("click",".tinv-close-modal, .tinvwl_button_close, .tinv-overlay",function(t){t.preventDefault(),i.remove(),o.redirectTimer&&clearTimeout(o.redirectTimer),o.removeTimer&&clearTimeout(o.removeTimer)})},status:function(t){c("body").trigger("tinvwl_wishlist_added_status",[this,t])},removed:function(t){},make_remove:function(t){},wishlists_data:function(t){l(JSON.stringify(t))}}},o=(i.onActionProduct=function(t,i){var d={form:{},tinv_wishlist_id:t||"",tinv_wishlist_name:i||"",product_type:c(this).attr("data-tinv-wl-producttype"),product_id:c(this).attr("data-tinv-wl-product")||0,product_variation:c(this).attr("data-tinv-wl-productvariation")||0,product_action:c(this).attr("data-tinv-wl-action")||"addto",redirect:window.location.href},n=this,e=[],r=new FormData;tinvwl_add_to_wishlist.wpml&&(d.lang=tinvwl_add_to_wishlist.wpml),tinvwl_add_to_wishlist.wpml_default&&(d.lang_default=tinvwl_add_to_wishlist.wpml_default),"1"==tinvwl_add_to_wishlist.stats&&(d.stats=tinvwl_add_to_wishlist.stats),c('form.cart[method=post][data-product_id="'+c(this).attr("data-tinv-wl-product")+'"], form.vtajaxform[method=post][data-product_id="'+c(this).attr("data-tinv-wl-product")+'"]').each(function(){e.push(c(this))}),e.length||(c(n).closest("form.cart[method=post], form.vtajaxform[method=post]").each(function(){e.push(c(this))}),e.length||e.push(c("form.cart[method=post]"))),c('.tinv-wraper[data-tinvwl_product_id="'+c(this).attr("data-tinv-wl-product")+'"]').each(function(){e.push(c(this))}),c.each(e,function(t,i){c(i).find("input:not(:disabled), select:not(:disabled), textarea:not(:disabled)").each(function(){function o(t,i){if("object"!==_typeof(i))return i;for(var n in void 0===t&&(t={}),i)if(""===n){var e=-1;for(e in t);t[e=parseInt(e)+1]=o(t[n],i[n])}else t[n]=o(t[n],i[n]);return t}var t,i=c(this).attr("name"),n=c(this).attr("type"),e=c(this).val(),a=10;if("button"!==n&&void 0!==i){for(;/^(.+)\[([^\[\]]*?)\]$/.test(i)&&0<a;){var s,l=i.match(/^(.+)\[([^\[\]]*?)\]$/);3===l.length&&((s={})[l[2]]=e,e=s),i=l[1],a--}"file"!==n||(t=c(this)[0].files)&&r.append(i,t[0]),"checkbox"===n||"radio"===n?c(this).is(":checked")&&(e.length||"object"===_typeof(e)||(e=!0),d.form[i]=o(d.form[i],e)):d.form[i]=o(d.form[i],e)}})}),d=o.onPrepareDataAction.call(n,n,d)||d,c.each(d,function(n,t){"form"===n?c.each(t,function(t,i){"object"===_typeof(i)&&(i=JSON.stringify(i)),r.append(n+"["+t+"]",i)}):r.append(n,t)}),c.ajax({url:o.api_url,method:"POST",contentType:!1,processData:!1,data:r}).done(function(t){if(c("body").trigger("tinvwl_wishlist_ajax_response",[this,t]),o.onDialogHide.call(n.tinvwl_dialog,n),"object"===_typeof(t))for(var i in t)"function"==typeof o.onAction[i]&&o.onAction[i].call(n,t[i]);else"function"==typeof o.onAction.msg&&o.onAction.msg.call(n,t)})},c.extend(!0,{},i,t));return c(this).each(function(){if(!c(this).attr("data-tinv-wl-list"))return!1;var t,e;o.dialogbox&&o.dialogbox.length&&(this.tinvwl_dialog=o.dialogbox),this.tinvwl_dialog||(this.tinvwl_dialog=o.onGetDialogBox.call(this)),this.tinvwl_dialog||(t=c(this).nextAll(o.class.dialogbox).eq(0)).length&&(this.tinvwl_dialog=t),this.tinvwl_dialog&&(o.onPrepareDialogBox.call(this.tinvwl_dialog),"function"!=typeof this.tinvwl_dialog.update_list&&(this.tinvwl_dialog.update_list=function(t){var n=c(this).find(o.class.select).eq(0);c(this).find(o.class.newtitle).hide().val(""),n.html(""),c.each(t,function(t,i){o.onCreateWishList.call(n,i)}),o.text_create&&o.onCreateWishList.call(n,{ID:"",title:o.text_create,in:!1}),o.onMultiProductAlreadyIn.call(n,t),o.onSelectWishList.call(n,t),c(this).find(o.class.newtitle).toggle(""===n.val())}),"function"!=typeof this.tinvwl_dialog.show_list&&(this.tinvwl_dialog.show_list=function(){var t=JSON.parse(c(this).attr("data-tinv-wl-list"))||[];t.length?(t=o.onPrepareList.call(t)||t,this.tinvwl_dialog.update_list(t),o.onDialogShow.call(this.tinvwl_dialog,this)):o.onActionProduct.call(this)}),c((e=this).tinvwl_dialog).find(o.class.dialogbutton).off("click").on("click",function(){var t,i=c(e.tinvwl_dialog).find(o.class.select),n=c(e.tinvwl_dialog).find(o.class.newtitle);i.val()||n.val()?o.onActionProduct.call(e,i.val(),n.val()):((t=n.is(":visible")?n:i).addClass("empty-name-wishlist"),window.setTimeout(function(){t.removeClass("empty-name-wishlist")},1e3))})),c(this).off("click").on("click",o.onClick),o.onInited.call(this,o)})},c(document).ready(function(){c("body").on("click keydown",".tinvwl_add_to_wishlist_button",function(t){if("keydown"===t.type){var i=void 0!==t.key?t.key:t.keyCode;if(!("Enter"===i||13===i||0<=["Spacebar"," "].indexOf(i)||32===i))return;t.preventDefault()}if(c("body").trigger("tinvwl_add_to_wishlist_button_click",[this]),c(this).is(".disabled-add-wishlist"))return t.preventDefault(),void window.alert(tinvwl_add_to_wishlist.i18n_make_a_selection_text);c(this).is(".inited-add-wishlist")||c(this).tinvwl_to_wishlist({onInited:function(t){c(this).addClass("inited-add-wishlist"),t.onClick.call(this)}})}),c("body").on("click keydown",'button[name="tinvwl-remove"]',function(t){if("keydown"===t.type){var i=void 0!==t.key?t.key:t.keyCode;if(!("Enter"===i||13===i||0<=["Spacebar"," "].indexOf(i)||32===i))return}t.preventDefault();var e=c(this);e.is(".inited-wishlist-action")||(e.addClass("inited-wishlist-action"),i={"tinvwl-product_id":e.val(),"tinvwl-action":"remove","tinvwl-security":tinvwl_add_to_wishlist.nonce,"tinvwl-paged":e.closest("form").data("tinvwl_paged"),"tinvwl-sharekey":e.closest("form").data("tinvwl_sharekey")},tinvwl_add_to_wishlist.wpml&&(i.lang=tinvwl_add_to_wishlist.wpml),tinvwl_add_to_wishlist.wpml_default&&(i.lang_default=tinvwl_add_to_wishlist.wpml_default),"1"==tinvwl_add_to_wishlist.stats&&(i.stats=tinvwl_add_to_wishlist.stats),c.ajax({url:tinvwl_add_to_wishlist.wc_ajax_url,method:"POST",cache:!1,data:i,beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",tinvwl_add_to_wishlist.nonce)}}).done(function(t){var i,n;c("body").trigger("tinvwl_wishlist_ajax_response",[this,t]),e.removeClass("inited-wishlist-action"),t.msg&&(i=c(t.msg).eq(0),c("body > .tinv-wishlist").length||c("body").append(c("<div>").addClass("tinv-wishlist")),c("body > .tinv-wishlist").append(i),d("body > .tinv-wishlist"),i.on("click",".tinv-close-modal, .tinvwl_button_close, .tinv-overlay",function(t){t.preventDefault(),i.remove()}),n=n||window.setTimeout(function(){i.remove(),n&&clearTimeout(n)},tinvwl_add_to_wishlist.popup_timer)),t.status&&(c("div.tinv-wishlist.woocommerce.tinv-wishlist-clear").replaceWith(t.content),c(".tinvwl-break-input").tinvwl_break_submit({selector:".tinvwl-break-input-filed"}),c(".tinvwl-break-checkbox").tinvwl_break_submit({selector:"table td input[type=checkbox]",validate:function(){return c(this).is(":checked")}}),jQuery.fn.tinvwl_get_wishlist_data()),t.wishlists_data&&l(JSON.stringify(t.wishlists_data))}))}),c("body").on("click keydown",'button[name="tinvwl-add-to-cart"]',function(t){if("keydown"===t.type){var i=void 0!==t.key?t.key:t.keyCode;if(!("Enter"===i||13===i||0<=["Spacebar"," "].indexOf(i)||32===i))return}t.preventDefault();var e=c(this);e.is(".inited-wishlist-action")||(e.addClass("inited-wishlist-action"),i={"tinvwl-product_id":e.val(),"tinvwl-action":"add_to_cart_single","tinvwl-security":tinvwl_add_to_wishlist.nonce,"tinvwl-paged":e.closest("form").data("tinvwl_paged"),"tinvwl-sharekey":e.closest("form").data("tinvwl_sharekey")},tinvwl_add_to_wishlist.wpml&&(i.lang=tinvwl_add_to_wishlist.wpml),tinvwl_add_to_wishlist.wpml_default&&(i.lang_default=tinvwl_add_to_wishlist.wpml_default),"1"==tinvwl_add_to_wishlist.stats&&(i.stats=tinvwl_add_to_wishlist.stats),c.ajax({url:tinvwl_add_to_wishlist.wc_ajax_url,method:"POST",cache:!1,data:i,beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",tinvwl_add_to_wishlist.nonce)}}).done(function(t){var i,n;c("body").trigger("tinvwl_wishlist_ajax_response",[this,t]),e.removeClass("inited-wishlist-action"),t.redirect&&(window.location.href=t.redirect),t.msg&&(i=c(t.msg).eq(0),c("body > .tinv-wishlist").length||c("body").append(c("<div>").addClass("tinv-wishlist")),c("body > .tinv-wishlist").append(i),d("body > .tinv-wishlist"),i.on("click",".tinv-close-modal, .tinvwl_button_close, .tinv-overlay",function(t){t.preventDefault(),i.remove()}),n=n||window.setTimeout(function(){i.remove(),n&&clearTimeout(n)},tinvwl_add_to_wishlist.popup_timer)),t.redirect||(c(document.body).trigger("wc_fragment_refresh"),c("div.tinv-wishlist.woocommerce.tinv-wishlist-clear").replaceWith(t.content),jQuery.fn.tinvwl_get_wishlist_data(),t.wishlists_data&&l(JSON.stringify(t.wishlists_data)))}))}),c("body").on("click keydown",'button[name="tinvwl-action-product_all"]',function(t){if("keydown"===t.type){var i=void 0!==t.key?t.key:t.keyCode;if(!("Enter"===i||13===i||0<=["Spacebar"," "].indexOf(i)||32===i))return}t.preventDefault();var e=c(this);e.is(".inited-wishlist-action")||(e.addClass("inited-wishlist-action"),i={"tinvwl-action":"add_to_cart_all","tinvwl-security":tinvwl_add_to_wishlist.nonce,"tinvwl-paged":e.closest("form").data("tinvwl_paged"),"tinvwl-sharekey":e.closest("form").data("tinvwl_sharekey")},tinvwl_add_to_wishlist.wpml&&(i.lang=tinvwl_add_to_wishlist.wpml),tinvwl_add_to_wishlist.wpml_default&&(i.lang_default=tinvwl_add_to_wishlist.wpml_default),"1"==tinvwl_add_to_wishlist.stats&&(i.stats=tinvwl_add_to_wishlist.stats),c.ajax({url:tinvwl_add_to_wishlist.wc_ajax_url,method:"POST",cache:!1,data:i,beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",tinvwl_add_to_wishlist.nonce)}}).done(function(t){var i,n;c("body").trigger("tinvwl_wishlist_ajax_response",[this,t]),e.removeClass("inited-wishlist-action"),t.redirect&&(window.location.href=t.redirect),t.msg&&(i=c(t.msg).eq(0),c("body > .tinv-wishlist").length||c("body").append(c("<div>").addClass("tinv-wishlist")),c("body > .tinv-wishlist").append(i),d("body > .tinv-wishlist"),i.on("click",".tinv-close-modal, .tinvwl_button_close, .tinv-overlay",function(t){t.preventDefault(),i.remove()}),n=n||window.setTimeout(function(){i.remove(),n&&clearTimeout(n)},tinvwl_add_to_wishlist.popup_timer)),t.redirect||(c(document.body).trigger("wc_fragment_refresh"),c("div.tinv-wishlist.woocommerce.tinv-wishlist-clear").replaceWith(t.content),jQuery.fn.tinvwl_get_wishlist_data(),t.wishlists_data&&l(JSON.stringify(t.wishlists_data)))}))}),c("body").on("click keydown",'button[name="tinvwl-action-product_apply"], button[name="tinvwl-action-product_selected"]',function(t){if("keydown"===t.type){var i=void 0!==t.key?t.key:t.keyCode;if(!("Enter"===i||13===i||0<=["Spacebar"," "].indexOf(i)||32===i))return}t.preventDefault();var e,n=[],o=(c('input[name="wishlist_pr[]"]:checked').each(function(){n.push(this.value)}),c(this));n.length&&("tinvwl-action-product_selected"===o.attr("name")||c("select#tinvwl_product_actions option").filter(":selected").val())?o.is(".inited-wishlist-action")||(o.addClass("inited-wishlist-action"),e="",e="tinvwl-action-product_selected"===o.attr("name")?"add_to_cart_selected":c("select#tinvwl_product_actions option").filter(":selected").val(),i={"tinvwl-products":n,"tinvwl-action":e,"tinvwl-security":tinvwl_add_to_wishlist.nonce,"tinvwl-paged":o.closest("form").data("tinvwl_paged"),"tinvwl-sharekey":o.closest("form").data("tinvwl_sharekey")},tinvwl_add_to_wishlist.wpml&&(i.lang=tinvwl_add_to_wishlist.wpml),tinvwl_add_to_wishlist.wpml_default&&(i.lang_default=tinvwl_add_to_wishlist.wpml_default),"1"==tinvwl_add_to_wishlist.stats&&(i.stats=tinvwl_add_to_wishlist.stats),c.ajax({url:tinvwl_add_to_wishlist.wc_ajax_url,method:"POST",cache:!1,data:i,beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",tinvwl_add_to_wishlist.nonce)}}).done(function(t){var i,n;c("body").trigger("tinvwl_wishlist_ajax_response",[this,t]),o.removeClass("inited-wishlist-action"),t.redirect&&(window.location.href=t.redirect),t.msg&&(i=c(t.msg).eq(0),c("body > .tinv-wishlist").length||c("body").append(c("<div>").addClass("tinv-wishlist")),c("body > .tinv-wishlist").append(i),d("body > .tinv-wishlist"),i.on("click",".tinv-close-modal, .tinvwl_button_close, .tinv-overlay",function(t){t.preventDefault(),i.remove()}),n=n||window.setTimeout(function(){i.remove(),n&&clearTimeout(n)},tinvwl_add_to_wishlist.popup_timer)),t.redirect||("add_to_cart_selected"===e&&c(document.body).trigger("wc_fragment_refresh"),c("div.tinv-wishlist.woocommerce.tinv-wishlist-clear").replaceWith(t.content),jQuery.fn.tinvwl_get_wishlist_data(),t.wishlists_data&&l(JSON.stringify(t.wishlists_data)))})):alert(window.tinvwl_add_to_wishlist.tinvwl_break_submit)}),c(document).on("hide_variation",".variations_form",function(t){var i=c('.tinvwl_add_to_wishlist_button:not(.tinvwl-loop)[data-tinv-wl-product="'+c(this).data("product_id")+'"]');if(i.attr("data-tinv-wl-productvariation",0),i.length&&i.attr("data-tinv-wl-list")){var n=JSON.parse(i.attr("data-tinv-wl-list")),e=!1,o="1"==window.tinvwl_add_to_wishlist.simple_flow;for(a in n)n[a].hasOwnProperty("in")&&Array.isArray(n[a].in)&&-1<(n[a].in||[]).indexOf(0)&&(e=!0);i.toggleClass("tinvwl-product-in-list",e).toggleClass("tinvwl-product-make-remove",e&&o).attr("data-tinv-wl-action",e&&o?"remove":"addto")}if(i.length&&i.attr("data-tinv-wl-product-stats")){i.find("span.tinvwl-product-stats").remove();var a,s=JSON.parse(i.attr("data-tinv-wl-product-stats"));for(a in s)-1<a.indexOf(0)&&(e=!0,c("body").trigger("tinvwl_wishlist_product_stats",[i,e]),i.append('<span class="tinvwl-product-stats">'+s[a]+"</span>"))}i.length&&!tinvwl_add_to_wishlist.allow_parent_variable&&(t.preventDefault(),i.addClass("disabled-add-wishlist"))}),c(document).on("show_variation",".variations_form",function(t,i,n){var e=c('.tinvwl_add_to_wishlist_button:not(.tinvwl-loop)[data-tinv-wl-product="'+c(this).data("product_id")+'"]');if(e.attr("data-tinv-wl-productvariation",i.variation_id),e.length&&e.attr("data-tinv-wl-list")){var o=JSON.parse(e.attr("data-tinv-wl-list")),a=!1,s="1"==window.tinvwl_add_to_wishlist.simple_flow;for(l in o)o[l].hasOwnProperty("in")&&Array.isArray(o[l].in)&&-1<(o[l].in||[]).indexOf(i.variation_id)&&(a=!0);e.toggleClass("tinvwl-product-in-list",a).toggleClass("tinvwl-product-make-remove",a&&s).attr("data-tinv-wl-action",a&&s?"remove":"addto")}if(e.length&&e.attr("data-tinv-wl-product-stats")){e.find("span.tinvwl-product-stats").remove();var l,d=JSON.parse(e.attr("data-tinv-wl-product-stats"));for(l in d)-1<l.indexOf(i.variation_id)&&(a=!0,c("body").trigger("tinvwl_wishlist_product_stats",[e,a]),e.append('<span class="tinvwl-product-stats">'+d[l]+"</span>"))}t.preventDefault(),e.removeClass("disabled-add-wishlist")}),c(window).on("storage onstorage",function(t){a===t.originalEvent.key&&localStorage.getItem(a)!==sessionStorage.getItem(a)&&(!localStorage.getItem(a)||"object"===_typeof(t=JSON.parse(localStorage.getItem(a)))&&null!==t&&(t.hasOwnProperty("products")||t.hasOwnProperty("counter"))&&l(localStorage.getItem(a)))});var i=[],n=!1,t=(c("a.tinvwl_add_to_wishlist_button").each(function(){"undefined"!==c(this).data("tinv-wl-product")&&c(this).data("tinv-wl-product")&&i.push(c(this).data("tinv-wl-product"))}),c(".wishlist_products_counter_number").each(function(){n=!0}),c.fn.tinvwl_get_wishlist_data=function(){if(o&&(tinvwl_add_to_wishlist.update_wishlists_data&&localStorage.setItem(a,""),localStorage.getItem(a))){var t=JSON.parse(localStorage.getItem(a));if("object"===_typeof(t)&&null!==t&&(t.hasOwnProperty("products")||t.hasOwnProperty("counter"))&&(!t.hasOwnProperty("lang")&&!tinvwl_add_to_wishlist.wpml||tinvwl_add_to_wishlist.wpml&&t.lang===tinvwl_add_to_wishlist.wpml))return void s(t)}tinvwl_add_to_wishlist.block_ajax_wishlists_data||(i.length||n)&&(t={"tinvwl-action":"get_data","tinvwl-security":tinvwl_add_to_wishlist.nonce},tinvwl_add_to_wishlist.wpml&&(t.lang=tinvwl_add_to_wishlist.wpml),tinvwl_add_to_wishlist.wpml_default&&(t.lang_default=tinvwl_add_to_wishlist.wpml_default),"1"==tinvwl_add_to_wishlist.stats&&(t.stats=tinvwl_add_to_wishlist.stats),c.ajax({url:tinvwl_add_to_wishlist.wc_ajax_url,method:"POST",cache:!1,data:t,beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",tinvwl_add_to_wishlist.nonce)}}).done(function(t){c("body").trigger("tinvwl_wishlist_ajax_response",[this,t]),t.wishlists_data&&l(JSON.stringify(t.wishlists_data))}))},c.fn.tinvwl_get_wishlist_data(),new MutationObserver(function(t){i=[],t.forEach(function(t){t=t.addedNodes;null!==t&&c(t).each(function(){var t=c(this).find(".tinvwl_add_to_wishlist_button");t.length&&t.each(function(){"undefined"!==c(this).data("tinv-wl-product")&&c(this).data("tinv-wl-product")&&i.push(c(this).data("tinv-wl-product"))})})}),i.length&&c.fn.tinvwl_get_wishlist_data()})),e=document.body;t.observe(e,{childList:!0,subtree:!0})});var o=!0,a=tinvwl_add_to_wishlist.hash_key;try{o="sessionStorage"in window&&null!==window.sessionStorage,window.sessionStorage.setItem("ti","test"),window.sessionStorage.removeItem("ti"),window.localStorage.setItem("ti","test"),window.localStorage.removeItem("ti")}catch(t){o=!1}function s(t){var s="1"==window.tinvwl_add_to_wishlist.simple_flow,i=(c("a.tinvwl_add_to_wishlist_button").each(function(){c(this).removeClass("tinvwl-product-make-remove").removeClass("tinvwl-product-in-list").attr("data-tinv-wl-action","addto").attr("data-tinv-wl-list","[]"),t.stats&&c(this).find("span.tinvwl-product-stats").remove()}),c("body").trigger("tinvwl_wishlist_mark_products",[t]),c.each(t.products,function(t,o){var a=t;c('a.tinvwl_add_to_wishlist_button[data-tinv-wl-product="'+a+'"]').each(function(){var i,t=parseInt(c(this).attr("data-tinv-wl-productvariation")),n=c(this).data("tinv-wl-productvariations")||[],e=!1;for(i in o)o[i].hasOwnProperty("in")&&Array.isArray(o[i].in)&&(-1<(o[i].in||[]).indexOf(a)||-1<(o[i].in||[]).indexOf(t)||n.some(function(t){return 0<=(o[i].in||[]).indexOf(t)}))&&(e=!0);c("body").trigger("tinvwl_wishlist_product_marked",[this,e]),c(this).attr("data-tinv-wl-list",JSON.stringify(o)).toggleClass("tinvwl-product-in-list",e).toggleClass("tinvwl-product-make-remove",e&&s).attr("data-tinv-wl-action",e&&s?"remove":"addto")})}),t.stats&&"1"==tinvwl_add_to_wishlist.stats&&c.each(t.stats,function(t,n){c('a.tinvwl_add_to_wishlist_button[data-tinv-wl-product="'+t+'"]').each(function(){c(this).attr("data-tinv-wl-product-stats",JSON.stringify(n));var t,i=parseInt(c(this).attr("data-tinv-wl-productvariation"));for(t in n)-1<t.indexOf(i)&&(c("body").trigger("tinvwl_wishlist_product_stats",[this,!0]),c(this).append('<span class="tinvwl-product-stats">'+n[t]+"</span>"))})}),t.counter);"1"==window.tinvwl_add_to_wishlist.hide_zero_counter&&0===i&&(i="false"),jQuery("i.wishlist-icon").addClass("added"),"false"!==i?(jQuery(".wishlist_products_counter_number, body.theme-woostify .wishlist-item-count").html(i),jQuery("i.wishlist-icon").attr("data-icon-label",i)):(jQuery(".wishlist_products_counter_number, body.theme-woostify .wishlist-item-count").html("").closest("span.wishlist-counter-with-products").removeClass("wishlist-counter-with-products"),jQuery("i.wishlist-icon").removeAttr("data-icon-label")),i=!("0"==i||"false"==i),jQuery(".wishlist_products_counter").toggleClass("wishlist-counter-with-products",i),setTimeout(function(){jQuery("i.wishlist-icon").removeClass("added")},500)}function l(t){o&&(localStorage.setItem(a,t),sessionStorage.setItem(a,t),s(JSON.parse(t)))}function d(t){var t=c(t).find("select, input, textarea, button, a").filter(":visible"),i=t.first(),n=t.last();i.focus().blur(),n.on("keydown",function(t){9!==t.which||t.shiftKey||(t.preventDefault(),i.focus())}),i.on("keydown",function(t){9===t.which&&t.shiftKey&&(t.preventDefault(),n.focus())})}}(jQuery),function(e){e(document).ready(function(){if(e(".tinv-lists-nav").each(function(){e(this).html().trim().length||e(this).remove()}),e("body").on("click",".social-buttons .social:not(.social-email,.social-whatsapp,.social-clipboard)",function(t){var i=window.open(e(this).attr("href"),e(this).attr("title"),"width=420,height=320,resizable=yes,scrollbars=yes,status=yes");i&&(i.focus(),t.preventDefault())}),"undefined"!=typeof ClipboardJS){new ClipboardJS(".social-buttons .social.social-clipboard",{text:function(t){return t.getAttribute("href")}}).on("success",function(t){showTooltip(t.trigger,tinvwl_add_to_wishlist.tinvwl_clipboard)});for(var t=document.querySelectorAll(".social-buttons .social.social-clipboard"),i=0;i<t.length;i++)t[i].addEventListener("mouseleave",clearTooltip),t[i].addEventListener("blur",clearTooltip)}e("body").on("click",".social-buttons .social.social-clipboard",function(t){t.preventDefault()}),e("body").on("click",".tinv-wishlist .tinv-overlay, .tinv-wishlist .tinv-close-modal, .tinv-wishlist .tinvwl_button_close",function(t){t.preventDefault(),e(this).parents(".tinv-modal:first").removeClass("tinv-modal-open"),e("body").trigger("tinvwl_modal_closed",[this])}),e("body").on("click",".tinv-wishlist .tinvwl-btn-onclick",function(t){e(this).data("url")&&(t.preventDefault(),window.location=e(this).data("url"))});var n=e(".tinv-wishlist .navigation-button");n.length&&n.each(function(){var t=e(this).find("> li");t.length<5&&t.parent().addClass("tinvwl-btns-count-"+t.length)}),e(".tinv-login .showlogin").off("click").on("click",function(t){t.preventDefault(),e(this).closest(".tinv-login").find(".login").toggle()}),e(".tinv-wishlist table.tinvwl-table-manage-list tfoot td").each(function(){e(this).toggle(!!e(this).children().not(".look_in").length||!!e(this).children(".look_in").children().length)})})}(jQuery),function(e){e.fn.tinvwl_break_submit=function(t){var n=e.extend(!0,{},{selector:"input, select, textarea",ifempty:!0,invert:!1,validate:function(){return e(this).val()},rule:function(){var t=e(this).parents("form").eq(0).find(n.selector),i=n.invert;return 0===t.length?n.ifempty:(t.each(function(){i&&!n.invert||!i&&n.invert||(i=Boolean(n.validate.call(e(this))))}),i)}},t);return e(this).each(function(){e(this).on("click",function(t){var i=[];void 0!==e(this).attr("tinvwl_break_submit")&&(i=e(this).attr("tinvwl_break_submit").split(",")),-1!==jQuery.inArray(n.selector,i)&&(i=[]),n.rule.call(e(this))||0!==i.length||(alert(window.tinvwl_add_to_wishlist.tinvwl_break_submit),t.preventDefault()),i.push(n.selector),e(this).attr("tinvwl_break_submit",i),n.rule.call(e(this))&&e(this).removeAttr("tinvwl_break_submit")})})},e(document).ready(function(){e("body").on("click",".global-cb",function(){e(this).closest("table").eq(0).find(".product-cb input[type=checkbox], .wishlist-cb input[type=checkbox]").prop("checked",e(this).is(":checked"))})})}(jQuery);
integrations/comet-cache.php CHANGED
@@ -13,7 +13,7 @@
13
  */
14
 
15
  // If this file is called directly, abort.
16
- if (!defined('ABSPATH')) {
17
  exit;
18
  }
19
 
@@ -24,24 +24,24 @@ $slug = "comet-cache";
24
 
25
  $name = "Comet Cache";
26
 
27
- $available = class_exists('WebSharks\CometCache');
28
 
29
  $tinvwl_integrations = is_array( $tinvwl_integrations ) ? $tinvwl_integrations : [];
30
 
31
- $tinvwl_integrations[$slug] = array(
32
- 'name' => $name,
33
  'available' => $available,
34
  );
35
 
36
- if (!tinv_get_option('integrations', $slug)) {
37
  return;
38
  }
39
 
40
- if (!$available) {
41
  return;
42
  }
43
 
44
- if (function_exists('tinvwl_comet_cache_reject')) {
45
 
46
  /**
47
  * Set define disabled for Comet Cache
@@ -50,17 +50,16 @@ if (function_exists('tinvwl_comet_cache_reject')) {
50
  *
51
  * @return mixed
52
  */
53
- function tinvwl_comet_cache_reject($data = '')
54
- {
55
- define('COMET_CACHE_ALLOWED', false);
56
 
57
  return $data;
58
  }
59
 
60
- add_filter('tinvwl_addtowishlist_return_ajax', 'tinvwl_comet_cache_reject');
61
- add_action('tinvwl_before_action_owner', 'tinvwl_comet_cache_reject');
62
- add_action('tinvwl_before_action_user', 'tinvwl_comet_cache_reject');
63
- add_action('tinvwl_addproduct_tocart', 'tinvwl_comet_cache_reject');
64
- add_action('tinvwl_wishlist_addtowishlist_button', 'tinvwl_comet_cache_reject');
65
- add_action('tinvwl_wishlist_addtowishlist_dialogbox', 'tinvwl_comet_cache_reject');
66
  }
13
  */
14
 
15
  // If this file is called directly, abort.
16
+ if ( ! defined( 'ABSPATH' ) ) {
17
  exit;
18
  }
19
 
24
 
25
  $name = "Comet Cache";
26
 
27
+ $available = class_exists( 'WebSharks\CometCache' );
28
 
29
  $tinvwl_integrations = is_array( $tinvwl_integrations ) ? $tinvwl_integrations : [];
30
 
31
+ $tinvwl_integrations[ $slug ] = array(
32
+ 'name' => $name,
33
  'available' => $available,
34
  );
35
 
36
+ if ( ! tinv_get_option( 'integrations', $slug ) ) {
37
  return;
38
  }
39
 
40
+ if ( ! $available ) {
41
  return;
42
  }
43
 
44
+ if ( function_exists( 'tinvwl_comet_cache_reject' ) ) {
45
 
46
  /**
47
  * Set define disabled for Comet Cache
50
  *
51
  * @return mixed
52
  */
53
+ function tinvwl_comet_cache_reject( $data = '' ) {
54
+ define( 'COMET_CACHE_ALLOWED', false );
 
55
 
56
  return $data;
57
  }
58
 
59
+ add_filter( 'tinvwl_addtowishlist_return_ajax', 'tinvwl_comet_cache_reject' );
60
+ add_action( 'tinvwl_before_action_owner', 'tinvwl_comet_cache_reject' );
61
+ add_action( 'tinvwl_before_action_user', 'tinvwl_comet_cache_reject' );
62
+ add_filter( 'tinvwl_addproduct_tocart', 'tinvwl_comet_cache_reject' );
63
+ add_action( 'tinvwl_wishlist_addtowishlist_button', 'tinvwl_comet_cache_reject' );
64
+ add_action( 'tinvwl_wishlist_addtowishlist_dialogbox', 'tinvwl_comet_cache_reject' );
65
  }
integrations/wc-fields-factory.php ADDED
@@ -0,0 +1,387 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * TI WooCommerce Wishlist integration with:
4
+ *
5
+ * @name WC Fields Factory
6
+ *
7
+ * @version 4.1.5
8
+ *
9
+ * @slug wc-fields-factory
10
+ *
11
+ * @url https://wordpress.org/plugins/wc-fields-factory/
12
+ *
13
+ */
14
+
15
+ // If this file is called directly, abort.
16
+ if ( ! defined( 'ABSPATH' ) ) {
17
+ exit;
18
+ }
19
+
20
+ // Load integration depends on current settings.
21
+ global $tinvwl_integrations;
22
+
23
+ $slug = "wc-fields-factory";
24
+
25
+ $name = "WC Fields Factory";
26
+
27
+ $available = class_exists( 'wcff' );
28
+
29
+ $tinvwl_integrations = is_array( $tinvwl_integrations ) ? $tinvwl_integrations : [];
30
+
31
+ $tinvwl_integrations[ $slug ] = array(
32
+ 'name' => $name,
33
+ 'available' => $available,
34
+ );
35
+
36
+ if ( ! tinv_get_option( 'integrations', $slug ) ) {
37
+ return;
38
+ }
39
+
40
+ if ( ! $available ) {
41
+ return;
42
+ }
43
+
44
+ if ( ! function_exists( 'tinv_wishlist_item_meta_wc_fields_factory' ) ) {
45
+
46
+ /**
47
+ * Set description for meta WooCommerce Product Addons
48
+ *
49
+ * @param array $item_data Meta array.
50
+ * @param int $product_id Wishlist Product.
51
+ * @param int $variation_id Woocommerce Product.
52
+ *
53
+ * @return array
54
+ */
55
+ function tinv_wishlist_item_meta_wc_fields_factory( $item_data, $product_id, $variation_id ) {
56
+
57
+ if ( function_exists( 'wcff' ) ) {
58
+ /* Get the last used template from session */
59
+ $template = WC()->session->get( "wcff_current_template", "single-product" );
60
+
61
+ $wccpf_options = wcff()->option->get_options();
62
+ $is_admin_module_enabled = isset( $wccpf_options["enable_admin_field"] ) ? $wccpf_options["enable_admin_field"] : "yes";
63
+ $is_variable_module_enabled = isset( $wccpf_options["enable_variable_field"] ) ? $wccpf_options["enable_variable_field"] : "yes";
64
+
65
+ $meta = wcff()->dao->load_fields_groups_for_product( $product_id, 'wccpf', $template, "any" );
66
+
67
+ /* If it is Variation products, then loads fields for Variations too */
68
+ if ( isset( $variation_id ) && $variation_id != null && $variation_id != 0 ) {
69
+
70
+ $wccvf_posts = array();
71
+ $wccvf_posts = wcff()->dao->load_fields_groups_for_product( $variation_id, 'wccpf', "variable", "any" );
72
+ $meta = array_merge( $meta, $wccvf_posts );
73
+
74
+ if ( $is_variable_module_enabled == "yes" ) {
75
+ $wccvf_posts = array();
76
+ $wccvf_posts = wcff()->dao->load_fields_groups_for_product( $variation_id, 'wccvf', "any", "any" );
77
+ $meta = array_merge( $meta, $wccvf_posts );
78
+ }
79
+
80
+ if ( $is_admin_module_enabled == "yes" ) {
81
+ /* Also get the admin fields for variations */
82
+ $wccaf_posts = wcff()->dao->load_fields_groups_for_product( $variation_id, 'wccaf', "variable", "any", true );
83
+ $meta = array_merge( $meta, $wccaf_posts );
84
+ }
85
+ }
86
+
87
+ $meta = array_unique( $meta, SORT_REGULAR );
88
+
89
+ $item = array();
90
+
91
+ foreach ( $item_data as $key => $value ) {
92
+ if ( strpos( $key, 'wccpf' ) === 0 || strpos( $key, 'wccvf' ) === 0 ) {
93
+ $data = ( ! is_array( $value['display'] ) && is_object( json_decode( $value['display'] ) ) && strpos( $value['display'], '"file":' ) === false ) ? json_decode( $value['display'], true ) : $value['display'];
94
+
95
+ $item[ $key ]['fname'] = $key;
96
+ $item[ $key ]['user_val'] = $data;
97
+
98
+ $ftype = $format = '';
99
+ $fee_rules = $pricing_rules = array();
100
+ foreach ( $meta as $group ) {
101
+
102
+ foreach ( $group['fields'] as $field ) {
103
+
104
+ $key_parts = explode( '_', $key );
105
+ $short_key = $key_parts[0] . '_' . $key_parts[1];
106
+
107
+ if ( $short_key === $field['key'] ) {
108
+
109
+ $ftype = $field['type'];
110
+ $fee_rules = isset( $field['fee_rules'] ) ? $field['fee_rules'] : array();
111
+ $pricing_rules = isset( $field['pricing_rules'] ) ? $field['pricing_rules'] : array();
112
+ $format = isset( $field['format'] ) ? $field['format'] : '';
113
+ break;
114
+ }
115
+ }
116
+ }
117
+ $item[ $key ]['fee_rules'] = $fee_rules;
118
+ $item[ $key ]['pricing_rules'] = $pricing_rules;
119
+ $item[ $key ]['format'] = $format;
120
+ $item[ $key ]['ftype'] = $ftype;
121
+
122
+ unset( $item_data[ $key ] );
123
+ }
124
+ }
125
+
126
+ $item['product_id'] = $product_id;
127
+ $item['variation_id'] = $variation_id;
128
+
129
+ $data = wcff()->renderer->render_fields_data( array(), $item );
130
+
131
+ foreach ( $data as $opt ) {
132
+
133
+ $item_data[] = array(
134
+ 'key' => $opt['name'],
135
+ 'display' => $opt['value'],
136
+ );
137
+ }
138
+ }
139
+
140
+ return $item_data;
141
+ }
142
+
143
+ add_filter( 'tinvwl_wishlist_item_meta_post', 'tinv_wishlist_item_meta_wc_fields_factory', 10, 3 );
144
+ } // End if().
145
+
146
+ if ( ! function_exists( 'tinvwl_item_price_wc_fields_factory' ) ) {
147
+
148
+ /**
149
+ * Modify price for WooCommerce Product Addons.
150
+ *
151
+ * @param string $price Returned price.
152
+ * @param array $wl_product Wishlist Product.
153
+ * @param WC_Product $product Woocommerce Product.
154
+ *
155
+ * @return string
156
+ */
157
+ function tinvwl_item_price_wc_fields_factory( $price, $wl_product, $product ) {
158
+
159
+ if ( function_exists( 'wcff' ) ) {
160
+ $replaced_price = 0;
161
+ $additional_cost = 0;
162
+
163
+ $customPrice = $basePrice = $product->get_price();
164
+
165
+ $product_id = $wl_product['product_id'];
166
+ $variation_id = $wl_product['variation_id'];
167
+
168
+
169
+ foreach ( $wl_product['meta'] as $ckey => $cval ) {
170
+ if ( ( strpos( $ckey, "wccpf_" ) !== false || strpos( $ckey, "wccvf_" ) !== false ) ) {
171
+
172
+ /* Get the last used template from session */
173
+ $template = WC()->session->get( "wcff_current_template", "single-product" );
174
+
175
+ $wccpf_options = wcff()->option->get_options();
176
+ $is_admin_module_enabled = isset( $wccpf_options["enable_admin_field"] ) ? $wccpf_options["enable_admin_field"] : "yes";
177
+ $is_variable_module_enabled = isset( $wccpf_options["enable_variable_field"] ) ? $wccpf_options["enable_variable_field"] : "yes";
178
+
179
+ $meta = wcff()->dao->load_fields_groups_for_product( $product_id, 'wccpf', $template, "any" );
180
+
181
+ /* If it is Variation products, then loads fields for Variations too */
182
+ if ( isset( $variation_id ) && $variation_id != null && $variation_id != 0 ) {
183
+
184
+ $wccvf_posts = array();
185
+ $wccvf_posts = wcff()->dao->load_fields_groups_for_product( $variation_id, 'wccpf', "variable", "any" );
186
+ $meta = array_merge( $meta, $wccvf_posts );
187
+
188
+ if ( $is_variable_module_enabled == "yes" ) {
189
+ $wccvf_posts = array();
190
+ $wccvf_posts = wcff()->dao->load_fields_groups_for_product( $variation_id, 'wccvf', "any", "any" );
191
+ $meta = array_merge( $meta, $wccvf_posts );
192
+ }
193
+
194
+ if ( $is_admin_module_enabled == "yes" ) {
195
+ /* Also get the admin fields for variations */
196
+ $wccaf_posts = wcff()->dao->load_fields_groups_for_product( $variation_id, 'wccaf', "variable", "any", true );
197
+ $meta = array_merge( $meta, $wccaf_posts );
198
+ }
199
+ }
200
+
201
+ $meta = array_unique( $meta, SORT_REGULAR );
202
+
203
+ $item = array();
204
+
205
+ foreach ( $wl_product['meta'] as $key => $value ) {
206
+ if ( strpos( $key, 'wccpf' ) === 0 || strpos( $key, 'wccvf' ) === 0 ) {
207
+ $data = ( ! is_array( $value ) && is_object( json_decode( $value ) ) ) ? json_decode( $value, true ) : $value;
208
+
209
+ $item[ $key ]['fname'] = $key;
210
+ $item[ $key ]['user_val'] = $data;
211
+
212
+ $ftype = $format = '';
213
+ $fee_rules = $pricing_rules = array();
214
+ foreach ( $meta as $group ) {
215
+
216
+ foreach ( $group['fields'] as $field ) {
217
+
218
+ $key_parts = explode( '_', $key );
219
+ $short_key = $key_parts[0] . '_' . $key_parts[1];
220
+
221
+ if ( $short_key === $field['key'] ) {
222
+
223
+ $ftype = $field['type'];
224
+ $fee_rules = isset( $field['fee_rules'] ) ? $field['fee_rules'] : array();
225
+ $pricing_rules = isset( $field['pricing_rules'] ) ? $field['pricing_rules'] : array();
226
+ $format = isset( $field['format'] ) ? $field['format'] : '';
227
+ break;
228
+ }
229
+ }
230
+ }
231
+ $item[ $key ]['fee_rules'] = $fee_rules;
232
+ $item[ $key ]['pricing_rules'] = $pricing_rules;
233
+ $item[ $key ]['format'] = $format;
234
+ $item[ $key ]['ftype'] = $ftype;
235
+ }
236
+ }
237
+
238
+ $item['product_id'] = $product_id;
239
+ $item['variation_id'] = $variation_id;
240
+
241
+
242
+ if ( isset( $item[ $ckey ]["pricing_rules"] ) ) {
243
+
244
+
245
+ $ftype = $item [ $ckey ] ["ftype"];
246
+ $dformat = $item[ $ckey ] ["format"];
247
+ $uvalue = $item [ $ckey ] ["user_val"];
248
+ $p_rules = $item [ $ckey ] ["pricing_rules"];
249
+
250
+ foreach ( $p_rules as $prule ) {
251
+ if ( wcff()->negotiator->check_rules( $prule, $uvalue, $ftype, $dformat ) ) {
252
+
253
+ $is_amount = isset( $prule["tprice"] ) && $prule["tprice"] == "cost" ? true : false;
254
+
255
+ /* Determine the price */
256
+ if ( $is_amount ) {
257
+
258
+ if ( class_exists( 'WOOCS' ) ) {
259
+ global $WOOCS;
260
+ if ( $WOOCS->is_multiple_allowed ) {
261
+ $prule ['amount'] = $WOOCS->woocs_exchange_value( floatval( $prule ['amount'] ) );
262
+ }
263
+ }
264
+
265
+ if ( $prule["ptype"] == "add" ) {
266
+ $customPrice = $customPrice + floatval( $prule["amount"] );
267
+
268
+ $additional_cost = $additional_cost + floatval( $prule["amount"] );
269
+
270
+ } else if ( $prule["ptype"] == "sub" ) {
271
+ $customPrice = $customPrice - floatval( $prule["amount"] );
272
+
273
+ $additional_cost = $additional_cost - floatval( $prule["amount"] );
274
+ } else {
275
+ $customPrice = floatval( $prule["amount"] );
276
+
277
+ $replaced_price = $replaced_price + floatval( $prule["amount"] );
278
+ }
279
+ } else {
280
+ if ( $prule ["ptype"] == "add" ) {
281
+ $additional_cost = $additional_cost + ( ( floatval( $prule["amount"] ) / 100 ) * $basePrice );
282
+ } else if ( $prule["ptype"] == "sub" ) {
283
+ $additional_cost = $additional_cost - ( ( floatval( $prule["amount"] ) / 100 ) * $basePrice );
284
+ } else {
285
+ $replaced_price = $replaced_price + ( floatval( $prule["amount"] ) / 100 ) * $basePrice;
286
+ }
287
+ }
288
+ }
289
+ }
290
+
291
+ if ( $replaced_price > 0 ) {
292
+ $orgPrice = $replaced_price + $additional_cost;
293
+ } else {
294
+ $orgPrice = $basePrice + $additional_cost;
295
+ }
296
+
297
+ $price = wc_price( $orgPrice );
298
+ }
299
+ }
300
+
301
+ }
302
+ }
303
+
304
+ return $price;
305
+ }
306
+
307
+ add_filter( 'tinvwl_wishlist_item_price', 'tinvwl_item_price_wc_fields_factory', 10, 3 );
308
+ } // End if().
309
+
310
+ add_filter( 'tinvwl_addtowishlist_prepare_form', 'tinvwl_meta_wc_fields_factory', 10, 3 );
311
+
312
+ function tinvwl_meta_wc_fields_factory( $meta, $post, $files ) {
313
+
314
+ if ( function_exists( 'wcff' ) ) {
315
+
316
+ foreach ( $files as $name => $file ) {
317
+ if ( array_key_exists( $name, $meta ) ) {
318
+ $upload = tinvwl_upload_file_wc_fields_factory( $file );
319
+ if ( empty( $upload['error'] ) && ! empty( $upload['file'] ) ) {
320
+ $file['tmp_name'] = $upload['file'];
321
+ $meta[ $name ] = json_encode( array_merge( $upload, $file ) );
322
+ }
323
+ }
324
+ }
325
+ }
326
+
327
+ return $meta;
328
+ }
329
+
330
+ add_filter( 'tinvwl_product_prepare_meta', 'tinvwl_cart_meta_wc_fields_factory' );
331
+
332
+ function tinvwl_cart_meta_wc_fields_factory( $meta ) {
333
+
334
+ if ( function_exists( 'wcff' ) ) {
335
+
336
+ $files = $_FILES;
337
+
338
+ foreach ( $files as $name => $file ) {
339
+ if ( ! array_key_exists( $name, $meta ) ) {
340
+ $upload = tinvwl_upload_file_wc_fields_factory( $file );
341
+ if ( empty( $upload['error'] ) && ! empty( $upload['file'] ) ) {
342
+ $file['tmp_name'] = $upload['file'];
343
+ $meta[ $name ] = json_encode( array_merge( $upload, $file ) );
344
+ }
345
+ }
346
+ }
347
+ }
348
+
349
+ return $meta;
350
+ }
351
+
352
+
353
+ add_filter( 'tinvwl_addproduct_tocart', 'tinvwl_add_to_cart_meta_wc_fields_factory' );
354
+
355
+ function tinvwl_add_to_cart_meta_wc_fields_factory( $wl_product ) {
356
+ if ( function_exists( 'wcff' ) ) {
357
+
358
+ foreach ( $wl_product['meta'] as $key => $value ) {
359
+ if ( strpos( $key, 'wccpf' ) === 0 || strpos( $key, 'wccvf' ) === 0 ) {
360
+ $data = ( ! is_array( $value ) && is_object( json_decode( $value ) ) ) ? json_decode( $value, true ) : $value;
361
+ $wl_product['meta'][ $key ] = $data;
362
+
363
+ if ( strpos( $value, '"file":' ) !== false ) {
364
+ $_FILES[ $key ] = json_decode( $value, true );
365
+ }
366
+ }
367
+ }
368
+ }
369
+
370
+ return $wl_product;
371
+ }
372
+
373
+ function tinvwl_upload_file_wc_fields_factory( $file ) {
374
+
375
+ if ( ! function_exists( 'wp_handle_upload' ) ) {
376
+ require_once( ABSPATH . 'wp-admin/includes/file.php' );
377
+ }
378
+ $upload = wp_handle_upload(
379
+ $file,
380
+ [
381
+ 'test_form' => false,
382
+ 'test_type' => false,
383
+ ]
384
+ );
385
+
386
+ return $upload;
387
+ }
languages/ti-woocommerce-wishlist.pot CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2022 TI WooCommerce Wishlist Plugin - 2.0.9
2
- # This file is distributed under the same license as the TI WooCommerce Wishlist Plugin - 2.0.9 package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: TI WooCommerce Wishlist Plugin - 2.0.9\n"
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
@@ -11,7 +11,7 @@ msgstr ""
11
  "Language-Team: TemplateInvaders (https://templateinvaders.com/)\n"
12
  "Last-Translator: TemplateInvaders (https://templateinvaders.com/)\n"
13
  "MIME-Version: 1.0\n"
14
- "Project-Id-Version: TI WooCommerce Wishlist Plugin - 2.0.9\n"
15
  "Report-Msgid-Bugs-To: https://templateinvaders.com/help/\n"
16
  "X-Poedit-Basepath: ..\n"
17
  "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
1
+ # Copyright (C) 2022 TI WooCommerce Wishlist Plugin - 2.0.10
2
+ # This file is distributed under the same license as the TI WooCommerce Wishlist Plugin - 2.0.10 package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: TI WooCommerce Wishlist Plugin - 2.0.10\n"
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
11
  "Language-Team: TemplateInvaders (https://templateinvaders.com/)\n"
12
  "Last-Translator: TemplateInvaders (https://templateinvaders.com/)\n"
13
  "MIME-Version: 1.0\n"
14
+ "Project-Id-Version: TI WooCommerce Wishlist Plugin - 2.0.10\n"
15
  "Report-Msgid-Bugs-To: https://templateinvaders.com/help/\n"
16
  "X-Poedit-Basepath: ..\n"
17
  "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
public/addtowishlist.class.php CHANGED
@@ -368,6 +368,7 @@ class TInvWL_Public_AddToWishlist {
368
  }
369
  if ( ! tinv_get_option( 'general', 'show_notice' ) && array_key_exists( 'msg', $data ) ) {
370
  unset( $data['msg'] );
 
371
  }
372
  if ( tinv_get_option( 'general', 'simple_flow' ) ) {
373
  $data['make_remove'] = $data['status'];
368
  }
369
  if ( ! tinv_get_option( 'general', 'show_notice' ) && array_key_exists( 'msg', $data ) ) {
370
  unset( $data['msg'] );
371
+ $data['force_redirect'] = $data['wishlist_url'];
372
  }
373
  if ( tinv_get_option( 'general', 'simple_flow' ) ) {
374
  $data['make_remove'] = $data['status'];
public/cart.class.php CHANGED
@@ -137,8 +137,6 @@ class TInvWL_Public_Cart {
137
  // Could be any value that saved to a custom meta.
138
  if ( array_key_exists( 'meta', $product ) && array_key_exists( $name, $product['meta'] ) ) {
139
  $variations[ $name ] = $product['meta'][ $name ];
140
- } else {
141
- continue;
142
  }
143
  }
144
  }
@@ -183,7 +181,7 @@ class TInvWL_Public_Cart {
183
  self::$_post = $_POST; // @codingStandardsIgnoreLine WordPress.VIP.SuperGlobalInputUsage.AccessDetected
184
  self::$_request = $_REQUEST;
185
  if ( array_key_exists( 'meta', $product ) && ! empty( $product['meta'] ) ) {
186
- $_POST = $product['meta']; // May be a conflict there will be no GET attributes.
187
  $_REQUEST = $product['meta'];
188
  } else {
189
  $_POST = array();
137
  // Could be any value that saved to a custom meta.
138
  if ( array_key_exists( 'meta', $product ) && array_key_exists( $name, $product['meta'] ) ) {
139
  $variations[ $name ] = $product['meta'][ $name ];
 
 
140
  }
141
  }
142
  }
181
  self::$_post = $_POST; // @codingStandardsIgnoreLine WordPress.VIP.SuperGlobalInputUsage.AccessDetected
182
  self::$_request = $_REQUEST;
183
  if ( array_key_exists( 'meta', $product ) && ! empty( $product['meta'] ) ) {
184
+ $_POST = $product['meta']; // Maybe a conflict there will be no GET attributes.
185
  $_REQUEST = $product['meta'];
186
  } else {
187
  $_POST = array();
public/wishlist/ajax.class.php CHANGED
@@ -439,9 +439,10 @@ class TInvWL_Public_Wishlist_Ajax {
439
  $response['status'] = true;
440
  break;
441
  }
442
- $response['icon'] = $response['status'] ? 'icon_big_heart_check' : 'icon_big_times';
443
- $response['msg'] = array_unique( $response['msg'] );
444
- $response['msg'] = implode( '<br>', $response['msg'] );
 
445
  if ( tinv_get_option( 'table', 'hide_popup' ) && array_key_exists( 'msg', $response ) ) {
446
  unset( $response['msg'] );
447
  }
439
  $response['status'] = true;
440
  break;
441
  }
442
+ $response['action'] = $action;
443
+ $response['icon'] = $response['status'] ? 'icon_big_heart_check' : 'icon_big_times';
444
+ $response['msg'] = array_unique( $response['msg'] );
445
+ $response['msg'] = implode( '<br>', $response['msg'] );
446
  if ( tinv_get_option( 'table', 'hide_popup' ) && array_key_exists( 'msg', $response ) ) {
447
  unset( $response['msg'] );
448
  }
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: templateinvaders
3
  Tags: woocommerce, wishlist, woocommerce wishlist, e-commerce, ecommerce
4
  Requires at least: 4.7
5
- Tested up to: 6.0
6
- Stable tag: 2.0.9
7
  License: GPLv3
8
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
9
  Plugin URI: https://wordpress.org/plugins/ti-woocommerce-wishlist/
@@ -163,6 +163,15 @@ Yes, you can! Join in on our [GitHub repository](https://github.com/TemplateInva
163
 
164
 
165
  == Changelog ==
 
 
 
 
 
 
 
 
 
166
  = 2.0.9 =
167
  *Release Date - 30 October 2022*
168
 
2
  Contributors: templateinvaders
3
  Tags: woocommerce, wishlist, woocommerce wishlist, e-commerce, ecommerce
4
  Requires at least: 4.7
5
+ Tested up to: 6.1
6
+ Stable tag: 2.0.10
7
  License: GPLv3
8
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
9
  Plugin URI: https://wordpress.org/plugins/ti-woocommerce-wishlist/
163
 
164
 
165
  == Changelog ==
166
+ = 2.0.10 =
167
+ *Release Date - 7 November 2022*
168
+
169
+ * WordPress 6.1 support
170
+ * Added integration with [WC Fields Factory](https://wordpress.org/plugins/wc-fields-factory/) plugin
171
+ * Added type of action for AJAX response
172
+ * Added redirect to the wishlist page in case of product is already on the wishlist and the event popup is disabled in the settings
173
+ * Fixed issue with marks product already in the wishlist
174
+
175
  = 2.0.9 =
176
  *Release Date - 30 October 2022*
177
 
ti-woocommerce-wishlist.php CHANGED
@@ -4,9 +4,9 @@
4
  * Plugin Name: TI WooCommerce Wishlist
5
  * Plugin URI: https://wordpress.org/plugins/ti-woocommerce-wishlist/
6
  * Description: Wishlist functionality for your WooCommerce store.
7
- * Version: 2.0.9
8
  * Requires at least: 4.7
9
- * Tested up to: 6.0
10
  * WC requires at least: 3.0
11
  * WC tested up to: 7.0
12
  * Author: TemplateInvaders
@@ -41,7 +41,7 @@ if ( ! defined( 'TINVWL_DOMAIN' ) ) {
41
  }
42
 
43
  if ( ! defined( 'TINVWL_FVERSION' ) ) {
44
- define( 'TINVWL_FVERSION', '2.0.9' );
45
  }
46
 
47
  if ( ! defined( 'TINVWL_LOAD_FREE' ) ) {
4
  * Plugin Name: TI WooCommerce Wishlist
5
  * Plugin URI: https://wordpress.org/plugins/ti-woocommerce-wishlist/
6
  * Description: Wishlist functionality for your WooCommerce store.
7
+ * Version: 2.0.10
8
  * Requires at least: 4.7
9
+ * Tested up to: 6.1
10
  * WC requires at least: 3.0
11
  * WC tested up to: 7.0
12
  * Author: TemplateInvaders
41
  }
42
 
43
  if ( ! defined( 'TINVWL_FVERSION' ) ) {
44
+ define( 'TINVWL_FVERSION', '2.0.10' );
45
  }
46
 
47
  if ( ! defined( 'TINVWL_LOAD_FREE' ) ) {