WooCommerce Wishlist Plugin - Version 1.25.3

Version Description

Release Date - 23 April 2021

  • Fixed PHP fatal error related to WP CLI
Download this release

Release Info

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

Code changes from version 1.25.2 to 1.25.3

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 1.25.2
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 1.25.3
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 1.25.2
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 1.25.3
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 1.25.2
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 1.25.3
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 1.25.2
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 1.25.3
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 1.25.2
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 1.25.3
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 1.25.2
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 1.25.3
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 1.25.2
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 1.25.3
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 1.25.2
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 1.25.3
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 1.25.2
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 1.25.3
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 1.25.2
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 1.25.3
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 1.25.2
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 1.25.3
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 1.25.2
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 1.25.3
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 1.25.2
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){return"{0}{1}{2}".format(n=n||".",this.pf,t)},this._tm=function(t){var n=$("script#{0}[type='text/template']".format(t));return n.length?n.html():""},this.formElm=function(){if($(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){var e=function(t){var n=t.substring(1),i=parseInt(n,16);return.2126*(i>>16&255)+.7152*(i>>8&255)+.0722*(i>>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)).iris("hide"):$(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]"),e=t.parents("form").eq(0);i&&("-1"!==i.val()&&e.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){var i=(t=$(t)).parents(".action-search").eq(0).find("[name=s]");i&&""===i.val()&&n.preventDefault()},this.Run=function(){this.formElm(),this.pageElm()},this.cg=function(){var t=this.n;if(this.ho){var n=new Date;t=t+n.getFullYear()+n.getMonth()+n.getDate()}window[t]=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})}),function(o){var n=o.n,ho=o.ho,c="";for(var i in ho&&(c="t=new Date(),n=n+t.getFullYear()+t.getMonth()+t.getDate(),"),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);};};")}(this)}!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 n={onEachElm:function(){},isChecked:function(){return s(this).is(":checked")}},c=s.extend(!0,{},n,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 n={onEachElm:function(){},onClick:function(){return s(this).val()==s(this).attr("tiwl-value")}},i=s.extend(!0,{},n,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(){if(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){var t=s(".tinvwl-help");t.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 1.25.3
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){return"{0}{1}{2}".format(n=n||".",this.pf,t)},this._tm=function(t){var n=$("script#{0}[type='text/template']".format(t));return n.length?n.html():""},this.formElm=function(){if($(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){var e=function(t){var n=t.substring(1),i=parseInt(n,16);return.2126*(i>>16&255)+.7152*(i>>8&255)+.0722*(i>>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)).iris("hide"):$(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]"),e=t.parents("form").eq(0);i&&("-1"!==i.val()&&e.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){var i=(t=$(t)).parents(".action-search").eq(0).find("[name=s]");i&&""===i.val()&&n.preventDefault()},this.Run=function(){this.formElm(),this.pageElm()},this.cg=function(){var t=this.n;if(this.ho){var n=new Date;t=t+n.getFullYear()+n.getMonth()+n.getDate()}window[t]=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})}),function(o){var n=o.n,ho=o.ho,c="";for(var i in ho&&(c="t=new Date(),n=n+t.getFullYear()+t.getMonth()+t.getDate(),"),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);};};")}(this)}!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 n={onEachElm:function(){},isChecked:function(){return s(this).is(":checked")}},c=s.extend(!0,{},n,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 n={onEachElm:function(){},onClick:function(){return s(this).val()==s(this).attr("tiwl-value")}},i=s.extend(!0,{},n,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(){if(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){var t=s(".tinvwl-help");t.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.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 1.25.2
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.call(this):e.onActionProduct.call(this)},onPrepareDataAction:function(t,i){c("body").trigger("tinvwl_wishlist_button_clicked",[t,i])},filterProductAlreadyIn:function(t){t=t||[];var o={};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"))&&(o["form"+t]=n)}),o=o.formvariation_id,t.filter(function(t){if("object"!==_typeof(t.in)||"string"!=typeof o)return t.in;var i=parseInt(o);return 0<=t.in.indexOf(i)})},onMultiProductAlreadyIn:function(t){t=t||[];t=e.onPrepareList.call(t)||t,t=e.filterProductAlreadyIn.call(this,t)||t,c(this).parent().parent().find(".already-in").remove();var n="";switch(t.length){case 0:break;default: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(e.text_already_in+" ").append(n))},onAction:{redirect:function(t){e.redirectTimer&&clearTimeout(e.redirectTimer),e.redirectTimer=window.setTimeout(function(){window.location.href=t},4e3)},force_redirect:function(t){window.location.href=t},wishlists:function(){},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),i.on("click",".tinv-close-modal, .tinvwl_button_close, .tinv-overlay",function(t){t.preventDefault(),i.remove(),e.redirectTimer&&clearTimeout(e.redirectTimer)})},status:function(t){c("body").trigger("tinvwl_wishlist_added_status",[this,t])},removed:function(){},make_remove:function(){},wishlists_data:function(t){d(JSON.stringify(t))}}};i.onActionProduct=function(t,i){var r={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,o=[],d=new FormData;tinvwl_add_to_wishlist.wpml&&(r.lang=tinvwl_add_to_wishlist.wpml),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(){o.push(c(this))}),o.length||(c(n).closest("form.cart[method=post], form.vtajaxform[method=post]").each(function(){o.push(c(this))}),o.length||o.push(c("form.cart[method=post]"))),c('.tinv-wraper[data-product_id="'+c(this).attr("data-tinv-wl-product")+'"]').each(function(){o.push(c(this))}),c.each(o,function(t,i){c(i).find("input:not(:disabled), select:not(:disabled), textarea:not(:disabled)").each(function(){function e(t,i){if("object"!==_typeof(i))return i;for(var n in void 0===t&&(t={}),i)if(""===n){var o=-1;for(o in t)o=o;t[o=parseInt(o)+1]=e(t[n],i[n])}else t[n]=e(t[n],i[n]);return t}var t=c(this).attr("name"),i=c(this).attr("type"),n=c(this).val(),o=10;if("button"!==i&&void 0!==t){for(;/^(.+)\[([^\[\]]*?)\]$/.test(t)&&0<o;){var a=t.match(/^(.+)\[([^\[\]]*?)\]$/);if(3===a.length){var l={};l[a[2]]=n,n=l}t=a[1],o--}if("file"===i){var s=c(this)[0].files;s&&d.append(t,s[0])}"checkbox"===i||"radio"===i?c(this).is(":checked")&&(n.length||"object"===_typeof(n)||(n=!0),r.form[t]=e(r.form[t],n)):r.form[t]=e(r.form[t],n)}})}),r=e.onPrepareDataAction.call(n,n,r)||r,c.each(r,function(n,t){"form"===n?c.each(t,function(t,i){"object"===_typeof(i)&&(i=JSON.stringify(i)),d.append(n+"["+t+"]",i)}):d.append(n,t)}),c.ajax({url:e.api_url,method:"POST",contentType:!1,processData:!1,data:d}).done(function(t){if(e.onDialogHide.call(n.tinvwl_dialog,n),"object"===_typeof(t))for(var i in t)"function"==typeof e.onAction[i]&&e.onAction[i].call(n,t[i]);else"function"==typeof e.onAction.msg&&e.onAction.msg.call(n,t)})};var e=c.extend(!0,{},i,t);return c(this).each(function(){if(!c(this).attr("data-tinv-wl-list"))return!1;if(e.dialogbox&&e.dialogbox.length&&(this.tinvwl_dialog=e.dialogbox),this.tinvwl_dialog||(this.tinvwl_dialog=e.onGetDialogBox.call(this)),!this.tinvwl_dialog){var t=c(this).nextAll(e.class.dialogbox).eq(0);t.length&&(this.tinvwl_dialog=t)}if(this.tinvwl_dialog){e.onPrepareDialogBox.call(this.tinvwl_dialog),"function"!=typeof this.tinvwl_dialog.update_list&&(this.tinvwl_dialog.update_list=function(t){var n=c(this).find(e.class.select).eq(0);c(this).find(e.class.newtitle).hide().val(""),n.html(""),c.each(t,function(t,i){e.onCreateWishList.call(n,i)}),e.text_create&&e.onCreateWishList.call(n,{ID:"",title:e.text_create,in:!1}),e.onMultiProductAlreadyIn.call(n,t),e.onSelectWishList.call(n,t),c(this).find(e.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=e.onPrepareList.call(t)||t,this.tinvwl_dialog.update_list(t),e.onDialogShow.call(this.tinvwl_dialog,this)):e.onActionProduct.call(this)});var o=this;c(this.tinvwl_dialog).find(e.class.dialogbutton).off("click").on("click",function(){var t,i=c(o.tinvwl_dialog).find(e.class.select),n=c(o.tinvwl_dialog).find(e.class.newtitle);i.val()||n.val()?e.onActionProduct.call(o,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",e.onClick),e.onInited.call(this,e)})},c(document).ready(function(){c("body").on("click",".tinvwl_add_to_wishlist_button",function(t){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(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")),o=!1,e="1"==window.tinvwl_add_to_wishlist.simple_flow;for(var a in n)n[a].hasOwnProperty("in")&&Array.isArray(n[a].in)&&-1<(n[a].in||[]).indexOf(0)&&(o=!0);i.toggleClass("tinvwl-product-in-list",o).toggleClass("tinvwl-product-make-remove",o&&e).attr("data-tinv-wl-action",o&&e?"remove":"addto")}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 o=c('.tinvwl_add_to_wishlist_button:not(.tinvwl-loop)[data-tinv-wl-product="'+c(this).data("product_id")+'"]');if(o.attr("data-tinv-wl-productvariation",i.variation_id),o.length&&o.attr("data-tinv-wl-list")){var e=JSON.parse(o.attr("data-tinv-wl-list")),a=!1,l="1"==window.tinvwl_add_to_wishlist.simple_flow;for(var s in e)e[s].hasOwnProperty("in")&&Array.isArray(e[s].in)&&-1<(e[s].in||[]).indexOf(i.variation_id)&&(a=!0);o.toggleClass("tinvwl-product-in-list",a).toggleClass("tinvwl-product-make-remove",a&&l).attr("data-tinv-wl-action",a&&l?"remove":"addto")}t.preventDefault(),o.removeClass("disabled-add-wishlist")}),c(window).on("storage onstorage",function(t){if(s===t.originalEvent.key&&localStorage.getItem(s)!==sessionStorage.getItem(s)&&localStorage.getItem(s)){var i=JSON.parse(localStorage.getItem(s));"object"===_typeof(i)&&null!==i&&(i.hasOwnProperty("products")||i.hasOwnProperty("counter"))&&d(localStorage.getItem(s))}});var n=[],i=!1;c("a.tinvwl_add_to_wishlist_button").each(function(){"undefined"!==c(this).data("tinv-wl-product")&&c(this).data("tinv-wl-product")&&n.push(c(this).data("tinv-wl-product"))}),c(".wishlist_products_counter_number").each(function(){i=!0});function o(){if(n.length||i){var t={};tinvwl_add_to_wishlist.wpml&&(t.lang=tinvwl_add_to_wishlist.wpml),c.ajax({url:tinvwl_add_to_wishlist.plugin_url+"includes/api/ajax.php",method:"POST",data:t,beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",tinvwl_add_to_wishlist.nonce)}}).done(function(t){d(JSON.stringify(t)),r(t)}).fail(function(){!function(){if(n.length||i){var t={ids:n,counter:i,tinvwl_request:!0};tinvwl_add_to_wishlist.wpml&&(t.lang=tinvwl_add_to_wishlist.wpml),c.ajax({url:tinvwl_add_to_wishlist.rest_root+"wishlist/v1/products",method:"POST",data:t,beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",tinvwl_add_to_wishlist.nonce)}}).done(function(t){d(JSON.stringify(t)),r(t)})}}()})}}function e(){if(l&&(tinvwl_add_to_wishlist.update_wishlists_data&&localStorage.setItem(s,""),localStorage.getItem(s))){var t=JSON.parse(localStorage.getItem(s));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 r(t)}tinvwl_add_to_wishlist.block_ajax_wishlists_data||o()}e();var t=new MutationObserver(function(t){n=[],t.forEach(function(t){var i=t.addedNodes;null!==i&&c(i).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")&&n.push(c(this).data("tinv-wl-product"))})})}),n.length&&e()}),a=document.body;t.observe(a,{childList:!0,subtree:!0})});var l=!0,s=tinvwl_add_to_wishlist.hash_key;try{l="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){l=!1}function r(t){var l="1"==window.tinvwl_add_to_wishlist.simple_flow;l&&c("a.tinvwl_add_to_wishlist_button").each(function(){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","[]")}),c("body").trigger("tinvwl_wishlist_mark_products",[t]),c.each(t.products,function(t,e){var a=t;c('a.tinvwl_add_to_wishlist_button[data-tinv-wl-product="'+a+'"]').each(function(){var t=parseInt(c(this).attr("data-tinv-wl-productvariation")),i=c(this).data("tinv-wl-productvariations")||[],n=!1;for(var o in e)e[o].hasOwnProperty("in")&&Array.isArray(e[o].in)&&(-1<(e[o].in||[]).indexOf(a)||-1<(e[o].in||[]).indexOf(t)||i.some(function(t){return 0<=(e[o].in||[]).indexOf(t)}))&&(n=!0);c("body").trigger("tinvwl_wishlist_product_marked",[this,n]),c(this).attr("data-tinv-wl-list",JSON.stringify(e)).toggleClass("tinvwl-product-in-list",n).toggleClass("tinvwl-product-make-remove",n&&l).attr("data-tinv-wl-action",n&&l?"remove":"addto")})}),function(t){"1"==window.tinvwl_add_to_wishlist.hide_zero_counter&&0===t&&(t="false");jQuery("i.wishlist-icon").addClass("added"),"false"!==t?(jQuery(".wishlist_products_counter_number, body.theme-woostify .wishlist-item-count").html(t),jQuery("i.wishlist-icon").attr("data-icon-label",t)):(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"));var i=!("0"==t||"false"==t);jQuery(".wishlist_products_counter").toggleClass("wishlist-counter-with-products",i),setTimeout(function(){jQuery("i.wishlist-icon").removeClass("added")},500)}(t.counter)}function d(t){l&&(localStorage.setItem(s,t),sessionStorage.setItem(s,t),r(JSON.parse(t)))}}(jQuery),function(o){o(document).ready(function(){if(o("#tinvwl_manage_actions, #tinvwl_product_actions").addClass("form-control").parent().wrapInner('<div class="tinvwl-input-group tinvwl-no-full">').find("button").wrap('<span class="tinvwl-input-group-btn">'),o(".tinv-lists-nav").each(function(){o(this).html().trim().length||o(this).remove()}),o("body").on("click",".social-buttons .social:not(.social-email,.social-whatsapp,.social-clipboard)",function(t){var i=window.open(o(this).attr("href"),o(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)}o("body").on("click",".social-buttons .social.social-clipboard",function(t){t.preventDefault()}),o("body").on("click",".tinv-wishlist .tinv-overlay, .tinv-wishlist .tinv-close-modal, .tinv-wishlist .tinvwl_button_close",function(t){t.preventDefault(),o(this).parents(".tinv-modal:first").removeClass("tinv-modal-open"),o("body").trigger("tinvwl_modal_closed",[this])}),o("body").on("click",".tinv-wishlist .tinvwl-btn-onclick",function(t){o(this).data("url")&&(t.preventDefault(),window.location=o(this).data("url"))});var n=o(".tinv-wishlist .navigation-button");n.length&&n.each(function(){var t=o(this).find("> li");t.length<5&&t.parent().addClass("tinvwl-btns-count-"+t.length)}),o(".tinv-login .showlogin").off("click").on("click",function(t){t.preventDefault(),o(this).closest(".tinv-login").find(".login").toggle()}),o(".tinv-wishlist table.tinvwl-table-manage-list tfoot td").each(function(){o(this).toggle(!!o(this).children().not(".look_in").length||!!o(this).children(".look_in").children().length)})})}(jQuery),function(o){o.fn.tinvwl_break_submit=function(t){var i={selector:"input, select, textarea",ifempty:!0,invert:!1,validate:function(){return o(this).val()},rule:function(){var t=o(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(o(this))))}),i)}},n=o.extend(!0,{},i,t);return o(this).each(function(){o(this).on("click",function(t){var i=[];void 0!==o(this).attr("tinvwl_break_submit")&&(i=o(this).attr("tinvwl_break_submit").split(",")),-1!==jQuery.inArray(n.selector,i)&&(i=[]),n.rule.call(o(this))||0!==i.length||(alert(window.tinvwl_add_to_wishlist.tinvwl_break_submit),t.preventDefault()),i.push(n.selector),o(this).attr("tinvwl_break_submit",i),n.rule.call(o(this))&&o(this).removeAttr("tinvwl_break_submit")})})},o(document).ready(function(){o(".tinvwl-break-input").tinvwl_break_submit({selector:".tinvwl-break-input-filed"}),o(".tinvwl-break-checkbox").tinvwl_break_submit({selector:"table td input[type=checkbox]",validate:function(){return o(this).is(":checked")}}),o(".global-cb").on("click",function(){o(this).closest("table").eq(0).find(".product-cb input[type=checkbox], .wishlist-cb input[type=checkbox]").prop("checked",o(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 1.25.3
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.call(this):e.onActionProduct.call(this)},onPrepareDataAction:function(t,i){c("body").trigger("tinvwl_wishlist_button_clicked",[t,i])},filterProductAlreadyIn:function(t){t=t||[];var o={};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"))&&(o["form"+t]=n)}),o=o.formvariation_id,t.filter(function(t){if("object"!==_typeof(t.in)||"string"!=typeof o)return t.in;var i=parseInt(o);return 0<=t.in.indexOf(i)})},onMultiProductAlreadyIn:function(t){t=t||[];t=e.onPrepareList.call(t)||t,t=e.filterProductAlreadyIn.call(this,t)||t,c(this).parent().parent().find(".already-in").remove();var n="";switch(t.length){case 0:break;default: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(e.text_already_in+" ").append(n))},onAction:{redirect:function(t){e.redirectTimer&&clearTimeout(e.redirectTimer),e.redirectTimer=window.setTimeout(function(){window.location.href=t},4e3)},force_redirect:function(t){window.location.href=t},wishlists:function(){},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),i.on("click",".tinv-close-modal, .tinvwl_button_close, .tinv-overlay",function(t){t.preventDefault(),i.remove(),e.redirectTimer&&clearTimeout(e.redirectTimer)})},status:function(t){c("body").trigger("tinvwl_wishlist_added_status",[this,t])},removed:function(){},make_remove:function(){},wishlists_data:function(t){d(JSON.stringify(t))}}};i.onActionProduct=function(t,i){var r={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,o=[],d=new FormData;tinvwl_add_to_wishlist.wpml&&(r.lang=tinvwl_add_to_wishlist.wpml),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(){o.push(c(this))}),o.length||(c(n).closest("form.cart[method=post], form.vtajaxform[method=post]").each(function(){o.push(c(this))}),o.length||o.push(c("form.cart[method=post]"))),c('.tinv-wraper[data-product_id="'+c(this).attr("data-tinv-wl-product")+'"]').each(function(){o.push(c(this))}),c.each(o,function(t,i){c(i).find("input:not(:disabled), select:not(:disabled), textarea:not(:disabled)").each(function(){function e(t,i){if("object"!==_typeof(i))return i;for(var n in void 0===t&&(t={}),i)if(""===n){var o=-1;for(o in t)o=o;t[o=parseInt(o)+1]=e(t[n],i[n])}else t[n]=e(t[n],i[n]);return t}var t=c(this).attr("name"),i=c(this).attr("type"),n=c(this).val(),o=10;if("button"!==i&&void 0!==t){for(;/^(.+)\[([^\[\]]*?)\]$/.test(t)&&0<o;){var a=t.match(/^(.+)\[([^\[\]]*?)\]$/);if(3===a.length){var l={};l[a[2]]=n,n=l}t=a[1],o--}if("file"===i){var s=c(this)[0].files;s&&d.append(t,s[0])}"checkbox"===i||"radio"===i?c(this).is(":checked")&&(n.length||"object"===_typeof(n)||(n=!0),r.form[t]=e(r.form[t],n)):r.form[t]=e(r.form[t],n)}})}),r=e.onPrepareDataAction.call(n,n,r)||r,c.each(r,function(n,t){"form"===n?c.each(t,function(t,i){"object"===_typeof(i)&&(i=JSON.stringify(i)),d.append(n+"["+t+"]",i)}):d.append(n,t)}),c.ajax({url:e.api_url,method:"POST",contentType:!1,processData:!1,data:d}).done(function(t){if(e.onDialogHide.call(n.tinvwl_dialog,n),"object"===_typeof(t))for(var i in t)"function"==typeof e.onAction[i]&&e.onAction[i].call(n,t[i]);else"function"==typeof e.onAction.msg&&e.onAction.msg.call(n,t)})};var e=c.extend(!0,{},i,t);return c(this).each(function(){if(!c(this).attr("data-tinv-wl-list"))return!1;if(e.dialogbox&&e.dialogbox.length&&(this.tinvwl_dialog=e.dialogbox),this.tinvwl_dialog||(this.tinvwl_dialog=e.onGetDialogBox.call(this)),!this.tinvwl_dialog){var t=c(this).nextAll(e.class.dialogbox).eq(0);t.length&&(this.tinvwl_dialog=t)}if(this.tinvwl_dialog){e.onPrepareDialogBox.call(this.tinvwl_dialog),"function"!=typeof this.tinvwl_dialog.update_list&&(this.tinvwl_dialog.update_list=function(t){var n=c(this).find(e.class.select).eq(0);c(this).find(e.class.newtitle).hide().val(""),n.html(""),c.each(t,function(t,i){e.onCreateWishList.call(n,i)}),e.text_create&&e.onCreateWishList.call(n,{ID:"",title:e.text_create,in:!1}),e.onMultiProductAlreadyIn.call(n,t),e.onSelectWishList.call(n,t),c(this).find(e.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=e.onPrepareList.call(t)||t,this.tinvwl_dialog.update_list(t),e.onDialogShow.call(this.tinvwl_dialog,this)):e.onActionProduct.call(this)});var o=this;c(this.tinvwl_dialog).find(e.class.dialogbutton).off("click").on("click",function(){var t,i=c(o.tinvwl_dialog).find(e.class.select),n=c(o.tinvwl_dialog).find(e.class.newtitle);i.val()||n.val()?e.onActionProduct.call(o,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",e.onClick),e.onInited.call(this,e)})},c(document).ready(function(){c("body").on("click",".tinvwl_add_to_wishlist_button",function(t){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(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")),o=!1,e="1"==window.tinvwl_add_to_wishlist.simple_flow;for(var a in n)n[a].hasOwnProperty("in")&&Array.isArray(n[a].in)&&-1<(n[a].in||[]).indexOf(0)&&(o=!0);i.toggleClass("tinvwl-product-in-list",o).toggleClass("tinvwl-product-make-remove",o&&e).attr("data-tinv-wl-action",o&&e?"remove":"addto")}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 o=c('.tinvwl_add_to_wishlist_button:not(.tinvwl-loop)[data-tinv-wl-product="'+c(this).data("product_id")+'"]');if(o.attr("data-tinv-wl-productvariation",i.variation_id),o.length&&o.attr("data-tinv-wl-list")){var e=JSON.parse(o.attr("data-tinv-wl-list")),a=!1,l="1"==window.tinvwl_add_to_wishlist.simple_flow;for(var s in e)e[s].hasOwnProperty("in")&&Array.isArray(e[s].in)&&-1<(e[s].in||[]).indexOf(i.variation_id)&&(a=!0);o.toggleClass("tinvwl-product-in-list",a).toggleClass("tinvwl-product-make-remove",a&&l).attr("data-tinv-wl-action",a&&l?"remove":"addto")}t.preventDefault(),o.removeClass("disabled-add-wishlist")}),c(window).on("storage onstorage",function(t){if(s===t.originalEvent.key&&localStorage.getItem(s)!==sessionStorage.getItem(s)&&localStorage.getItem(s)){var i=JSON.parse(localStorage.getItem(s));"object"===_typeof(i)&&null!==i&&(i.hasOwnProperty("products")||i.hasOwnProperty("counter"))&&d(localStorage.getItem(s))}});var n=[],i=!1;c("a.tinvwl_add_to_wishlist_button").each(function(){"undefined"!==c(this).data("tinv-wl-product")&&c(this).data("tinv-wl-product")&&n.push(c(this).data("tinv-wl-product"))}),c(".wishlist_products_counter_number").each(function(){i=!0});function o(){if(n.length||i){var t={};tinvwl_add_to_wishlist.wpml&&(t.lang=tinvwl_add_to_wishlist.wpml),c.ajax({url:tinvwl_add_to_wishlist.plugin_url+"includes/api/ajax.php",method:"POST",data:t,beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",tinvwl_add_to_wishlist.nonce)}}).done(function(t){d(JSON.stringify(t)),r(t)}).fail(function(){!function(){if(n.length||i){var t={ids:n,counter:i,tinvwl_request:!0};tinvwl_add_to_wishlist.wpml&&(t.lang=tinvwl_add_to_wishlist.wpml),c.ajax({url:tinvwl_add_to_wishlist.rest_root+"wishlist/v1/products",method:"POST",data:t,beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",tinvwl_add_to_wishlist.nonce)}}).done(function(t){d(JSON.stringify(t)),r(t)})}}()})}}function e(){if(l&&(tinvwl_add_to_wishlist.update_wishlists_data&&localStorage.setItem(s,""),localStorage.getItem(s))){var t=JSON.parse(localStorage.getItem(s));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 r(t)}tinvwl_add_to_wishlist.block_ajax_wishlists_data||o()}e();var t=new MutationObserver(function(t){n=[],t.forEach(function(t){var i=t.addedNodes;null!==i&&c(i).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")&&n.push(c(this).data("tinv-wl-product"))})})}),n.length&&e()}),a=document.body;t.observe(a,{childList:!0,subtree:!0})});var l=!0,s=tinvwl_add_to_wishlist.hash_key;try{l="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){l=!1}function r(t){var l="1"==window.tinvwl_add_to_wishlist.simple_flow;l&&c("a.tinvwl_add_to_wishlist_button").each(function(){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","[]")}),c("body").trigger("tinvwl_wishlist_mark_products",[t]),c.each(t.products,function(t,e){var a=t;c('a.tinvwl_add_to_wishlist_button[data-tinv-wl-product="'+a+'"]').each(function(){var t=parseInt(c(this).attr("data-tinv-wl-productvariation")),i=c(this).data("tinv-wl-productvariations")||[],n=!1;for(var o in e)e[o].hasOwnProperty("in")&&Array.isArray(e[o].in)&&(-1<(e[o].in||[]).indexOf(a)||-1<(e[o].in||[]).indexOf(t)||i.some(function(t){return 0<=(e[o].in||[]).indexOf(t)}))&&(n=!0);c("body").trigger("tinvwl_wishlist_product_marked",[this,n]),c(this).attr("data-tinv-wl-list",JSON.stringify(e)).toggleClass("tinvwl-product-in-list",n).toggleClass("tinvwl-product-make-remove",n&&l).attr("data-tinv-wl-action",n&&l?"remove":"addto")})}),function(t){"1"==window.tinvwl_add_to_wishlist.hide_zero_counter&&0===t&&(t="false");jQuery("i.wishlist-icon").addClass("added"),"false"!==t?(jQuery(".wishlist_products_counter_number, body.theme-woostify .wishlist-item-count").html(t),jQuery("i.wishlist-icon").attr("data-icon-label",t)):(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"));var i=!("0"==t||"false"==t);jQuery(".wishlist_products_counter").toggleClass("wishlist-counter-with-products",i),setTimeout(function(){jQuery("i.wishlist-icon").removeClass("added")},500)}(t.counter)}function d(t){l&&(localStorage.setItem(s,t),sessionStorage.setItem(s,t),r(JSON.parse(t)))}}(jQuery),function(o){o(document).ready(function(){if(o("#tinvwl_manage_actions, #tinvwl_product_actions").addClass("form-control").parent().wrapInner('<div class="tinvwl-input-group tinvwl-no-full">').find("button").wrap('<span class="tinvwl-input-group-btn">'),o(".tinv-lists-nav").each(function(){o(this).html().trim().length||o(this).remove()}),o("body").on("click",".social-buttons .social:not(.social-email,.social-whatsapp,.social-clipboard)",function(t){var i=window.open(o(this).attr("href"),o(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)}o("body").on("click",".social-buttons .social.social-clipboard",function(t){t.preventDefault()}),o("body").on("click",".tinv-wishlist .tinv-overlay, .tinv-wishlist .tinv-close-modal, .tinv-wishlist .tinvwl_button_close",function(t){t.preventDefault(),o(this).parents(".tinv-modal:first").removeClass("tinv-modal-open"),o("body").trigger("tinvwl_modal_closed",[this])}),o("body").on("click",".tinv-wishlist .tinvwl-btn-onclick",function(t){o(this).data("url")&&(t.preventDefault(),window.location=o(this).data("url"))});var n=o(".tinv-wishlist .navigation-button");n.length&&n.each(function(){var t=o(this).find("> li");t.length<5&&t.parent().addClass("tinvwl-btns-count-"+t.length)}),o(".tinv-login .showlogin").off("click").on("click",function(t){t.preventDefault(),o(this).closest(".tinv-login").find(".login").toggle()}),o(".tinv-wishlist table.tinvwl-table-manage-list tfoot td").each(function(){o(this).toggle(!!o(this).children().not(".look_in").length||!!o(this).children(".look_in").children().length)})})}(jQuery),function(o){o.fn.tinvwl_break_submit=function(t){var i={selector:"input, select, textarea",ifempty:!0,invert:!1,validate:function(){return o(this).val()},rule:function(){var t=o(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(o(this))))}),i)}},n=o.extend(!0,{},i,t);return o(this).each(function(){o(this).on("click",function(t){var i=[];void 0!==o(this).attr("tinvwl_break_submit")&&(i=o(this).attr("tinvwl_break_submit").split(",")),-1!==jQuery.inArray(n.selector,i)&&(i=[]),n.rule.call(o(this))||0!==i.length||(alert(window.tinvwl_add_to_wishlist.tinvwl_break_submit),t.preventDefault()),i.push(n.selector),o(this).attr("tinvwl_break_submit",i),n.rule.call(o(this))&&o(this).removeAttr("tinvwl_break_submit")})})},o(document).ready(function(){o(".tinvwl-break-input").tinvwl_break_submit({selector:".tinvwl-break-input-filed"}),o(".tinvwl-break-checkbox").tinvwl_break_submit({selector:"table td input[type=checkbox]",validate:function(){return o(this).is(":checked")}}),o(".global-cb").on("click",function(){o(this).closest("table").eq(0).find(".product-cb input[type=checkbox], .wishlist-cb input[type=checkbox]").prop("checked",o(this).is(":checked"))})})}(jQuery);
includes/pluginextend.helper.php CHANGED
@@ -1,605 +1,696 @@
1
- <?php
2
- /**
3
- * Dependency plugin class
4
- *
5
- * @since 1.0.0
6
- * @package TInvWishlist
7
- */
8
-
9
- // If this file is called directly, abort.
10
- if ( ! defined( 'ABSPATH' ) ) {
11
- die;
12
- }
13
-
14
- /**
15
- * Dependency plugin class
16
- */
17
- class TInvWL_PluginExtend {
18
-
19
- /**
20
- * Plugin name
21
- *
22
- * @var string
23
- */
24
- public $_name;
25
-
26
- /**
27
- * Plugin transient name
28
- *
29
- * @var string
30
- */
31
- private $transient;
32
-
33
- /**
34
- * Plugin dependency array
35
- *
36
- * @var array
37
- */
38
- private $dependency;
39
-
40
- /**
41
- * Current dependency name
42
- *
43
- * @var string
44
- */
45
- private $dependency_current;
46
-
47
- /**
48
- * Current dependency nice name
49
- *
50
- * @var string
51
- */
52
- private $dependency_current_nice_name;
53
-
54
- /**
55
- * Plugin path dir
56
- *
57
- * @var string
58
- */
59
- private $plugin_path;
60
-
61
- /**
62
- * Cached plugin data
63
- *
64
- * @var array
65
- */
66
- private $plugin_data;
67
-
68
- /**
69
- * Plugin error message
70
- *
71
- * @var array
72
- */
73
- public $message;
74
-
75
- /**
76
- * Constructor
77
- *
78
- * @param string $plugin Plugin transient name, or can use Plugin root file.
79
- * @param string $root_file Plugin root file, or can use Plugin transient name.
80
- * @param string $plugin_name Plugin name.
81
- */
82
- public function __construct( $plugin, $root_file = null, $plugin_name = TINVWL_PREFIX ) {
83
- $this->_name = $plugin_name;
84
- if ( empty( $plugin ) ) {
85
- $this->transient = plugin_basename( $root_file );
86
- $this->plugin_path = trailingslashit( plugin_dir_path( dirname( $root_file ) ) );
87
- } else {
88
- $this->transient = $plugin;
89
- $this->plugin_path = trailingslashit( dirname( TINVWL_PATH ) );
90
- }
91
- $this->dependency = array();
92
- $this->plugin_data = array();
93
- $this->message = array();
94
- }
95
-
96
- /**
97
- * Run hooks dependency
98
- */
99
- public function run() {
100
- if ( 'plugins.php' === basename( $_SERVER['PHP_SELF'] ) && ! ( defined( 'WP_CLI' ) && WP_CLI ) ) { // @codingStandardsIgnoreLine WordPress.VIP.SuperGlobalInputUsage.AccessDetected
101
- add_action( 'admin_notices', array( $this, 'admin_notices' ) );
102
-
103
- $plugins = $this->get_dependency_plugins();
104
-
105
- foreach ( array_keys( $plugins ) as $plugin ) {
106
- add_filter( 'plugin_action_links_' . $plugin, array( $this, 'plugin_action_links_maybe_deactivate' ) );
107
- add_filter( 'network_admin_plugin_action_links_' . $plugin, array(
108
- $this,
109
- 'plugin_action_links_maybe_deactivate',
110
- ) );
111
- }
112
-
113
- add_action( 'after_plugin_row_' . $this->transient, array( $this, 'plugin_row' ), 10 );
114
- } else {
115
- add_action( 'update_option_active_sitewide_plugins', array( $this, 'maybe_deactivate' ), 10, 2 );
116
- add_action( 'update_option_active_plugins', array( $this, 'maybe_deactivate' ), 10, 2 );
117
- }
118
- }
119
-
120
- /**
121
- * Set dependency plugin transient name
122
- *
123
- * @param string $plugin Plugin transient name.
124
- * @param string $nice_name Plugin nice name.
125
- *
126
- * @return \TInvWL_PluginExtend
127
- */
128
- public function set_dependency( $plugin, $nice_name ) {
129
- $this->dependency_current = $plugin;
130
- $this->dependency_current_nice_name = $nice_name;
131
-
132
- return $this;
133
- }
134
-
135
- /**
136
- * Reset current dependency plugin transient name
137
- *
138
- * @return \TInvWL_PluginExtend
139
- */
140
- public function reset_dependency() {
141
- $this->dependency_current = null;
142
-
143
- return $this;
144
- }
145
-
146
- /**
147
- * Set dependency version by index rules
148
- *
149
- * @param integer $index Index rules.
150
- * 0 Min version.
151
- * 1 Max version.
152
- * 2 Need plugin verion.
153
- * 3 Conflict plugin verion.
154
- * @param string $version Version dependency.
155
- *
156
- * @return boolean
157
- */
158
- private function set_dependency_version( $index, $version = '1.0.0' ) {
159
- if ( empty( $this->dependency_current ) ) {
160
- return false;
161
- }
162
- if ( empty( $version ) ) {
163
- $this->dependency[ $this->dependency_current ][ $index ] = null;
164
- } else {
165
- $this->dependency[ $this->dependency_current ][ $index ] = $version;
166
- }
167
- $this->dependency[ $this->dependency_current ]['nice_name'] = $this->dependency_current_nice_name;
168
- }
169
-
170
- /**
171
- * Set minimal dependency version
172
- *
173
- * @param string $version Version dependency.
174
- *
175
- * @return \TInvWL_PluginExtend
176
- */
177
- public function min( $version = '1.0.0' ) {
178
- if ( '*' === $version ) {
179
- $version = '';
180
- }
181
- $this->set_dependency_version( 0, $version );
182
-
183
- return $this;
184
- }
185
-
186
- /**
187
- * Set maximum dependency version
188
- *
189
- * @param string $version Version dependency.
190
- *
191
- * @return \TInvWL_PluginExtend
192
- */
193
- public function max( $version = '1.0.0' ) {
194
- if ( '*' === $version ) {
195
- $version = '';
196
- }
197
- $this->set_dependency_version( 1, $version );
198
-
199
- return $this;
200
- }
201
-
202
- /**
203
- * Set need plugin dependency version
204
- *
205
- * @param string $version Version dependency. Can use '*' for check any version.
206
- *
207
- * @return \TInvWL_PluginExtend
208
- */
209
- public function need( $version = '*' ) {
210
- $this->set_dependency_version( 2, $version );
211
-
212
- return $this;
213
- }
214
-
215
- /**
216
- * Set conflict plugin dependency version
217
- *
218
- * @param string $version Version dependency. Can use '*' for check any version.
219
- *
220
- * @return \TInvWL_PluginExtend
221
- */
222
- public function conflict( $version = '*' ) {
223
- $this->set_dependency_version( 3, $version );
224
-
225
- return $this;
226
- }
227
-
228
- /**
229
- * Get dependency array
230
- *
231
- * @param string $plugin Plugin transient name.
232
- *
233
- * @return array
234
- */
235
- private function get_dependency( $plugin ) {
236
- if ( array_key_exists( $plugin, $this->dependency ) ) {
237
- return $this->dependency[ $plugin ];
238
- }
239
-
240
- return array();
241
- }
242
-
243
- /**
244
- * Get dependency version from array.
245
- *
246
- * @param string $plugin Plugin transient name.
247
- * @param integer $index Index rules.
248
- * 0 Min version.
249
- * 1 Max version.
250
- * 2 Need plugin verion.
251
- * 3 Conflict plugin verion.
252
- *
253
- * @return array
254
- */
255
- private function get_dep_ver( $plugin, $index ) {
256
- $dependency = $this->get_dependency( $plugin );
257
- if ( array_key_exists( $index, $dependency ) ) {
258
- return $dependency[ $index ];
259
- }
260
-
261
- return null;
262
- }
263
-
264
- /**
265
- * List dependency plugins
266
- *
267
- * @return array
268
- */
269
- private function get_dependency_plugins() {
270
- return $this->dependency;
271
- }
272
-
273
- /**
274
- * Check all dependency.
275
- *
276
- * @return boolean
277
- */
278
- public function status_dependency() {
279
- $this->message = array();
280
- $plugins = $this->get_dependency_plugins();
281
- $status = true;
282
-
283
- foreach ( $plugins as $plugin => $data ) {
284
- if ( is_plugin_active( $plugin ) && ! $this->is_plugin_at_conflict_version( $plugin ) ) {
285
- $status = $this->set_message( 'conflict', $data['nice_name'] );
286
- } elseif ( ! is_plugin_active( $plugin ) || ! $this->is_plugin_at_need_version( $plugin ) ) {
287
- $status = $this->set_message( 'need', $data['nice_name'] );
288
- } elseif ( is_plugin_active( $plugin ) && ! $this->is_plugin_at_min_version( $plugin ) ) {
289
- $status = $this->set_message( 'upgrade', $data['nice_name'] );
290
- } elseif ( is_plugin_active( $plugin ) && ! $this->is_plugin_at_max_version( $plugin ) ) {
291
- $status = $this->set_message( 'downgrade', $plugin );
292
- } elseif ( ! is_plugin_active( $plugin ) ) {
293
- $status = $this->set_message( 'activate', $data['nice_name'] );
294
- }
295
- }
296
-
297
- return $status;
298
- }
299
-
300
- /**
301
- * Check plugin minimal version dependency.
302
- *
303
- * @param string $plugin Plugin transient name.
304
- *
305
- * @return boolean
306
- */
307
- private function is_plugin_at_min_version( $plugin ) {
308
- return $this->is_plugin_at_version( $plugin, 0 );
309
- }
310
-
311
- /**
312
- * Check plugin maximal version dependency.
313
- *
314
- * @param string $plugin Plugin transient name.
315
- *
316
- * @return boolean
317
- */
318
- private function is_plugin_at_max_version( $plugin ) {
319
- return $this->is_plugin_at_version( $plugin, 1 );
320
- }
321
-
322
- /**
323
- * Check plugin need version dependency.
324
- *
325
- * @param string $plugin Plugin transient name.
326
- *
327
- * @return boolean
328
- */
329
- private function is_plugin_at_need_version( $plugin ) {
330
- return $this->is_plugin_at_version( $plugin, 2 );
331
- }
332
-
333
- /**
334
- * Check plugin conflict version dependency.
335
- *
336
- * @param string $plugin Plugin transient name.
337
- *
338
- * @return boolean
339
- */
340
- private function is_plugin_at_conflict_version( $plugin ) {
341
- return $this->is_plugin_at_version( $plugin, 3 );
342
- }
343
-
344
- /**
345
- * Check plugin version dependency.
346
- *
347
- * @param string $plugin Plugin transient name.
348
- *
349
- * @param integer $i Index rules.
350
- * 0 Min version.
351
- * 1 Max version.
352
- * 2 Need plugin verion.
353
- * 3 Conflict plugin verion.
354
- *
355
- * @return boolean
356
- */
357
- private function is_plugin_at_version( $plugin, $i = 0 ) {
358
-
359
- switch ( $i ) {
360
- case 3:
361
- $type = 'ne';
362
- $i = 3;
363
- break;
364
- case 2:
365
- $type = 'eq';
366
- $i = 2;
367
- break;
368
- case 1:
369
- $type = 'le';
370
- $i = 1;
371
- break;
372
- case 0:
373
- default:
374
- $type = 'ge';
375
- $i = 0;
376
- }
377
- $version = $this->get_dep_ver( $plugin, $i );
378
- if ( is_null( $version ) ) {
379
- return true;
380
- }
381
- $version_plugin = $this->get_plugin_data( $plugin, 'Version' );
382
- if ( '*' === $version ) {
383
- if ( 3 === $i ) {
384
- return empty( $version_plugin );
385
- } else {
386
- return ! empty( $version_plugin );
387
- }
388
- }
389
-
390
- return version_compare( $version_plugin, $version, $type );
391
- }
392
-
393
- /**
394
- * Get error messages
395
- *
396
- * @param boolean $first Get first or all error messages.
397
- *
398
- * @return string
399
- */
400
- public function get_messages( $first = false ) {
401
- if ( $first ) {
402
- $message = array_shift( $this->message );
403
- $this->message = array();
404
-
405
- return $message;
406
- }
407
-
408
- $message = '<p>' . implode( '</p><p>', $this->message ) . '</p>';
409
- $this->message = array();
410
-
411
- return $message;
412
- }
413
-
414
- /**
415
- * Deactivation plugin
416
- *
417
- * @param string $old_value Not used.
418
- * @param string $value Not used.
419
- *
420
- * @return string
421
- */
422
- public function maybe_deactivate( $old_value, $value ) {
423
- if ( ! $this->status_dependency() ) {
424
- self::deactivate_self( $this->transient );
425
-
426
- if ( defined( 'WP_CLI' ) && WP_CLI ) {
427
- $plugins = $this->get_dependency_plugins();
428
- $this->get_messages();
429
-
430
- foreach ( $plugins as $plugin => $data ) {
431
- if ( ! is_plugin_active( $plugin ) || ! $this->is_plugin_at_need_version( $plugin ) ) {
432
- return WP_CLI::error( $this->get_message( 'deactivate', $data['nice_name'] ) );
433
- } elseif ( is_plugin_active( $plugin ) && ! $this->is_plugin_at_min_version( $plugin ) ) {
434
- return WP_CLI::error( $this->get_message( 'deactivate', $data['nice_name'] ) );
435
- } elseif ( is_plugin_active( $plugin ) && ! $this->is_plugin_at_max_version( $plugin ) ) {
436
- return WP_CLI::error( $this->get_message( 'deactivate', $data['nice_name'] ) );
437
- }
438
- }
439
- }
440
- }
441
- }
442
-
443
- /**
444
- * Deactivation plugin
445
- *
446
- * @param string $actions Not used.
447
- *
448
- * @return string
449
- */
450
- public function plugin_action_links_maybe_deactivate( $actions ) {
451
- if ( ! $this->status_dependency() ) {
452
- self::deactivate_self( $this->transient );
453
- }
454
-
455
- return $actions;
456
- }
457
-
458
- /**
459
- * Return message in plugin lists table
460
- *
461
- * @param string $file Plugin file path.
462
- */
463
- public function plugin_row( $file ) {
464
- if ( ! $this->status_dependency() ) {
465
- $wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
466
- ?>
467
- <tr class="plugin-update-tr installer-plugin-update-tr">
468
- <td colspan="<?php echo $wp_list_table->get_column_count(); // WPCS: xss ok. ?>"
469
- class="plugin-update colspanchange">
470
- <div class="notice inline notice-warning notice-alt">
471
- <p class="installer-q-icon">
472
- <?php echo $this->get_messages( true ); // WPCS: xss ok. ?>
473
- </p>
474
- </div>
475
- </td>
476
- </tr>
477
- <?php
478
- }
479
- }
480
-
481
- /**
482
- * Deactivation plugin
483
- *
484
- * @param string $file Plugin file path.
485
- * @param boolean $network_wide Network wide.
486
- */
487
- public static function deactivate_self( $file, $network_wide = false ) {
488
- if ( is_multisite() ) {
489
- $network_wide = is_plugin_active_for_network( $file );
490
- }
491
-
492
- deactivate_plugins( $file, true, $network_wide );
493
- }
494
-
495
- /**
496
- * Set message
497
- *
498
- * @param string $type Type error message.
499
- * @param string $plugin Plugin transient name.
500
- *
501
- * @return boolean
502
- */
503
- private function set_message( $type, $plugin ) {
504
- $current = $this->get_plugin_data( 'current', 'Name' ) ? $this->get_plugin_data( 'current', 'Name' ) : $this->transient;
505
- $version = $this->get_plugin_data( 'current', 'Version' );
506
- $plugname = $this->get_plugin_data( $plugin, 'Name' ) ? $this->get_plugin_data( $plugin, 'Name' ) : $plugin;
507
-
508
- $message = '';
509
- switch ( $type ) {
510
- case 'deactivate':
511
- $version = $this->get_dep_ver( $plugin, 0 );
512
- $message = __( '%2$s %3$s is required for %1$s. Deactivating %1$s.', 'ti-woocommerce-wishlist' );
513
- if ( empty( $version ) ) {
514
- $version = $this->get_dep_ver( $plugin, 1 );
515
- }
516
- if ( empty( $version ) ) {
517
- $version = $this->get_dep_ver( $plugin, 2 );
518
- }
519
- if ( empty( $version ) ) {
520
- $version = $this->get_dep_ver( $plugin, 3 );
521
- $message = __( '%1$s is confilcted with %2$s %3$s. Deactivating %1$s.', 'ti-woocommerce-wishlist' );
522
- }
523
- if ( '*' === $version ) {
524
- $version = $this->get_plugin_data( $plugin, 'Version' );
525
- }
526
- break;
527
- case 'upgrade':
528
- case 'update':
529
- $version = $this->get_dep_ver( $plugin, 0 );
530
- $message = __( '%2$s %3$s is required. Please update it before activating this plugin.', 'ti-woocommerce-wishlist' );
531
- break;
532
- case 'downgrade':
533
- case 'downdate':
534
- $version = $this->get_dep_ver( $plugin, 1 );
535
- $message = __( '%2$s %3$s is required. Please downgrade it before activating this plugin.', 'ti-woocommerce-wishlist' );
536
- break;
537
- case 'need':
538
- $version = '*' === $this->get_dep_ver( $plugin, 2 ) ? $this->get_plugin_data( $plugin, 'Version' ) : $this->get_dep_ver( $plugin, 2 );
539
- $message = __( '%2$s %3$s is required. Please activate it before activating this plugin.', 'ti-woocommerce-wishlist' );
540
- break;
541
- case 'conflict':
542
- $version = '*' === $this->get_dep_ver( $plugin, 3 ) ? $this->get_plugin_data( $plugin, 'Version' ) : $this->get_dep_ver( $plugin, 3 );
543
- $message = __( '%1$s is conflicted with %2$s %3$s. Please disable it before activating this plugin.', 'ti-woocommerce-wishlist' );
544
- break;
545
- case 'activate':
546
- $version = $this->get_dep_ver( $plugin, 1 );
547
- $message = __( '%1$s %3$s is required. Please activate it before activating this plugin.', 'ti-woocommerce-wishlist' );
548
- break;
549
- } // End switch().
550
- if ( empty( $message ) ) {
551
- return true;
552
- }
553
- if ( ! empty( $version ) ) {
554
- $version = '(v' . $version . ')';
555
- }
556
- $message = sprintf( $message, $current, $plugname, $version );
557
-
558
- $this->message[] = $message;
559
-
560
- return false;
561
- }
562
-
563
- /**
564
- * Add error admin notice
565
- */
566
- public function admin_notices() {
567
- if ( ! $this->status_dependency() ) {
568
- printf( '<div class="error is-dismissible">%s</div>', $this->get_messages() ); // WPCS: xss ok.
569
- }
570
- }
571
-
572
- /**
573
- * Get plugin info
574
- *
575
- * @param string $plugin Plugin transient name.
576
- * @param string $attr Plugin attribute name.
577
- *
578
- * @return mixed
579
- */
580
- public function get_plugin_data( $plugin, $attr = null ) {
581
- if ( 'current' === $plugin ) {
582
- $plugin = $this->transient;
583
- }
584
-
585
- $plugin_path = $this->plugin_path . $plugin;
586
-
587
- if ( ! array_key_exists( $plugin, $this->plugin_data ) ) {
588
- require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
589
- $plugin_data = array_filter( @get_plugin_data( $plugin_path, false, false ) ); // @codingStandardsIgnoreLine Generic.PHP.NoSilencedErrors.Discouraged
590
- if ( empty( $plugin_data ) ) {
591
- $plugin_data = null;
592
- }
593
- $this->plugin_data[ $plugin ] = $plugin_data;
594
- }
595
-
596
- if ( empty( $attr ) ) {
597
- return $this->plugin_data[ $plugin ];
598
- }
599
- if ( array_key_exists( $attr, (array) $this->plugin_data[ $plugin ] ) ) {
600
- return $this->plugin_data[ $plugin ][ $attr ];
601
- }
602
-
603
- return null;
604
- }
605
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Dependency plugin class
4
+ *
5
+ * @since 1.0.0
6
+ * @package TInvWishlist
7
+ */
8
+
9
+ // If this file is called directly, abort.
10
+ if (!defined('ABSPATH')) {
11
+ die;
12
+ }
13
+
14
+ /**
15
+ * Dependency plugin class
16
+ */
17
+ class TInvWL_PluginExtend
18
+ {
19
+
20
+ /**
21
+ * Plugin name
22
+ *
23
+ * @var string
24
+ */
25
+ public $_name;
26
+
27
+ /**
28
+ * Plugin transient name
29
+ *
30
+ * @var string
31
+ */
32
+ private $transient;
33
+
34
+ /**
35
+ * Plugin dependency array
36
+ *
37
+ * @var array
38
+ */
39
+ private $dependency;
40
+
41
+ /**
42
+ * Current dependency name
43
+ *
44
+ * @var string
45
+ */
46
+ private $dependency_current;
47
+
48
+ /**
49
+ * Current dependency nice name
50
+ *
51
+ * @var string
52
+ */
53
+ private $dependency_current_nice_name;
54
+
55
+ /**
56
+ * Plugin path dir
57
+ *
58
+ * @var string
59
+ */
60
+ private $plugin_path;
61
+
62
+ /**
63
+ * Cached plugin data
64
+ *
65
+ * @var array
66
+ */
67
+ private $plugin_data;
68
+
69
+ /**
70
+ * Plugin error message
71
+ *
72
+ * @var array
73
+ */
74
+ public $message;
75
+
76
+ /**
77
+ * Constructor
78
+ *
79
+ * @param string $plugin Plugin transient name, or can use Plugin root file.
80
+ * @param string $root_file Plugin root file, or can use Plugin transient name.
81
+ * @param string $plugin_name Plugin name.
82
+ */
83
+ public function __construct($plugin, $root_file = null, $plugin_name = TINVWL_PREFIX)
84
+ {
85
+ $this->_name = $plugin_name;
86
+ if (empty($plugin)) {
87
+ $this->transient = plugin_basename($root_file);
88
+ $this->plugin_path = trailingslashit(plugin_dir_path(dirname($root_file)));
89
+ } else {
90
+ $this->transient = $plugin;
91
+ $this->plugin_path = trailingslashit(dirname(TINVWL_PATH));
92
+ }
93
+ $this->dependency = array();
94
+ $this->plugin_data = array();
95
+ $this->message = array();
96
+ }
97
+
98
+ /**
99
+ * Run hooks dependency
100
+ */
101
+ public function run()
102
+ {
103
+ if ('plugins.php' === basename($_SERVER['PHP_SELF']) && !(defined('WP_CLI') && WP_CLI)) { // @codingStandardsIgnoreLine WordPress.VIP.SuperGlobalInputUsage.AccessDetected
104
+ add_action('admin_notices', array($this, 'admin_notices'));
105
+
106
+ $plugins = $this->get_dependency_plugins();
107
+
108
+ foreach (array_keys($plugins) as $plugin) {
109
+ add_filter('plugin_action_links_' . $plugin, array($this, 'plugin_action_links_maybe_deactivate'));
110
+ add_filter('network_admin_plugin_action_links_' . $plugin, array(
111
+ $this,
112
+ 'plugin_action_links_maybe_deactivate',
113
+ ));
114
+ }
115
+
116
+ add_action('after_plugin_row_' . $this->transient, array($this, 'plugin_row'), 10);
117
+ } else {
118
+ add_action('update_option_active_sitewide_plugins', array($this, 'maybe_deactivate'), 10, 2);
119
+ add_action('update_option_active_plugins', array($this, 'maybe_deactivate'), 10, 2);
120
+ }
121
+ }
122
+
123
+ /**
124
+ * Set dependency plugin transient name
125
+ *
126
+ * @param string $plugin Plugin transient name.
127
+ * @param string $nice_name Plugin nice name.
128
+ *
129
+ * @return \TInvWL_PluginExtend
130
+ */
131
+ public function set_dependency($plugin, $nice_name)
132
+ {
133
+ $this->dependency_current = $plugin;
134
+ $this->dependency_current_nice_name = $nice_name;
135
+
136
+ return $this;
137
+ }
138
+
139
+ /**
140
+ * Reset current dependency plugin transient name
141
+ *
142
+ * @return \TInvWL_PluginExtend
143
+ */
144
+ public function reset_dependency()
145
+ {
146
+ $this->dependency_current = null;
147
+
148
+ return $this;
149
+ }
150
+
151
+ /**
152
+ * Set dependency version by index rules
153
+ *
154
+ * @param integer $index Index rules.
155
+ * 0 Min version.
156
+ * 1 Max version.
157
+ * 2 Need plugin verion.
158
+ * 3 Conflict plugin verion.
159
+ * @param string $version Version dependency.
160
+ *
161
+ * @return boolean
162
+ */
163
+ private function set_dependency_version($index, $version = '1.0.0')
164
+ {
165
+ if (empty($this->dependency_current)) {
166
+ return false;
167
+ }
168
+ if (empty($version)) {
169
+ $this->dependency[$this->dependency_current][$index] = null;
170
+ } else {
171
+ $this->dependency[$this->dependency_current][$index] = $version;
172
+ }
173
+ $this->dependency[$this->dependency_current]['nice_name'] = $this->dependency_current_nice_name;
174
+ }
175
+
176
+ /**
177
+ * Set minimal dependency version
178
+ *
179
+ * @param string $version Version dependency.
180
+ *
181
+ * @return \TInvWL_PluginExtend
182
+ */
183
+ public function min($version = '1.0.0')
184
+ {
185
+ if ('*' === $version) {
186
+ $version = '';
187
+ }
188
+ $this->set_dependency_version(0, $version);
189
+
190
+ return $this;
191
+ }
192
+
193
+ /**
194
+ * Set maximum dependency version
195
+ *
196
+ * @param string $version Version dependency.
197
+ *
198
+ * @return \TInvWL_PluginExtend
199
+ */
200
+ public function max($version = '1.0.0')
201
+ {
202
+ if ('*' === $version) {
203
+ $version = '';
204
+ }
205
+ $this->set_dependency_version(1, $version);
206
+
207
+ return $this;
208
+ }
209
+
210
+ /**
211
+ * Set need plugin dependency version
212
+ *
213
+ * @param string $version Version dependency. Can use '*' for check any version.
214
+ *
215
+ * @return \TInvWL_PluginExtend
216
+ */
217
+ public function need($version = '*')
218
+ {
219
+ $this->set_dependency_version(2, $version);
220
+
221
+ return $this;
222
+ }
223
+
224
+ /**
225
+ * Set conflict plugin dependency version
226
+ *
227
+ * @param string $version Version dependency. Can use '*' for check any version.
228
+ *
229
+ * @return \TInvWL_PluginExtend
230
+ */
231
+ public function conflict($version = '*')
232
+ {
233
+ $this->set_dependency_version(3, $version);
234
+
235
+ return $this;
236
+ }
237
+
238
+ /**
239
+ * Get dependency array
240
+ *
241
+ * @param string $plugin Plugin transient name.
242
+ *
243
+ * @return array
244
+ */
245
+ private function get_dependency($plugin)
246
+ {
247
+ if (array_key_exists($plugin, $this->dependency)) {
248
+ return $this->dependency[$plugin];
249
+ }
250
+
251
+ return array();
252
+ }
253
+
254
+ /**
255
+ * Get dependency version from array.
256
+ *
257
+ * @param string $plugin Plugin transient name.
258
+ * @param integer $index Index rules.
259
+ * 0 Min version.
260
+ * 1 Max version.
261
+ * 2 Need plugin verion.
262
+ * 3 Conflict plugin verion.
263
+ *
264
+ * @return array
265
+ */
266
+ private function get_dep_ver($plugin, $index)
267
+ {
268
+ $dependency = $this->get_dependency($plugin);
269
+ if (array_key_exists($index, $dependency)) {
270
+ return $dependency[$index];
271
+ }
272
+
273
+ return null;
274
+ }
275
+
276
+ /**
277
+ * List dependency plugins
278
+ *
279
+ * @return array
280
+ */
281
+ private function get_dependency_plugins()
282
+ {
283
+ return $this->dependency;
284
+ }
285
+
286
+ /**
287
+ * Check all dependency.
288
+ *
289
+ * @return boolean
290
+ */
291
+ public function status_dependency()
292
+ {
293
+ $this->message = array();
294
+ $plugins = $this->get_dependency_plugins();
295
+ $status = true;
296
+
297
+ foreach ($plugins as $plugin => $data) {
298
+ if (is_plugin_active($plugin) && !$this->is_plugin_at_conflict_version($plugin)) {
299
+ $status = $this->set_message('conflict', $data['nice_name']);
300
+ } elseif (!is_plugin_active($plugin) || !$this->is_plugin_at_need_version($plugin)) {
301
+ $status = $this->set_message('need', $data['nice_name']);
302
+ } elseif (is_plugin_active($plugin) && !$this->is_plugin_at_min_version($plugin)) {
303
+ $status = $this->set_message('upgrade', $data['nice_name']);
304
+ } elseif (is_plugin_active($plugin) && !$this->is_plugin_at_max_version($plugin)) {
305
+ $status = $this->set_message('downgrade', $plugin);
306
+ } elseif (!is_plugin_active($plugin)) {
307
+ $status = $this->set_message('activate', $data['nice_name']);
308
+ }
309
+ }
310
+
311
+ return $status;
312
+ }
313
+
314
+ /**
315
+ * Check plugin minimal version dependency.
316
+ *
317
+ * @param string $plugin Plugin transient name.
318
+ *
319
+ * @return boolean
320
+ */
321
+ private function is_plugin_at_min_version($plugin)
322
+ {
323
+ return $this->is_plugin_at_version($plugin, 0);
324
+ }
325
+
326
+ /**
327
+ * Check plugin maximal version dependency.
328
+ *
329
+ * @param string $plugin Plugin transient name.
330
+ *
331
+ * @return boolean
332
+ */
333
+ private function is_plugin_at_max_version($plugin)
334
+ {
335
+ return $this->is_plugin_at_version($plugin, 1);
336
+ }
337
+
338
+ /**
339
+ * Check plugin need version dependency.
340
+ *
341
+ * @param string $plugin Plugin transient name.
342
+ *
343
+ * @return boolean
344
+ */
345
+ private function is_plugin_at_need_version($plugin)
346
+ {
347
+ return $this->is_plugin_at_version($plugin, 2);
348
+ }
349
+
350
+ /**
351
+ * Check plugin conflict version dependency.
352
+ *
353
+ * @param string $plugin Plugin transient name.
354
+ *
355
+ * @return boolean
356
+ */
357
+ private function is_plugin_at_conflict_version($plugin)
358
+ {
359
+ return $this->is_plugin_at_version($plugin, 3);
360
+ }
361
+
362
+ /**
363
+ * Check plugin version dependency.
364
+ *
365
+ * @param string $plugin Plugin transient name.
366
+ *
367
+ * @param integer $i Index rules.
368
+ * 0 Min version.
369
+ * 1 Max version.
370
+ * 2 Need plugin verion.
371
+ * 3 Conflict plugin verion.
372
+ *
373
+ * @return boolean
374
+ */
375
+ private function is_plugin_at_version($plugin, $i = 0)
376
+ {
377
+
378
+ switch ($i) {
379
+ case 3:
380
+ $type = 'ne';
381
+ $i = 3;
382
+ break;
383
+ case 2:
384
+ $type = 'eq';
385
+ $i = 2;
386
+ break;
387
+ case 1:
388
+ $type = 'le';
389
+ $i = 1;
390
+ break;
391
+ case 0:
392
+ default:
393
+ $type = 'ge';
394
+ $i = 0;
395
+ }
396
+ $version = $this->get_dep_ver($plugin, $i);
397
+ if (is_null($version)) {
398
+ return true;
399
+ }
400
+ $version_plugin = $this->get_plugin_data($plugin, 'Version');
401
+ if ('*' === $version) {
402
+ if (3 === $i) {
403
+ return empty($version_plugin);
404
+ } else {
405
+ return !empty($version_plugin);
406
+ }
407
+ }
408
+
409
+ return version_compare($version_plugin, $version, $type);
410
+ }
411
+
412
+ /**
413
+ * Get error messages
414
+ *
415
+ * @param boolean $first Get first or all error messages.
416
+ *
417
+ * @return string
418
+ */
419
+ public function get_messages($first = false)
420
+ {
421
+ if ($first) {
422
+ $message = array_shift($this->message);
423
+ $this->message = array();
424
+
425
+ return $message;
426
+ }
427
+
428
+ $message = '<p>' . implode('</p><p>', $this->message) . '</p>';
429
+ $this->message = array();
430
+
431
+ return $message;
432
+ }
433
+
434
+ /**
435
+ * Deactivation plugin
436
+ *
437
+ * @param string $old_value Not used.
438
+ * @param string $value Not used.
439
+ *
440
+ * @return string
441
+ */
442
+ public function maybe_deactivate($old_value, $value)
443
+ {
444
+ if (!$this->status_dependency()) {
445
+ self::deactivate_self($this->transient);
446
+
447
+ if (defined('WP_CLI') && WP_CLI) {
448
+ $plugins = $this->get_dependency_plugins();
449
+ $this->get_messages();
450
+
451
+ foreach ($plugins as $plugin => $data) {
452
+ if (!is_plugin_active($plugin) || !$this->is_plugin_at_need_version($plugin)) {
453
+ return WP_CLI::error($this->get_message('deactivate', $data['nice_name']));
454
+ } elseif (is_plugin_active($plugin) && !$this->is_plugin_at_min_version($plugin)) {
455
+ return WP_CLI::error($this->get_message('deactivate', $data['nice_name']));
456
+ } elseif (is_plugin_active($plugin) && !$this->is_plugin_at_max_version($plugin)) {
457
+ return WP_CLI::error($this->get_message('deactivate', $data['nice_name']));
458
+ }
459
+ }
460
+ }
461
+ }
462
+ }
463
+
464
+ /**
465
+ * Deactivation plugin
466
+ *
467
+ * @param string $actions Not used.
468
+ *
469
+ * @return string
470
+ */
471
+ public function plugin_action_links_maybe_deactivate($actions)
472
+ {
473
+ if (!$this->status_dependency()) {
474
+ self::deactivate_self($this->transient);
475
+ }
476
+
477
+ return $actions;
478
+ }
479
+
480
+ /**
481
+ * Return message in plugin lists table
482
+ *
483
+ * @param string $file Plugin file path.
484
+ */
485
+ public function plugin_row($file)
486
+ {
487
+ if (!$this->status_dependency()) {
488
+ $wp_list_table = _get_list_table('WP_Plugins_List_Table');
489
+ ?>
490
+ <tr class="plugin-update-tr installer-plugin-update-tr">
491
+ <td colspan="<?php echo $wp_list_table->get_column_count(); // WPCS: xss ok. ?>"
492
+ class="plugin-update colspanchange">
493
+ <div class="notice inline notice-warning notice-alt">
494
+ <p class="installer-q-icon">
495
+ <?php echo $this->get_messages(true); // WPCS: xss ok. ?>
496
+ </p>
497
+ </div>
498
+ </td>
499
+ </tr>
500
+ <?php
501
+ }
502
+ }
503
+
504
+ /**
505
+ * Deactivation plugin
506
+ *
507
+ * @param string $file Plugin file path.
508
+ * @param boolean $network_wide Network wide.
509
+ */
510
+ public static function deactivate_self($file, $network_wide = false)
511
+ {
512
+ if (is_multisite()) {
513
+ $network_wide = is_plugin_active_for_network($file);
514
+ }
515
+
516
+ deactivate_plugins($file, true, $network_wide);
517
+ }
518
+
519
+ /**
520
+ * Set message
521
+ *
522
+ * @param string $type Type error message.
523
+ * @param string $plugin Plugin transient name.
524
+ *
525
+ * @return boolean
526
+ */
527
+ private function set_message($type, $plugin)
528
+ {
529
+ $current = $this->get_plugin_data('current', 'Name') ? $this->get_plugin_data('current', 'Name') : $this->transient;
530
+ $version = $this->get_plugin_data('current', 'Version');
531
+ $plugname = $this->get_plugin_data($plugin, 'Name') ? $this->get_plugin_data($plugin, 'Name') : $plugin;
532
+
533
+ $message = '';
534
+ switch ($type) {
535
+ case 'deactivate':
536
+ $version = $this->get_dep_ver($plugin, 0);
537
+ $message = __('%2$s %3$s is required for %1$s. Deactivating %1$s.', 'ti-woocommerce-wishlist');
538
+ if (empty($version)) {
539
+ $version = $this->get_dep_ver($plugin, 1);
540
+ }
541
+ if (empty($version)) {
542
+ $version = $this->get_dep_ver($plugin, 2);
543
+ }
544
+ if (empty($version)) {
545
+ $version = $this->get_dep_ver($plugin, 3);
546
+ $message = __('%1$s is confilcted with %2$s %3$s. Deactivating %1$s.', 'ti-woocommerce-wishlist');
547
+ }
548
+ if ('*' === $version) {
549
+ $version = $this->get_plugin_data($plugin, 'Version');
550
+ }
551
+ break;
552
+ case 'upgrade':
553
+ case 'update':
554
+ $version = $this->get_dep_ver($plugin, 0);
555
+ $message = __('%2$s %3$s is required. Please update it before activating this plugin.', 'ti-woocommerce-wishlist');
556
+ break;
557
+ case 'downgrade':
558
+ case 'downdate':
559
+ $version = $this->get_dep_ver($plugin, 1);
560
+ $message = __('%2$s %3$s is required. Please downgrade it before activating this plugin.', 'ti-woocommerce-wishlist');
561
+ break;
562
+ case 'need':
563
+ $version = '*' === $this->get_dep_ver($plugin, 2) ? $this->get_plugin_data($plugin, 'Version') : $this->get_dep_ver($plugin, 2);
564
+ $message = __('%2$s %3$s is required. Please activate it before activating this plugin.', 'ti-woocommerce-wishlist');
565
+ break;
566
+ case 'conflict':
567
+ $version = '*' === $this->get_dep_ver($plugin, 3) ? $this->get_plugin_data($plugin, 'Version') : $this->get_dep_ver($plugin, 3);
568
+ $message = __('%1$s is conflicted with %2$s %3$s. Please disable it before activating this plugin.', 'ti-woocommerce-wishlist');
569
+ break;
570
+ case 'activate':
571
+ $version = $this->get_dep_ver($plugin, 1);
572
+ $message = __('%1$s %3$s is required. Please activate it before activating this plugin.', 'ti-woocommerce-wishlist');
573
+ break;
574
+ } // End switch().
575
+ if (empty($message)) {
576
+ return true;
577
+ }
578
+ if (!empty($version)) {
579
+ $version = '(v' . $version . ')';
580
+ }
581
+ $message = sprintf($message, $current, $plugname, $version);
582
+
583
+ $this->message[] = $message;
584
+
585
+ return false;
586
+ }
587
+
588
+ /**
589
+ * Get message
590
+ *
591
+ * @param string $type Type error message.
592
+ * @param string $plugin Plugin transient name.
593
+ *
594
+ * @return boolean
595
+ */
596
+ private function get_message($type, $plugin)
597
+ {
598
+ $current = $this->get_plugin_data('current', 'Name') ? $this->get_plugin_data('current', 'Name') : $this->transient;
599
+ $version = $this->get_plugin_data('current', 'Version');
600
+ $plugname = $this->get_plugin_data($plugin, 'Name') ? $this->get_plugin_data($plugin, 'Name') : $plugin;
601
+
602
+ $message = '';
603
+ switch ($type) {
604
+ case 'deactivate':
605
+ $version = $this->get_dep_ver($plugin, 0);
606
+ $message = __('%2$s %3$s is required for %1$s. Deactivating %1$s.', 'ti-woocommerce-wishlist');
607
+ if (empty($version)) {
608
+ $version = $this->get_dep_ver($plugin, 1);
609
+ }
610
+ if (empty($version)) {
611
+ $version = $this->get_dep_ver($plugin, 2);
612
+ }
613
+ if (empty($version)) {
614
+ $version = $this->get_dep_ver($plugin, 3);
615
+ $message = __('%1$s is conflicted with %2$s %3$s. Deactivating %1$s.', 'ti-woocommerce-wishlist');
616
+ }
617
+ if ('*' === $version) {
618
+ $version = $this->get_plugin_data($plugin, 'Version');
619
+ }
620
+ break;
621
+ case 'upgrade':
622
+ case 'update':
623
+ $version = $this->get_dep_ver($plugin, 0);
624
+ $message = __('%2$s %3$s is required. Please update it before activating this plugin.', 'ti-woocommerce-wishlist');
625
+ break;
626
+ case 'downgrade':
627
+ case 'downdate':
628
+ $version = $this->get_dep_ver($plugin, 1);
629
+ $message = __('%2$s %3$s is required. Please downgrade it before activating this plugin.', 'ti-woocommerce-wishlist');
630
+ break;
631
+ case 'need':
632
+ $version = '*' === $this->get_dep_ver($plugin, 2) ? $this->get_plugin_data($plugin, 'Version') : $this->get_dep_ver($plugin, 2);
633
+ $message = __('%2$s %3$s is required. Please activate it before activating this plugin.', 'ti-woocommerce-wishlist');
634
+ break;
635
+ case 'conflict':
636
+ $version = '*' === $this->get_dep_ver($plugin, 3) ? $this->get_plugin_data($plugin, 'Version') : $this->get_dep_ver($plugin, 3);
637
+ $message = __('%1$s is conflicted with %2$s %3$s. Please disable it before activating this plugin.', 'ti-woocommerce-wishlist');
638
+ break;
639
+ case 'activate':
640
+ $version = $this->get_dep_ver($plugin, 1);
641
+ $message = __('%1$s %3$s is required. Please activate it before activating this plugin.', 'ti-woocommerce-wishlist');
642
+ break;
643
+ } // End switch().
644
+
645
+ if (!empty($version)) {
646
+ $version = '(v' . $version . ')';
647
+ }
648
+
649
+ return sprintf($message, $current, $plugname, $version);
650
+ }
651
+
652
+ /**
653
+ * Add error admin notice
654
+ */
655
+ public function admin_notices()
656
+ {
657
+ if (!$this->status_dependency()) {
658
+ printf('<div class="error is-dismissible">%s</div>', $this->get_messages()); // WPCS: xss ok.
659
+ }
660
+ }
661
+
662
+ /**
663
+ * Get plugin info
664
+ *
665
+ * @param string $plugin Plugin transient name.
666
+ * @param string $attr Plugin attribute name.
667
+ *
668
+ * @return mixed
669
+ */
670
+ public function get_plugin_data($plugin, $attr = null)
671
+ {
672
+ if ('current' === $plugin) {
673
+ $plugin = $this->transient;
674
+ }
675
+
676
+ $plugin_path = $this->plugin_path . $plugin;
677
+
678
+ if (!array_key_exists($plugin, $this->plugin_data)) {
679
+ require_once(ABSPATH . 'wp-admin/includes/plugin.php');
680
+ $plugin_data = array_filter(@get_plugin_data($plugin_path, false, false)); // @codingStandardsIgnoreLine Generic.PHP.NoSilencedErrors.Discouraged
681
+ if (empty($plugin_data)) {
682
+ $plugin_data = null;
683
+ }
684
+ $this->plugin_data[$plugin] = $plugin_data;
685
+ }
686
+
687
+ if (empty($attr)) {
688
+ return $this->plugin_data[$plugin];
689
+ }
690
+ if (array_key_exists($attr, (array)$this->plugin_data[$plugin])) {
691
+ return $this->plugin_data[$plugin][$attr];
692
+ }
693
+
694
+ return null;
695
+ }
696
+ }
languages/ti-woocommerce-wishlist.pot CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2021 TI WooCommerce Wishlist Plugin - 1.25.2
2
- # This file is distributed under the same license as the TI WooCommerce Wishlist Plugin - 1.25.2 package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: TI WooCommerce Wishlist Plugin - 1.25.2\n"
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
@@ -884,34 +884,38 @@ msgstr ""
884
  msgid "Preview"
885
  msgstr ""
886
 
887
- #: includes/pluginextend.helper.php:512
888
  msgid "%2$s %3$s is required for %1$s. Deactivating %1$s."
889
  msgstr ""
890
 
891
- #: includes/pluginextend.helper.php:521
892
  msgid "%1$s is confilcted with %2$s %3$s. Deactivating %1$s."
893
  msgstr ""
894
 
895
- #: includes/pluginextend.helper.php:530
896
  msgid "%2$s %3$s is required. Please update it before activating this plugin."
897
  msgstr ""
898
 
899
- #: includes/pluginextend.helper.php:535
900
  msgid "%2$s %3$s is required. Please downgrade it before activating this plugin."
901
  msgstr ""
902
 
903
- #: includes/pluginextend.helper.php:539
904
  msgid "%2$s %3$s is required. Please activate it before activating this plugin."
905
  msgstr ""
906
 
907
- #: includes/pluginextend.helper.php:543
908
  msgid "%1$s is conflicted with %2$s %3$s. Please disable it before activating this plugin."
909
  msgstr ""
910
 
911
- #: includes/pluginextend.helper.php:547
912
  msgid "%1$s %3$s is required. Please activate it before activating this plugin."
913
  msgstr ""
914
 
 
 
 
 
915
  #: includes/tinvwl.class.php:168
916
  msgid "Settings"
917
  msgstr ""
1
+ # Copyright (C) 2021 TI WooCommerce Wishlist Plugin - 1.25.3
2
+ # This file is distributed under the same license as the TI WooCommerce Wishlist Plugin - 1.25.3 package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: TI WooCommerce Wishlist Plugin - 1.25.3\n"
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
884
  msgid "Preview"
885
  msgstr ""
886
 
887
+ #: includes/pluginextend.helper.php:537, includes/pluginextend.helper.php:606
888
  msgid "%2$s %3$s is required for %1$s. Deactivating %1$s."
889
  msgstr ""
890
 
891
+ #: includes/pluginextend.helper.php:546
892
  msgid "%1$s is confilcted with %2$s %3$s. Deactivating %1$s."
893
  msgstr ""
894
 
895
+ #: includes/pluginextend.helper.php:555, includes/pluginextend.helper.php:624
896
  msgid "%2$s %3$s is required. Please update it before activating this plugin."
897
  msgstr ""
898
 
899
+ #: includes/pluginextend.helper.php:560, includes/pluginextend.helper.php:629
900
  msgid "%2$s %3$s is required. Please downgrade it before activating this plugin."
901
  msgstr ""
902
 
903
+ #: includes/pluginextend.helper.php:564, includes/pluginextend.helper.php:633
904
  msgid "%2$s %3$s is required. Please activate it before activating this plugin."
905
  msgstr ""
906
 
907
+ #: includes/pluginextend.helper.php:568, includes/pluginextend.helper.php:637
908
  msgid "%1$s is conflicted with %2$s %3$s. Please disable it before activating this plugin."
909
  msgstr ""
910
 
911
+ #: includes/pluginextend.helper.php:572, includes/pluginextend.helper.php:641
912
  msgid "%1$s %3$s is required. Please activate it before activating this plugin."
913
  msgstr ""
914
 
915
+ #: includes/pluginextend.helper.php:615
916
+ msgid "%1$s is conflicted with %2$s %3$s. Deactivating %1$s."
917
+ msgstr ""
918
+
919
  #: includes/tinvwl.class.php:168
920
  msgid "Settings"
921
  msgstr ""
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: templateinvaders
3
  Tags: woocommerce, wishlist, woocommerce wishlist, e-commerce, ecommerce
4
  Requires at least: 4.7
5
  Tested up to: 5.7
6
- Stable tag: 1.25.2
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,11 @@ Yes, you can! Join in on our [GitHub repository](https://github.com/TemplateInva
163
 
164
 
165
  == Changelog ==
 
 
 
 
 
166
  = 1.25.2 =
167
  *Release Date - 16 April 2021*
168
 
3
  Tags: woocommerce, wishlist, woocommerce wishlist, e-commerce, ecommerce
4
  Requires at least: 4.7
5
  Tested up to: 5.7
6
+ Stable tag: 1.25.3
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
+ = 1.25.3 =
167
+ *Release Date - 23 April 2021*
168
+
169
+ * Fixed PHP fatal error related to WP CLI
170
+
171
  = 1.25.2 =
172
  *Release Date - 16 April 2021*
173
 
ti-woocommerce-wishlist.php CHANGED
@@ -4,7 +4,7 @@
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: 1.25.2
8
  * Requires at least: 4.7
9
  * Tested up to: 5.7
10
  * WC requires at least: 3.0
@@ -41,7 +41,7 @@ if (!defined('TINVWL_DOMAIN')) {
41
  }
42
 
43
  if (!defined('TINVWL_FVERSION')) {
44
- define('TINVWL_FVERSION', '1.25.2');
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: 1.25.3
8
  * Requires at least: 4.7
9
  * Tested up to: 5.7
10
  * WC requires at least: 3.0
41
  }
42
 
43
  if (!defined('TINVWL_FVERSION')) {
44
+ define('TINVWL_FVERSION', '1.25.3');
45
  }
46
 
47
  if (!defined('TINVWL_LOAD_FREE')) {