CTX Feed – WooCommerce Product Feed Manager Plugin - Version 4.0.8

Version Description

(2020-10-21) = * Fix: Bing shipping default value from shipping class.

Download this release

Release Info

Developer wahid0003
Plugin Icon 128x128 CTX Feed – WooCommerce Product Feed Manager Plugin
Version 4.0.8
Comparing to
See all releases

Code changes from version 4.0.7 to 4.0.8

README.txt CHANGED
@@ -5,7 +5,7 @@ Tags:product feed,woocommerce product feed,google shopping feed,google shopping,
5
  Requires at least: 3.6
6
  Tested Up To: 5.5
7
  Requires PHP: 5.6
8
- Stable tag: 4.0.7
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -308,6 +308,9 @@ Using pro version:
308
 
309
  == Changelog ==
310
 
 
 
 
311
  = 4.0.7 (2020-10-20) =
312
  * Fix: Bing template as csv format.
313
 
5
  Requires at least: 3.6
6
  Tested Up To: 5.5
7
  Requires PHP: 5.6
8
+ Stable tag: 4.0.8
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
308
 
309
  == Changelog ==
310
 
311
+ = 4.0.8 (2020-10-21) =
312
+ * Fix: Bing shipping default value from shipping class.
313
+
314
  = 4.0.7 (2020-10-20) =
315
  * Fix: Bing template as csv format.
316
 
admin/js/woo-feed-admin.min.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}!function(s,a,n,o,c){s.fn.disabled=function(n){return s(this).each(function(){var e=s(this),t="disabled";void 0!==e.prop(t)?e.prop(t,void 0===n||!0===n):!0===n?e.addClass(t):e.removeClass(t)}),self},s.fn.isDisabled=function(){var e=s(this),t="disabled";return void 0!==e.prop(t)?e.prop(t):e.hasClass(t)};function e(e){s(e.currentTarget).removeClass(function(e,t){return(t.match(/\btooltipped-\S+/g)||[]).join(" ")}).removeClass("tooltipped").removeAttr("aria-label")}function r(e,t){s(e).addClass("tooltipped tooltipped-s").attr("aria-label",t)}function i(e,t){return s.extend(!0,{},e,t)}function t(){l=s(".toClipboard"),!ClipboardJS.isSupported()||/iPhone|iPad/i.test(navigator.userAgent)?l.find("img").hide(0):(l.each(function(){s(this).on("mouseleave",e).on("blur",e)}),new ClipboardJS(".toClipboard").on("error",function(e){var t,n;r(e.trigger,(t=e.action,n="cut"===t?"X":"C",/iPhone|iPad/i.test(navigator.userAgent)?"No support :(":/Mac/i.test(navigator.userAgent)?"Press ⌘-"+n+" to "+t:"Press Ctrl-"+n+" to "+t))}).on("success",function(e){r(e.trigger,"Copied!")}))}var l,_,f={in_array:function(e,t){try{return-1!==t.indexOf(e)}catch(e){return!1}},selectize_render_item:function(e,t){return'<div class="item wapk-selectize-item">'.concat(t(e.text),"</div>")},ajax_fail:function(e){console.warn(e),alert(e.hasOwnProperty("statusText")&&e.hasOwnProperty("status")?c.ajax.error+"\n"+e.statusText+" ("+e.status+")":e)},sortable:function(e,n,a,r){return(e||s(".sorted_table")).each(function(){var e=s(this),t=e.find("tbody > tr:eq(0) > td").length||a||9;e.wf_sortable(i({containerSelector:"table",itemPath:"> tbody",itemSelector:"tr",handle:"i.wf_sortedtable",placeholder:'<tr class="placeholder"><td colspan="'.concat(t,'"></td></tr>'),onDrop:function(e,t,n,a){e.removeClass(t.group.options.draggedClass).removeAttr("style"),s("body").removeClass(t.group.options.bodyClass),r&&"function"==typeof r&&r(e,t,n,a)}},n))})},selectize:function(e,t){return(e||s("select.selectize")).not(".selectized").each(function(){var e=s(this);e.selectize(i({create:e.data("create")||!1,plugins:e.data("plugins")?e.data("plugins").split(",").map(function(e){return e.trim()}):[],render:{item:f.selectize_render_item}},t))})},fancySelect:function(e,t){return(e||s("select.fancySelect")).not(".FancySelectInit").each(function(){s(this).fancySelect(i({maxItemShow:3},t))})},reindex_config_table:function(){s("#table-1").find("tbody tr").each(function(n,e){s(e).find("[name]").each(function(e,t){s(t).attr("name",s(t).attr("name").replace(/(\[\d\])/g,"[".concat(n,"]")))})})},common:function(){f.sortable(s(".sorted_table"),{},9,f.reindex_config_table),f.selectize(),f.fancySelect(s(".outputType"))}},d={form:null,init:function(){this.form=s(".generateFeed"),this.form.length&&(f.common(),s(n).trigger(new jQuery.Event("feedEditor.init",{target:this.form})))},renderMerchantInfo:function(n,a,r){function e(e){var t;r.hasOwnProperty(e)&&(n.find(".merchant-info-section."+e+" .data").html(r[e]),"feed_file_type"===e&&((t=r[e].split(",").map(function(e){return e.trim().toLowerCase()}).filter(function(e){return""!==e&&e!==c.na.toLowerCase()})).length?(a.find("option").removeAttr("selected").each(function(){var e=s(this);e.val()&&!f.in_array(e.val(),t)?e.disabled(!0):e.disabled(!1)}),1===t.length&&a.find('option[value="'+t[0]+'"]').attr("selected","selected")):a.find("option").disabled(!1)))}for(var t in r)e(t);n.find(".spinner").removeClass("is-active"),a.disabled(!1),a.trigger("change"),a.parent().find(".spinner").removeClass("is-active")},renderMerchantTemplate:function(n,a){function e(t){if(a.hasOwnProperty(t))if("tabs"===t)n.html(a[t]);else{var e=s('[name="'+t+'"]');e.length&&e.each(function(){var e=s(this);e.is("select")?e.find('[value="'+a[t]+'"]').prop("selected",!0):(e.is("[type=checkbox]")||e.is("[type=radio]"))&&e.val()===a[t]?e.prop("checked",!0):e.val(a[t])}).trigger("change")}}for(var t in a)e(t);d.init()}},u=[],p=[],h=function(){function e(){_classCallCheck(this,e),this._feed=c.generator.feed,this._limit=c.generator.limit,this._progress=0,this._timer=null,this._color=!1,this._total_batch=0,this._current_batch=0,this._product_ids=[],this._progress_per_batch=0,this._refresh=!0,this._regenerate=c.generator.regenerate,a.isRegenerating=!1,this._all_btn=s(".wpf_regenerate"),this._current_btn=s("#".concat(this._feed.replace("wf_config","wf_feed_"))),this._current_btn_label=""}return _createClass(e,[{key:"init",value:function(){var t=this;return""!==this._feed&&this._regenerate&&!1===a.isRegenerating&&this.generate(),s(n).on("click",".wpf_regenerate",function(e){e.preventDefault(),t._current_btn=s(this),t._current_btn.hasClass("disabled")||!0===a.isRegenerating||(t._feed=t._current_btn.attr("id").replace("wf_feed_","wf_config"),""!==t._feed&&t.generate())}),this}},{key:"_block_button",value:function(){this._all_btn.length&&this._all_btn.addClass("disabled"),this._current_btn.length&&(this._current_btn.find("span").addClass("wpf_spin reverse_spin"),this._current_btn_label=this._current_btn.attr("title"),this._current_btn.attr("aria-label",c.regenerate).attr("title",c.regenerate))}},{key:"_unblock_button",value:function(){this._all_btn.length&&this._all_btn.removeClass("disabled"),this._current_btn.length&&(this._current_btn.find("span").removeClass("wpf_spin"),this._current_btn.find("span").removeClass("reverse_spin"),this._current_btn.attr("aria-label",this._current_btn_label).attr("title",this._current_btn_label))}},{key:"generate",value:function(){var t=this,n=this;a.isRegenerating=!0,this._block_button(),this._resetProgressBar(),this._progressBarActive(),this._log("Counting Total Products"),this._updateProgressStatus("Fetching products."),this._get_product_ids().then(function(e){t._progress=10,n._log({response:e}),e.success?(n._log("Total ".concat(e.total," Products found.")),n._product_ids=e.product,n._total_batch=t._product_ids.length,n._current_batch=0,n._progress_per_batch=(90-t._progress)/t._total_batch,n._process_batch(),n._updateProgressStatus("Processing Products...")):n._updateProgressStatus(e.data.message)}).fail(function(e){n._log(e),n._updateProgressStatus(e.message),n._color="red",setTimeout(function(){n._stopProgressBar(),n._unblock_button()},1500)})}},{key:"_get_product_ids",value:function(){return this._progress=5,o.post("get_product_information",{_ajax_nonce:c.nonce,feed:this._feed,limit:this._limit})}},{key:"_process_batch",value:function(){var t=this,e="Processing Batch ".concat(this._current_batch+1," of ").concat(this._total_batch);this._updateProgressStatus(e),this._log(e),o.post("make_batch_feed",{_ajax_nonce:c.nonce,feed:this._feed,products:this._product_ids[this._current_batch],loop:this._current_batch}).then(function(e){t._current_batch++,t._log("Batch ".concat(t._current_batch," Completed")),t._log(e),t._current_batch<t._total_batch&&(t._process_batch(),t._progress+=t._progress_per_batch),t._current_batch===t._total_batch&&t._save_feed_file()}).fail(function(e){t._log(e),t._updateProgressStatus(e.message),t._color="red",setTimeout(function(){t._stopProgressBar(),t._unblock_button()},1500)})}},{key:"_save_feed_file",value:function(){var t=this;this._log("Saving feed file"),this._updateProgressStatus("Saving feed file"),o.post("save_feed_file",{_ajax_nonce:c.nonce,feed:this._feed}).then(function(e){t._log(e),t._progress=100,t._refresh&&(a.location.href="".concat(c.pages.list.feed,"&link=").concat(e.url,"&cat=").concat(e.cat)),setTimeout(function(){t._stopProgressBar(),setTimeout(function(){t._resetProgressBar(!0),t._unblock_button()},3e3)},2500)}).fail(function(e){t._log(e),t._updateProgressStatus(e.message),t._color="red",setTimeout(function(){t._stopProgressBar(),t._unblock_button()},1500)})}},{key:"_log",value:function(e){return c.wpf_debug&&console.log(e),this}},{key:"_progressBarActive",value:function(e){var t=0<arguments.length&&void 0!==e?e:0,n=this;return this._toggleProgressBar(!0),this._timer=setInterval(function(){n._updateProgressBar()},t||1e3),this}},{key:"_stopProgressBar",value:function(){return clearInterval(this._timer),this}},{key:"_resetProgressBar",value:function(e){return this._toggleProgressBar(!1),this._updateProgressStatus(""),clearInterval(this._timer),this._color=!1,this._timer=null,this._progress=0,e&&this._updateProgressBar(),this}},{key:"_toggleProgressBar",value:function(e){var t=s("#feed_progress_table");return e?t.show():t.hide(),this}},{key:"_updateProgressStatus",value:function(e){return s(".feed-progress-status").text(e),this}},{key:"_updateProgressBar",value:function(){var e=s(".feed-progress-percentage"),t=s(".feed-progress-bar-fill"),n="".concat(Math.round(this._progress),"%");t.css({width:n,background:this._color||"#3DC264"}),e.text(n)}}]),e}();a.wf={helper:f,feedEditor:d,generator:h},s(a).load(function(){null!==s(location).attr("href").match(/webappick.*feed/g)&&s("#wpbody-content").addClass("woofeed-body-content");var e=a.location.search;"edit-feed"===new URLSearchParams(e).get("action")&&s(".itemWrapper").show(),t(),postboxes.add_postbox_toggles(pagenow),(new h).init(),""!==c.generator.feed&&c.generator.regenerate,d.init(),f.common(),s(".wfmasterTooltip").hover(function(){var e=s(this),t=e.attr("wftitle");e.data("tipText",t).removeAttr("wftitle"),s('<p class="wftooltip"></p>').text(t).appendTo("body").fadeIn("slow")},function(){var e=s(this);e.attr("wftitle",e.data("tipText")),s(".wftooltip").remove()}).mousemove(function(e){s(".wftooltip").css({top:e.pageY+10,left:e.pageX+20})}),s(".generateFeed").validate(),s(n).on("click","[data-toggle_slide]",function(e){e.preventDefault(),s(s(this).data("toggle_slide")).slideToggle("fast")}).on("click","#wf_newRow",function(){var e=s("#table-1 tbody"),t=s("#feed_config_template").text().trim().replace(/__idx__/g,e.find("tr").length);e.append(t),f.fancySelect(s(".outputType"))}).on("click",".single-feed-delete",function(e){e.preventDefault(),confirm(c.form.del_confirm)&&(a.location.href=s(this).attr("val"))}).on("click",".wf_clean_cache_wrapper",function(e){e.preventDefault();var t=s(".woo-feed-clean-cache-nonce").val(),n=s(".woo-feed-cache-loader");n.show(),o.post("clear_cache_data",{_ajax_clean_nonce:t}).then(function(e){e.success&&n.hide()}).fail(function(e){console.log("something wrong")})}).on("change",".wf_attr.wf_attributes",function(e){e.preventDefault(),s(".fancy-picker-picked").trigger("click");var t,n,a=s(this).val(),r=s(this).parents("tr").find(".outputType"),i=s(this).parents("tr").find(".fancy-picker-content .fancy-picker-option"),o=s(this).parents("tr").find(".fancy-picker-data span");""!==a&&-1!==a.indexOf("wf_taxo")&&(t="for_custom_taxo",n="parent_if_empty"),["price","current_price","sale_price","price_with_tax","current_price_with_tax","sale_price_with_tax"].includes(a)&&(t="for_price",n="Price"),i.removeClass("selected"),"for_custom_taxo"!==t&&"for_price"!==t||i.each(function(e){n===s(this).text()&&(s(this).addClass("selected"),o.text(n),r.find("option").text(n),r.find("option").val(s(this).data("value")))})}).on("click","#doaction, #doaction2",function(){return confirm(c.form.del_confirm_multi)}).on("change",".dType",function(){var e=s(this),t=e.val(),n=e.closest("tr");"pattern"===t?(n.find(".value_attribute").hide(),n.find(".value_pattern").show()):"attribute"===t?(n.find(".value_attribute").show(),n.find(".value_pattern").hide()):"remove"===t&&(n.find(".value_attribute").hide(),n.find(".value_pattern").hide())}).on("click",".delRow",function(e){e.preventDefault(),s(this).closest("tr").remove(),f.reindex_config_table()}).on("submit","#generateFeed",function(){s(this).validate(),s(this).valid()&&s(".makeFeedResponse").show().html('<b style="color: darkblue;"><i class="dashicons dashicons-sos wpf_spin"></i> '.concat(c.form.generate,"</b>"))}).on("submit","#updatefeed",function(e,t){s(this).validate(),s(this).valid()&&s(".makeFeedResponse").show().html('<b style="color: darkblue;"><i class="dashicons dashicons-sos wpf_spin"></i> '.concat(t&&t.save?c.form.save:c.form.generate,"</b>"))}).on("change",".ftporsftp",function(){var e=s(this).val(),t=s(".ssh2_status");"sftp"===e?(t.show().css("color","dodgerblue").text(c.form.sftp_checking),o.post("get_ssh2_status",{_ajax_nonce:c.nonce,server:e}).then(function(e){"exists"===e?(t.css("color","#2CC185").text(c.form.sftp_available),setTimeout(function(){t.hide()},1500)):t.show().css("color","red").text(c.form.sftp_warning)}).fail(function(e){t.hide(),f.ajax_fail(e)})):t.hide()}).on("click",'[name="save_feed_config"]',function(e){e.preventDefault(),s("#updatefeed").trigger("submit",{save:!0})}).on("change","#provider",function(e){if(e.preventDefault(),s(this).closest(".generateFeed").hasClass("add-new")){var t=s(this).val(),n=s("#feedType"),a=s("#providerPage"),r=s("#feed_merchant_info");a.html('<h3><span style="float:none;margin: -3px 0 0;" class="spinner is-active"></span> '+c.form.loading_tmpl+"</h3>"),r.find(".spinner").addClass("is-active"),n.disabled(!0),n.parent().find(".spinner").addClass("is-active"),r.find(".merchant-info-section .data").html(""),u.hasOwnProperty(t)?d.renderMerchantInfo(r,n,u[t]):o.send("woo_feed_get_merchant_info",{type:"GET",data:{nonce:c.nonce,provider:t}}).then(function(e){u[t]=e,d.renderMerchantInfo(r,n,e)}).fail(f.ajax_fail),p.hasOwnProperty(t)?d.renderMerchantTemplate(a,p[t]):o.post("get_feed_merchant",{_ajax_nonce:c.nonce,merchant:t}).then(function(e){p[t]=e,d.renderMerchantTemplate(a,e),"bing"===t&&(s("#delimiter option").removeAttr("selected"),s('#delimiter option[value="tab"]').attr("selected","selected"),s("#enclosure option").removeAttr("selected"),s('#enclosure option[value=" "]').attr("selected","selected")),"google_product_review"!==t&&s('.wf_attributes option[value="reviewer_name"]').hide()}).fail(f.ajax_fail)}}).on("change",".woo_feed_status_input",function(){var e=s(this);o.post("update_feed_status",{_ajax_nonce:c.nonce,feedName:e.val(),status:e[0].checked?1:0})}),s(n).on("change",'[name="is_outOfStock"], [name="product_visibility"]',function(){var e=s(".out-of-stock-visibility");"n"===s('[name="is_outOfStock"]:checked').val()&&"1"===s('[name="product_visibility"]:checked').val()?e.show():e.hide()}).on("change",".attr_type",function(){var e=s(this),t=e.val(),n=e.closest("tr");"pattern"===t?(n.find(".wf_attr").hide(),n.find(".wf_attr").val(""),n.find(".wf_default").show()):(n.find(".wf_attr").show(),n.find(".wf_default").hide(),n.find(".wf_default").val(""))}).on("change",".wf_mattributes, .attr_type",function(){var e=s(this).closest("tr"),t=e.find(".wf_mattributes"),n=e.find(".attr_type"),a=e.find("td:eq(4)"),r=s("#provider").val();if(c.form.google_category.hasOwnProperty(t.val())&&"pattern"===n.val()&&f.in_array(r,c.form.google_category[t.val()])){if(0===a.find("select.selectize").length){a.find("input.wf_default").remove(),a.append('<span class="wf_default wf_attributes"><select name="default[]" class="selectize"></select></span>'),a.append('<span style="font-size:x-small;"><a style="color: red" href="http://webappick.helpscoutdocs.com/article/19-how-to-map-store-category-with-merchant-category" target="_blank">'.concat(c.learn_more,"</a></span>")),_||a.append('<span class="spinner is-active" style="margin: 0;"></span>');var i=a.find(".wf_attributes select");f.selectize(i,{preload:!0,placeholder:c.form.select_category,load:function(e,t){_?t(_):o.send("get_google_categories",{type:"GET",data:{_ajax_nonce:c.nonce,action:"get_google_categories",provider:r}}).then(function(e){t(_=e),a.find(".spinner").remove()}).fail(f.ajax_fail)}})}}else"current_category"!==t.val()&&0===a.find("input.wf_default").length&&(a.find("span").remove(),a.append('<input autocomplete="off" class="wf_default wf_attributes" type="text" name="default[]" value="">'),"pattern"!==n.val()&&a.find("input.wf_default").hide())}).on("change","#feedType,#provider",function(){var e=s("#feedType").val(),t=s("#provider").val(),n=s(".itemWrapper"),a=s(".wf_csvtxt");""!==e&&f.in_array(t,c.form.item_wrapper_hidden)?n.hide():"xml"===e?(n.show(),a.hide()):"csv"===e||"txt"===e?(n.hide(),a.show()):(n.hide(),a.hide())}).trigger("change")})}(jQuery,window,document,wp.ajax,wpf_ajax_obj);
2
- //# sourceMappingURL=woo-feed-admin.min.js.map
1
+ "use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}!function(s,a,n,o,c){s.fn.disabled=function(n){return s(this).each(function(){var e=s(this),t="disabled";void 0!==e.prop(t)?e.prop(t,void 0===n||!0===n):!0===n?e.addClass(t):e.removeClass(t)}),self},s.fn.isDisabled=function(){var e=s(this),t="disabled";return void 0!==e.prop(t)?e.prop(t):e.hasClass(t)};function e(e){s(e.currentTarget).removeClass(function(e,t){return(t.match(/\btooltipped-\S+/g)||[]).join(" ")}).removeClass("tooltipped").removeAttr("aria-label")}function r(e,t){s(e).addClass("tooltipped tooltipped-s").attr("aria-label",t)}function i(e,t){return s.extend(!0,{},e,t)}function t(){l=s(".toClipboard"),!ClipboardJS.isSupported()||/iPhone|iPad/i.test(navigator.userAgent)?l.find("img").hide(0):(l.each(function(){s(this).on("mouseleave",e).on("blur",e)}),new ClipboardJS(".toClipboard").on("error",function(e){var t,n;r(e.trigger,(t=e.action,n="cut"===t?"X":"C",/iPhone|iPad/i.test(navigator.userAgent)?"No support :(":/Mac/i.test(navigator.userAgent)?"Press ⌘-"+n+" to "+t:"Press Ctrl-"+n+" to "+t))}).on("success",function(e){r(e.trigger,"Copied!")}))}var l,_,f={in_array:function(e,t){try{return-1!==t.indexOf(e)}catch(e){return!1}},selectize_render_item:function(e,t){return'<div class="item wapk-selectize-item">'.concat(t(e.text),"</div>")},ajax_fail:function(e){console.warn(e),alert(e.hasOwnProperty("statusText")&&e.hasOwnProperty("status")?c.ajax.error+"\n"+e.statusText+" ("+e.status+")":e)},sortable:function(e,n,a,r){return(e||s(".sorted_table")).each(function(){var e=s(this),t=e.find("tbody > tr:eq(0) > td").length||a||9;e.wf_sortable(i({containerSelector:"table",itemPath:"> tbody",itemSelector:"tr",handle:"i.wf_sortedtable",placeholder:'<tr class="placeholder"><td colspan="'.concat(t,'"></td></tr>'),onDrop:function(e,t,n,a){e.removeClass(t.group.options.draggedClass).removeAttr("style"),s("body").removeClass(t.group.options.bodyClass),r&&"function"==typeof r&&r(e,t,n,a)}},n))})},selectize:function(e,t){return(e||s("select.selectize")).not(".selectized").each(function(){var e=s(this);e.selectize(i({create:e.data("create")||!1,plugins:e.data("plugins")?e.data("plugins").split(",").map(function(e){return e.trim()}):[],render:{item:f.selectize_render_item}},t))})},fancySelect:function(e,t){return(e||s("select.fancySelect")).not(".FancySelectInit").each(function(){s(this).fancySelect(i({maxItemShow:3},t))})},reindex_config_table:function(){s("#table-1").find("tbody tr").each(function(n,e){s(e).find("[name]").each(function(e,t){s(t).attr("name",s(t).attr("name").replace(/(\[\d\])/g,"[".concat(n,"]")))})})},common:function(){f.sortable(s(".sorted_table"),{},9,f.reindex_config_table),f.selectize(),f.fancySelect(s(".outputType"))}},d={form:null,init:function(){this.form=s(".generateFeed"),this.form.length&&(f.common(),s(n).trigger(new jQuery.Event("feedEditor.init",{target:this.form})))},renderMerchantInfo:function(n,a,r){function e(e){var t;r.hasOwnProperty(e)&&(n.find(".merchant-info-section."+e+" .data").html(r[e]),"feed_file_type"===e&&((t=r[e].split(",").map(function(e){return e.trim().toLowerCase()}).filter(function(e){return""!==e&&e!==c.na.toLowerCase()})).length?(a.find("option").removeAttr("selected").each(function(){var e=s(this);e.val()&&!f.in_array(e.val(),t)?e.disabled(!0):e.disabled(!1)}),1===t.length&&a.find('option[value="'+t[0]+'"]').attr("selected","selected")):a.find("option").disabled(!1)))}for(var t in r)e(t);n.find(".spinner").removeClass("is-active"),a.disabled(!1),a.trigger("change"),a.parent().find(".spinner").removeClass("is-active")},renderMerchantTemplate:function(n,a){function e(t){if(a.hasOwnProperty(t))if("tabs"===t)n.html(a[t]);else{var e=s('[name="'+t+'"]');e.length&&e.each(function(){var e=s(this);e.is("select")?e.find('[value="'+a[t]+'"]').prop("selected",!0):(e.is("[type=checkbox]")||e.is("[type=radio]"))&&e.val()===a[t]?e.prop("checked",!0):e.val(a[t])}).trigger("change")}}for(var t in a)e(t);d.init()}},u=[],p=[],h=function(){function e(){_classCallCheck(this,e),this._feed=c.generator.feed,this._limit=c.generator.limit,this._progress=0,this._timer=null,this._color=!1,this._total_batch=0,this._current_batch=0,this._product_ids=[],this._progress_per_batch=0,this._refresh=!0,this._regenerate=c.generator.regenerate,a.isRegenerating=!1,this._all_btn=s(".wpf_regenerate"),this._current_btn=s("#".concat(this._feed.replace("wf_config","wf_feed_"))),this._current_btn_label=""}return _createClass(e,[{key:"init",value:function(){var t=this;return""!==this._feed&&this._regenerate&&!1===a.isRegenerating&&this.generate(),s(n).on("click",".wpf_regenerate",function(e){e.preventDefault(),t._current_btn=s(this),t._current_btn.hasClass("disabled")||!0===a.isRegenerating||(t._feed=t._current_btn.attr("id").replace("wf_feed_","wf_config"),""!==t._feed&&t.generate())}),this}},{key:"_block_button",value:function(){this._all_btn.length&&this._all_btn.addClass("disabled"),this._current_btn.length&&(this._current_btn.find("span").addClass("wpf_spin reverse_spin"),this._current_btn_label=this._current_btn.attr("title"),this._current_btn.attr("aria-label",c.regenerate).attr("title",c.regenerate))}},{key:"_unblock_button",value:function(){this._all_btn.length&&this._all_btn.removeClass("disabled"),this._current_btn.length&&(this._current_btn.find("span").removeClass("wpf_spin"),this._current_btn.find("span").removeClass("reverse_spin"),this._current_btn.attr("aria-label",this._current_btn_label).attr("title",this._current_btn_label))}},{key:"generate",value:function(){var t=this,n=this;a.isRegenerating=!0,this._block_button(),this._resetProgressBar(),this._progressBarActive(),this._log("Counting Total Products"),this._updateProgressStatus("Fetching products."),this._get_product_ids().then(function(e){t._progress=10,n._log({response:e}),e.success?(n._log("Total ".concat(e.total," Products found.")),n._product_ids=e.product,n._total_batch=t._product_ids.length,n._current_batch=0,n._progress_per_batch=(90-t._progress)/t._total_batch,n._process_batch(),n._updateProgressStatus("Processing Products...")):n._updateProgressStatus(e.data.message)}).fail(function(e){n._log(e),n._updateProgressStatus(e.message),n._color="red",setTimeout(function(){n._stopProgressBar(),n._unblock_button()},1500)})}},{key:"_get_product_ids",value:function(){return this._progress=5,o.post("get_product_information",{_ajax_nonce:c.nonce,feed:this._feed,limit:this._limit})}},{key:"_process_batch",value:function(){var t=this,e="Processing Batch ".concat(this._current_batch+1," of ").concat(this._total_batch);this._updateProgressStatus(e),this._log(e),o.post("make_batch_feed",{_ajax_nonce:c.nonce,feed:this._feed,products:this._product_ids[this._current_batch],loop:this._current_batch}).then(function(e){t._current_batch++,t._log("Batch ".concat(t._current_batch," Completed")),t._log(e),t._current_batch<t._total_batch&&(t._process_batch(),t._progress+=t._progress_per_batch),t._current_batch===t._total_batch&&t._save_feed_file()}).fail(function(e){t._log(e),t._updateProgressStatus(e.message),t._color="red",setTimeout(function(){t._stopProgressBar(),t._unblock_button()},1500)})}},{key:"_save_feed_file",value:function(){var t=this;this._log("Saving feed file"),this._updateProgressStatus("Saving feed file"),o.post("save_feed_file",{_ajax_nonce:c.nonce,feed:this._feed}).then(function(e){t._log(e),t._progress=100,t._refresh&&(a.location.href="".concat(c.pages.list.feed,"&link=").concat(e.url,"&cat=").concat(e.cat)),setTimeout(function(){t._stopProgressBar(),setTimeout(function(){t._resetProgressBar(!0),t._unblock_button()},3e3)},2500)}).fail(function(e){t._log(e),t._updateProgressStatus(e.message),t._color="red",setTimeout(function(){t._stopProgressBar(),t._unblock_button()},1500)})}},{key:"_log",value:function(e){return c.wpf_debug&&console.log(e),this}},{key:"_progressBarActive",value:function(e){var t=0<arguments.length&&void 0!==e?e:0,n=this;return this._toggleProgressBar(!0),this._timer=setInterval(function(){n._updateProgressBar()},t||1e3),this}},{key:"_stopProgressBar",value:function(){return clearInterval(this._timer),this}},{key:"_resetProgressBar",value:function(e){return this._toggleProgressBar(!1),this._updateProgressStatus(""),clearInterval(this._timer),this._color=!1,this._timer=null,this._progress=0,e&&this._updateProgressBar(),this}},{key:"_toggleProgressBar",value:function(e){var t=s("#feed_progress_table");return e?t.show():t.hide(),this}},{key:"_updateProgressStatus",value:function(e){return s(".feed-progress-status").text(e),this}},{key:"_updateProgressBar",value:function(){var e=s(".feed-progress-percentage"),t=s(".feed-progress-bar-fill"),n="".concat(Math.round(this._progress),"%");t.css({width:n,background:this._color||"#3DC264"}),e.text(n)}}]),e}();a.wf={helper:f,feedEditor:d,generator:h},s(a).load(function(){null!==s(location).attr("href").match(/webappick.*feed/g)&&s("#wpbody-content").addClass("woofeed-body-content");var e=a.location.search;"edit-feed"===new URLSearchParams(e).get("action")&&s(".itemWrapper").show(),t(),postboxes.add_postbox_toggles(pagenow),(new h).init(),""!==c.generator.feed&&c.generator.regenerate,d.init(),f.common(),s(".wfmasterTooltip").hover(function(){var e=s(this),t=e.attr("wftitle");e.data("tipText",t).removeAttr("wftitle"),s('<p class="wftooltip"></p>').text(t).appendTo("body").fadeIn("slow")},function(){var e=s(this);e.attr("wftitle",e.data("tipText")),s(".wftooltip").remove()}).mousemove(function(e){s(".wftooltip").css({top:e.pageY+10,left:e.pageX+20})}),s(".generateFeed").validate(),s(n).on("click","[data-toggle_slide]",function(e){e.preventDefault(),s(s(this).data("toggle_slide")).slideToggle("fast")}).on("click","#wf_newRow",function(){var e=s("#table-1 tbody"),t=s("#feed_config_template").text().trim().replace(/__idx__/g,e.find("tr").length);e.append(t),f.fancySelect(s(".outputType"))}).on("click",".single-feed-delete",function(e){e.preventDefault(),confirm(c.form.del_confirm)&&(a.location.href=s(this).attr("val"))}).on("click",".wf_clean_cache_wrapper",function(e){e.preventDefault();var t=s(".woo-feed-clean-cache-nonce").val(),n=s(".woo-feed-cache-loader");n.show(),o.post("clear_cache_data",{_ajax_clean_nonce:t}).then(function(e){e.success&&n.hide()}).fail(function(e){console.log("something wrong")})}).on("change",".wf_attr.wf_attributes",function(e){e.preventDefault(),s(".fancy-picker-picked").trigger("click");var t,n,a=s(this).val(),r=s(this).parents("tr").find(".outputType"),i=s(this).parents("tr").find(".fancy-picker-content .fancy-picker-option"),o=s(this).parents("tr").find(".fancy-picker-data span");""!==a&&-1!==a.indexOf("wf_taxo")&&(t="for_custom_taxo",n="parent_if_empty"),["price","current_price","sale_price","price_with_tax","current_price_with_tax","sale_price_with_tax"].includes(a)&&(t="for_price",n="Price"),i.removeClass("selected"),"for_custom_taxo"!==t&&"for_price"!==t||i.each(function(e){n===s(this).text()&&(s(this).addClass("selected"),o.text(n),r.find("option").text(n),r.find("option").val(s(this).data("value")))})}).on("click","#doaction, #doaction2",function(){return confirm(c.form.del_confirm_multi)}).on("change",".dType",function(){var e=s(this),t=e.val(),n=e.closest("tr");"pattern"===t?(n.find(".value_attribute").hide(),n.find(".value_pattern").show()):"attribute"===t?(n.find(".value_attribute").show(),n.find(".value_pattern").hide()):"remove"===t&&(n.find(".value_attribute").hide(),n.find(".value_pattern").hide())}).on("click",".delRow",function(e){e.preventDefault(),s(this).closest("tr").remove(),f.reindex_config_table()}).on("submit","#generateFeed",function(){s(this).validate(),s(this).valid()&&s(".makeFeedResponse").show().html('<b style="color: darkblue;"><i class="dashicons dashicons-sos wpf_spin"></i> '.concat(c.form.generate,"</b>"))}).on("submit","#updatefeed",function(e,t){s(this).validate(),s(this).valid()&&s(".makeFeedResponse").show().html('<b style="color: darkblue;"><i class="dashicons dashicons-sos wpf_spin"></i> '.concat(t&&t.save?c.form.save:c.form.generate,"</b>"))}).on("change",".ftporsftp",function(){var e=s(this).val(),t=s(".ssh2_status");"sftp"===e?(t.show().css("color","dodgerblue").text(c.form.sftp_checking),o.post("get_ssh2_status",{_ajax_nonce:c.nonce,server:e}).then(function(e){"exists"===e?(t.css("color","#2CC185").text(c.form.sftp_available),setTimeout(function(){t.hide()},1500)):t.show().css("color","red").text(c.form.sftp_warning)}).fail(function(e){t.hide(),f.ajax_fail(e)})):t.hide()}).on("click",'[name="save_feed_config"]',function(e){e.preventDefault(),s("#updatefeed").trigger("submit",{save:!0})}).on("change","#provider",function(e){if(e.preventDefault(),s(this).closest(".generateFeed").hasClass("add-new")){var t=s(this).val(),n=s("#feedType"),a=s("#providerPage"),r=s("#feed_merchant_info");a.html('<h3><span style="float:none;margin: -3px 0 0;" class="spinner is-active"></span> '+c.form.loading_tmpl+"</h3>"),r.find(".spinner").addClass("is-active"),n.disabled(!0),n.parent().find(".spinner").addClass("is-active"),r.find(".merchant-info-section .data").html(""),u.hasOwnProperty(t)?d.renderMerchantInfo(r,n,u[t]):o.send("woo_feed_get_merchant_info",{type:"GET",data:{nonce:c.nonce,provider:t}}).then(function(e){u[t]=e,d.renderMerchantInfo(r,n,e)}).fail(f.ajax_fail),p.hasOwnProperty(t)?d.renderMerchantTemplate(a,p[t]):o.post("get_feed_merchant",{_ajax_nonce:c.nonce,merchant:t}).then(function(e){p[t]=e,d.renderMerchantTemplate(a,e),"bing"===t&&(s("#delimiter option").removeAttr("selected"),s('#delimiter option[value="tab"]').attr("selected","selected"),s("#enclosure option").removeAttr("selected"),s('#enclosure option[value=" "]').attr("selected","selected")),"google_product_review"!==t&&s('.wf_attributes option[value="reviewer_name"]').hide()}).fail(f.ajax_fail)}}).on("change",".woo_feed_status_input",function(){var e=s(this);o.post("update_feed_status",{_ajax_nonce:c.nonce,feedName:e.val(),status:e[0].checked?1:0})}),s(n).on("change",'[name="is_outOfStock"], [name="product_visibility"]',function(){var e=s(".out-of-stock-visibility");"n"===s('[name="is_outOfStock"]:checked').val()&&"1"===s('[name="product_visibility"]:checked').val()?e.show():e.hide()}).on("change",".attr_type",function(){var e=s(this),t=e.val(),n=e.closest("tr");"pattern"===t?(n.find(".wf_attr").hide(),n.find(".wf_attr").val(""),n.find(".wf_default").show()):(n.find(".wf_attr").show(),n.find(".wf_default").hide(),n.find(".wf_default").val(""))}).on("change",".wf_mattributes, .attr_type",function(){var e=s(this).closest("tr"),t=e.find(".wf_mattributes"),n=e.find(".attr_type"),a=e.find("td:eq(4)"),r=s("#provider").val();if(c.form.google_category.hasOwnProperty(t.val())&&"pattern"===n.val()&&f.in_array(r,c.form.google_category[t.val()])){if(0===a.find("select.selectize").length){a.find("input.wf_default").remove(),a.append('<span class="wf_default wf_attributes"><select name="default[]" class="selectize"></select></span>'),a.append('<span style="font-size:x-small;"><a style="color: red" href="http://webappick.helpscoutdocs.com/article/19-how-to-map-store-category-with-merchant-category" target="_blank">'.concat(c.learn_more,"</a></span>")),_||a.append('<span class="spinner is-active" style="margin: 0;"></span>');var i=a.find(".wf_attributes select");f.selectize(i,{preload:!0,placeholder:c.form.select_category,load:function(e,t){_?t(_):o.send("get_google_categories",{type:"GET",data:{_ajax_nonce:c.nonce,action:"get_google_categories",provider:r}}).then(function(e){t(_=e),a.find(".spinner").remove()}).fail(f.ajax_fail)}})}}else"current_category"!==t.val()&&0===a.find("input.wf_default").length&&(a.find("span").remove(),a.append('<input autocomplete="off" class="wf_default wf_attributes" type="text" name="default[]" value="">'),"pattern"!==n.val()&&a.find("input.wf_default").hide())}).on("change","#feedType,#provider",function(){var e=s("#feedType").val(),t=s("#provider").val(),n=s(".itemWrapper"),a=s(".wf_csvtxt");""!==e&&f.in_array(t,c.form.item_wrapper_hidden)?n.hide():"xml"===e?(n.show(),a.hide()):"csv"===e||"txt"===e?(n.hide(),a.show()):(n.hide(),a.hide())}).trigger("change")})}(jQuery,window,document,wp.ajax,wpf_ajax_obj);
2
+ //# sourceMappingURL=woo-feed-admin.min.js.map
includes/classes/class-woo-feed-list-table.php CHANGED
@@ -357,7 +357,7 @@ class Woo_Feed_List_Table {
357
  * @access public
358
  */
359
  public function no_items() {
360
- _e( 'No items found.' );
361
  }
362
 
363
  /**
@@ -492,9 +492,9 @@ class Woo_Feed_List_Table {
492
  return;
493
  }
494
 
495
- echo '<label for="bulk-action-selector-' . esc_attr( $which ) . '" class="screen-reader-text">' . __( 'Select bulk action' ) . '</label>';
496
  echo '<select name="action' . $two . '" id="bulk-action-selector-' . esc_attr( $which ) . "\">\n";
497
- echo '<option value="-1">' . __( 'Bulk Actions' ) . "</option>\n";
498
 
499
  foreach ( $this->_actions as $name => $title ) {
500
  $class = 'edit' === $name ? ' class="hide-if-no-js"' : '';
@@ -504,7 +504,7 @@ class Woo_Feed_List_Table {
504
 
505
  echo "</select>\n";
506
 
507
- submit_button( __( 'Apply' ), 'action', '', false, array( 'id' => "doaction$two" ) );
508
  echo "\n";
509
  }
510
 
@@ -558,7 +558,7 @@ class Woo_Feed_List_Table {
558
  }
559
  $out .= '</div>';
560
 
561
- $out .= '<button type="button" class="toggle-row"><span class="screen-reader-text">' . __( 'Show more details' ) . '</span></button>';
562
 
563
  return $out;
564
  }
@@ -627,9 +627,9 @@ class Woo_Feed_List_Table {
627
 
628
  $m = isset( $_GET['m'] ) ? (int) $_GET['m'] : 0;
629
  ?>
630
- <label for="filter-by-date" class="screen-reader-text"><?php _e( 'Filter by date' ); ?></label>
631
  <select name="m" id="filter-by-date">
632
- <option<?php selected( $m, 0 ); ?> value="0"><?php _e( 'All dates' ); ?></option>
633
  <?php
634
  foreach ( $months as $arc_row ) {
635
  if ( 0 == $arc_row->year ) {
@@ -644,7 +644,7 @@ class Woo_Feed_List_Table {
644
  selected( $m, $year . $month, false ),
645
  esc_attr( $arc_row->year . $month ),
646
  /* translators: 1: month name, 2: 4-digit year */
647
- sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $month ), $year )
648
  );
649
  }
650
  ?>
@@ -697,15 +697,15 @@ class Woo_Feed_List_Table {
697
  $approved_comments_number = number_format_i18n( $approved_comments );
698
  $pending_comments_number = number_format_i18n( $pending_comments );
699
 
700
- $approved_only_phrase = sprintf( _n( '%s comment', '%s comments', $approved_comments ), $approved_comments_number );
701
- $approved_phrase = sprintf( _n( '%s approved comment', '%s approved comments', $approved_comments ), $approved_comments_number );
702
- $pending_phrase = sprintf( _n( '%s pending comment', '%s pending comments', $pending_comments ), $pending_comments_number );
703
 
704
  // No comments at all.
705
  if ( ! $approved_comments && ! $pending_comments ) {
706
  printf(
707
  '<span aria-hidden="true">—</span><span class="screen-reader-text">%s</span>',
708
- __( 'No comments' )
709
  );
710
  // Approved comments have different display depending on some conditions.
711
  } elseif ( $approved_comments ) {
@@ -727,7 +727,7 @@ class Woo_Feed_List_Table {
727
  printf(
728
  '<span class="post-com-count post-com-count-no-comments"><span class="comment-count comment-count-no-comments" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></span>',
729
  $approved_comments_number,
730
- $pending_comments ? __( 'No approved comments' ) : __( 'No comments' )
731
  );
732
  }
733
 
@@ -750,7 +750,7 @@ class Woo_Feed_List_Table {
750
  printf(
751
  '<span class="post-com-count post-com-count-pending post-com-count-no-pending"><span class="comment-count comment-count-no-pending" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></span>',
752
  $pending_comments_number,
753
- $approved_comments ? __( 'No pending comments' ) : __( 'No comments' )
754
  );
755
  }
756
  }
@@ -829,7 +829,7 @@ class Woo_Feed_List_Table {
829
  $this->screen->render_screen_reader_content( 'heading_pagination' );
830
  }
831
 
832
- $output = '<span class="displaying-num">' . sprintf( _n( '%s item', '%s items', $total_items ), number_format_i18n( $total_items ) ) . '</span>';
833
 
834
  $current = $this->get_pagenum();
835
 
@@ -865,7 +865,7 @@ class Woo_Feed_List_Table {
865
  $page_links[] = sprintf(
866
  "<a class='first-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
867
  esc_url( remove_query_arg( 'paged', $current_url ) ),
868
- __( 'First page' ),
869
  '&laquo;'
870
  );
871
  }
@@ -876,24 +876,24 @@ class Woo_Feed_List_Table {
876
  $page_links[] = sprintf(
877
  "<a class='prev-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
878
  esc_url( add_query_arg( 'paged', max( 1, $current - 1 ), $current_url ) ),
879
- __( 'Previous page' ),
880
  '&lsaquo;'
881
  );
882
  }
883
 
884
  if ( 'bottom' === $which ) {
885
  $html_current_page = $current;
886
- $total_pages_before = '<span class="screen-reader-text">' . __( 'Current Page' ) . '</span><span id="table-paging" class="paging-input">';
887
  } else {
888
  $html_current_page = sprintf(
889
  "%s<input class='current-page' id='current-page-selector' type='text' name='paged' value='%s' size='%d' aria-describedby='table-paging' />",
890
- '<label for="current-page-selector" class="screen-reader-text">' . __( 'Current Page' ) . '</label>',
891
  $current,
892
  strlen( $total_pages )
893
  );
894
  }
895
  $html_total_pages = sprintf( "<span class='total-pages'>%s</span>", number_format_i18n( $total_pages ) );
896
- $page_links[] = $total_pages_before . sprintf( _x( '%1$s of %2$s', 'paging' ), $html_current_page, $html_total_pages ) . $total_pages_after;
897
 
898
  if ( $disable_next ) {
899
  $page_links[] = '<span class="tablenav-pages-navspan button disabled" aria-hidden="true">&rsaquo;</span>';
@@ -901,7 +901,7 @@ class Woo_Feed_List_Table {
901
  $page_links[] = sprintf(
902
  "<a class='next-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
903
  esc_url( add_query_arg( 'paged', min( $total_pages, $current + 1 ), $current_url ) ),
904
- __( 'Next page' ),
905
  '&rsaquo;'
906
  );
907
  }
@@ -912,7 +912,7 @@ class Woo_Feed_List_Table {
912
  $page_links[] = sprintf(
913
  "<a class='last-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
914
  esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),
915
- __( 'Last page' ),
916
  '&raquo;'
917
  );
918
  }
@@ -1142,7 +1142,7 @@ class Woo_Feed_List_Table {
1142
 
1143
  if ( ! empty( $columns['cb'] ) ) {
1144
  static $cb_counter = 1;
1145
- $columns['cb'] = '<label class="screen-reader-text" for="cb-select-all-' . $cb_counter . '">' . __( 'Select All' ) . '</label>'
1146
  . '<input id="cb-select-all-' . $cb_counter . '" type="checkbox" />';
1147
  $cb_counter++;
1148
  }
@@ -1406,7 +1406,7 @@ class Woo_Feed_List_Table {
1406
  * @return string The row actions HTML, or an empty string if the current column is the primary column.
1407
  */
1408
  protected function handle_row_actions( $item, $column_name, $primary ) {
1409
- return $column_name === $primary ? '<button type="button" class="toggle-row"><span class="screen-reader-text">' . __( 'Show more details' ) . '</span></button>' : '';
1410
  }
1411
 
1412
  /**
@@ -1431,7 +1431,7 @@ class Woo_Feed_List_Table {
1431
 
1432
  if ( isset( $this->_pagination_args['total_items'] ) ) {
1433
  $response['total_items_i18n'] = sprintf(
1434
- _n( '%s item', '%s items', $this->_pagination_args['total_items'] ),
1435
  number_format_i18n( $this->_pagination_args['total_items'] )
1436
  );
1437
  }
357
  * @access public
358
  */
359
  public function no_items() {
360
+ _e( 'No items found.', 'woo-feed' );
361
  }
362
 
363
  /**
492
  return;
493
  }
494
 
495
+ echo '<label for="bulk-action-selector-' . esc_attr( $which ) . '" class="screen-reader-text">' . __( 'Select bulk action', 'woo-feed' ) . '</label>';
496
  echo '<select name="action' . $two . '" id="bulk-action-selector-' . esc_attr( $which ) . "\">\n";
497
+ echo '<option value="-1">' . __( 'Bulk Actions', 'woo-feed' ) . "</option>\n";
498
 
499
  foreach ( $this->_actions as $name => $title ) {
500
  $class = 'edit' === $name ? ' class="hide-if-no-js"' : '';
504
 
505
  echo "</select>\n";
506
 
507
+ submit_button( __( 'Apply', 'woo-feed' ), 'action', '', false, array( 'id' => "doaction$two" ) );
508
  echo "\n";
509
  }
510
 
558
  }
559
  $out .= '</div>';
560
 
561
+ $out .= '<button type="button" class="toggle-row"><span class="screen-reader-text">' . __( 'Show more details', 'woo-feed' ) . '</span></button>';
562
 
563
  return $out;
564
  }
627
 
628
  $m = isset( $_GET['m'] ) ? (int) $_GET['m'] : 0;
629
  ?>
630
+ <label for="filter-by-date" class="screen-reader-text"><?php _e( 'Filter by date', 'woo-feed' ); ?></label>
631
  <select name="m" id="filter-by-date">
632
+ <option<?php selected( $m, 0 ); ?> value="0"><?php _e( 'All dates', 'woo-feed' ); ?></option>
633
  <?php
634
  foreach ( $months as $arc_row ) {
635
  if ( 0 == $arc_row->year ) {
644
  selected( $m, $year . $month, false ),
645
  esc_attr( $arc_row->year . $month ),
646
  /* translators: 1: month name, 2: 4-digit year */
647
+ sprintf( __( '%1$s %2$d', 'woo-feed' ), $wp_locale->get_month( $month ), $year )
648
  );
649
  }
650
  ?>
697
  $approved_comments_number = number_format_i18n( $approved_comments );
698
  $pending_comments_number = number_format_i18n( $pending_comments );
699
 
700
+ $approved_only_phrase = sprintf( _n( '%s comment', '%s comments', $approved_comments, 'woo-feed' ), $approved_comments_number );
701
+ $approved_phrase = sprintf( _n( '%s approved comment', '%s approved comments', $approved_comments, 'woo-feed' ), $approved_comments_number );
702
+ $pending_phrase = sprintf( _n( '%s pending comment', '%s pending comments', $pending_comments, 'woo-feed' ), $pending_comments_number );
703
 
704
  // No comments at all.
705
  if ( ! $approved_comments && ! $pending_comments ) {
706
  printf(
707
  '<span aria-hidden="true">—</span><span class="screen-reader-text">%s</span>',
708
+ __( 'No comments', 'woo-feed' )
709
  );
710
  // Approved comments have different display depending on some conditions.
711
  } elseif ( $approved_comments ) {
727
  printf(
728
  '<span class="post-com-count post-com-count-no-comments"><span class="comment-count comment-count-no-comments" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></span>',
729
  $approved_comments_number,
730
+ $pending_comments ? __( 'No approved comments', 'woo-feed' ) : __( 'No comments', 'woo-feed' )
731
  );
732
  }
733
 
750
  printf(
751
  '<span class="post-com-count post-com-count-pending post-com-count-no-pending"><span class="comment-count comment-count-no-pending" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></span>',
752
  $pending_comments_number,
753
+ $approved_comments ? __( 'No pending comments', 'woo-feed' ) : __( 'No comments', 'woo-feed' )
754
  );
755
  }
756
  }
829
  $this->screen->render_screen_reader_content( 'heading_pagination' );
830
  }
831
 
832
+ $output = '<span class="displaying-num">' . sprintf( _n( '%s item', '%s items', $total_items, 'woo-feed' ), number_format_i18n( $total_items ) ) . '</span>';
833
 
834
  $current = $this->get_pagenum();
835
 
865
  $page_links[] = sprintf(
866
  "<a class='first-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
867
  esc_url( remove_query_arg( 'paged', $current_url ) ),
868
+ __( 'First page', 'woo-feed' ),
869
  '&laquo;'
870
  );
871
  }
876
  $page_links[] = sprintf(
877
  "<a class='prev-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
878
  esc_url( add_query_arg( 'paged', max( 1, $current - 1 ), $current_url ) ),
879
+ __( 'Previous page', 'woo-feed' ),
880
  '&lsaquo;'
881
  );
882
  }
883
 
884
  if ( 'bottom' === $which ) {
885
  $html_current_page = $current;
886
+ $total_pages_before = '<span class="screen-reader-text">' . __( 'Current Page', 'woo-feed' ) . '</span><span id="table-paging" class="paging-input">';
887
  } else {
888
  $html_current_page = sprintf(
889
  "%s<input class='current-page' id='current-page-selector' type='text' name='paged' value='%s' size='%d' aria-describedby='table-paging' />",
890
+ '<label for="current-page-selector" class="screen-reader-text">' . __( 'Current Page', 'woo-feed' ) . '</label>',
891
  $current,
892
  strlen( $total_pages )
893
  );
894
  }
895
  $html_total_pages = sprintf( "<span class='total-pages'>%s</span>", number_format_i18n( $total_pages ) );
896
+ $page_links[] = $total_pages_before . sprintf( _x( '%1$s of %2$s', 'paging', 'woo-feed' ), $html_current_page, $html_total_pages ) . $total_pages_after;
897
 
898
  if ( $disable_next ) {
899
  $page_links[] = '<span class="tablenav-pages-navspan button disabled" aria-hidden="true">&rsaquo;</span>';
901
  $page_links[] = sprintf(
902
  "<a class='next-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
903
  esc_url( add_query_arg( 'paged', min( $total_pages, $current + 1 ), $current_url ) ),
904
+ __( 'Next page', 'woo-feed' ),
905
  '&rsaquo;'
906
  );
907
  }
912
  $page_links[] = sprintf(
913
  "<a class='last-page button' href='%s'><span class='screen-reader-text'>%s</span><span aria-hidden='true'>%s</span></a>",
914
  esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),
915
+ __( 'Last page', 'woo-feed' ),
916
  '&raquo;'
917
  );
918
  }
1142
 
1143
  if ( ! empty( $columns['cb'] ) ) {
1144
  static $cb_counter = 1;
1145
+ $columns['cb'] = '<label class="screen-reader-text" for="cb-select-all-' . $cb_counter . '">' . __( 'Select All', 'woo-feed' ) . '</label>'
1146
  . '<input id="cb-select-all-' . $cb_counter . '" type="checkbox" />';
1147
  $cb_counter++;
1148
  }
1406
  * @return string The row actions HTML, or an empty string if the current column is the primary column.
1407
  */
1408
  protected function handle_row_actions( $item, $column_name, $primary ) {
1409
+ return $column_name === $primary ? '<button type="button" class="toggle-row"><span class="screen-reader-text">' . __( 'Show more details', 'woo-feed' ) . '</span></button>' : '';
1410
  }
1411
 
1412
  /**
1431
 
1432
  if ( isset( $this->_pagination_args['total_items'] ) ) {
1433
  $response['total_items_i18n'] = sprintf(
1434
+ _n( '%s item', '%s items', $this->_pagination_args['total_items'], 'woo-feed' ),
1435
  number_format_i18n( $this->_pagination_args['total_items'] )
1436
  );
1437
  }
includes/feeds/merchant_templates.php CHANGED
@@ -2692,7 +2692,7 @@ return array(
2692
  'price',
2693
  'description',
2694
  'image',
2695
- '',
2696
  ),
2697
  'default' => array( '', '', '', '', '', '', '' ),
2698
  'suffix' => array( '', '', '', '', '', '', '' ),
2692
  'price',
2693
  'description',
2694
  'image',
2695
+ 'shipping_class',
2696
  ),
2697
  'default' => array( '', '', '', '', '', '', '' ),
2698
  'suffix' => array( '', '', '', '', '', '', '' ),
libs/WebAppick/AppServices/Insights.php CHANGED
@@ -329,7 +329,7 @@ class Insights {
329
  */
330
  protected function data_we_collect() {
331
  $data = [
332
- esc_html__( 'Server environment details (php, mysql, server, WordPress versions).', 'webappick' ),
333
  ];
334
  $data = apply_filters( $this->client->getSlug() . '_what_tracked', $data );
335
 
@@ -452,7 +452,7 @@ class Insights {
452
  apply_filters(
453
  $this->client->getSlug() . '_tracking_default_notice_message',
454
  /* translators: 1: plugin name */
455
- esc_html__( 'Want to help make %1$s even more awesome? Allow %1$s to collect non-sensitive diagnostic data and usage information.', 'webappick' )
456
  ),
457
  '<strong>' . esc_html( $this->client->getName() ) . '</strong>'
458
  );
@@ -460,13 +460,13 @@ class Insights {
460
  $notice = $this->notice;
461
  }
462
 
463
- $notice .= ' (<a class="' . $this->client->getSlug() . '-insights-data-we-collect" href="#">' . esc_html__( 'what we collect', 'webappick' ) . '</a>)';
464
- $notice .= '<p class="description" style="display:none;">' . implode( ', ', $this->data_we_collect() ) . '. ' . esc_html__( 'No sensitive data is tracked.', 'webappick' ) . '</p>';
465
  echo '<div class="updated"><p>';
466
  echo $notice; // phpcs:ignore xss ok
467
  echo '</p><p class="submit">';
468
- echo '&nbsp;<a href="' . esc_url( $this->get_opt_out_url() ) . '" class="button button-secondary">' . esc_html__( 'No thanks', 'webappick' ) . '</a>';
469
- echo '&nbsp;<a href="' . esc_url( $this->get_opt_in_url() ) . '" class="button button-primary">' . esc_html__( 'Allow', 'webappick' ) . '</a>';
470
  echo '</p></div>';
471
  echo "<script type='text/javascript'>jQuery('." . esc_attr( $this->client->getSlug() ) . "-insights-data-we-collect').on('click', function(e) {
472
  e.preventDefault();
@@ -684,7 +684,7 @@ class Insights {
684
  public function add_weekly_schedule( $schedules ) {
685
  $schedules['weekly'] = [
686
  'interval' => DAY_IN_SECONDS * 7,
687
- 'display' => __( 'Once Weekly', 'webappick' ),
688
  ];
689
 
690
  return $schedules;
@@ -746,51 +746,51 @@ class Insights {
746
  $reasons = [
747
  [
748
  'id' => 'could-not-understand',
749
- 'text' => esc_html__( 'I couldn\'t understand how to make it work', 'webappick' ),
750
  'type' => 'textarea',
751
- 'placeholder' => esc_html__( 'Would you like us to assist you?', 'webappick' ),
752
  ],
753
  [
754
  'id' => 'found-better-plugin',
755
- 'text' => esc_html__( 'I found a better plugin', 'webappick' ),
756
  'type' => 'text',
757
- 'placeholder' => esc_html__( 'Which plugin?', 'webappick' ),
758
  ],
759
  [
760
  'id' => 'not-have-that-feature',
761
- 'text' => esc_html__( 'The plugin is great, but I need specific feature that you don\'t support', 'webappick' ),
762
  'type' => 'textarea',
763
- 'placeholder' => esc_html__( 'Could you tell us more about that feature?', 'webappick' ),
764
  ],
765
  [
766
  'id' => 'is-not-working',
767
- 'text' => esc_html__( 'The plugin is not working', 'webappick' ),
768
  'type' => 'textarea',
769
- 'placeholder' => esc_html__( 'Could you tell us a bit more whats not working?', 'webappick' ),
770
  ],
771
  [
772
  'id' => 'looking-for-other',
773
- 'text' => esc_html__( 'It\'s not what I was looking for', 'webappick' ),
774
  'type' => '',
775
  'placeholder' => '',
776
  ],
777
  [
778
  'id' => 'did-not-work-as-expected',
779
- 'text' => esc_html__( 'The plugin didn\'t work as expected', 'webappick' ),
780
  'type' => 'textarea',
781
- 'placeholder' => esc_html__( 'What did you expect?', 'webappick' ),
782
  ],
783
  [
784
  'id' => 'debugging',
785
- 'text' => esc_html__( 'Temporary deactivation for debugging', 'webappick' ),
786
  'type' => '',
787
  'placeholder' => '',
788
  ],
789
  [
790
  'id' => 'other',
791
- 'text' => esc_html__( 'Other', 'webappick' ),
792
  'type' => 'textarea',
793
- 'placeholder' => esc_html__( 'Could you tell us a bit more?', 'webappick' ),
794
  ],
795
  ];
796
  $extra = apply_filters( $this->client->getSlug() . '_extra_uninstall_reasons', [], $reasons );
@@ -810,7 +810,7 @@ class Insights {
810
  public function uninstall_reason_submission() {
811
  check_ajax_referer( $this->client->getSlug() . '_insight_action' );
812
  if ( ! isset( $_POST['reason_id'] ) ) {
813
- wp_send_json_error( esc_html__( 'Invalid Request', 'webappick' ) );
814
  wp_die();
815
  }
816
  $current_user = wp_get_current_user();
@@ -860,8 +860,8 @@ class Insights {
860
  wp_send_json_error(
861
  sprintf(
862
  '<p class="mui-error">%s<br>%s</p>',
863
- esc_html__( 'Something Went Wrong.', 'webappick' ),
864
- esc_html__( 'Please try again after sometime.', 'webappick' )
865
  )
866
  );
867
  wp_die();
@@ -917,7 +917,7 @@ class Insights {
917
  } else {
918
  $this->supportResponse = sprintf(
919
  '<h3>%s</h3>',
920
- esc_html__( 'Thank you -- Support Ticket Submitted.', 'webappick' )
921
  );
922
  }
923
  wp_send_json_success( $this->supportResponse );
@@ -934,13 +934,13 @@ class Insights {
934
  } else {
935
  $this->supportErrorResponse = sprintf(
936
  '<div class="mui-error"><p>%s</p></div>',
937
- esc_html__( 'Something Went Wrong. Please Try Again After Sometime.', 'webappick' )
938
  );
939
  }
940
  wp_send_json_error( $this->supportErrorResponse );
941
  }
942
  } else {
943
- wp_send_json_error( sprintf( '<p class="mui-error">%s</p>', esc_html__( 'Missing Required Fields.', 'webappick' ) ) );
944
  }
945
  wp_die();
946
  }
@@ -960,12 +960,12 @@ class Insights {
960
  $displayName = ( ! empty( $admin_user->first_name ) && ! empty( $admin_user->last_name ) ) ? $admin_user->first_name . ' ' . $admin_user->last_name : $admin_user->display_name;
961
  $showSupportTicket = ( ! empty( $this->ticketTemplate ) && ! empty( $this->ticketRecipient ) && ! empty( $this->supportURL ) );
962
  ?>
963
- <div class="wapk-dr-modal" id="<?php echo esc_attr( $this->client->getSlug() ); ?>-wapk-dr-modal" aria-label="<?php /* translators: 1: Plugin Name */ printf( esc_attr__( '&ldquo;%s&rdquo; Uninstall Confirmation', 'webappick' ), esc_attr( $this->client->getName() ) ); ?>" role="dialog" aria-modal="true">
964
  <?php if ( $showSupportTicket ) { ?>
965
  <div class="wapk-dr-modal-wrap support" style="display: none;">
966
  <div class="wapk-dr-modal-header">
967
- <h3><?php esc_html_e( 'Submit Support Ticket.', 'webappick' ); ?></h3>
968
- <a href="javascript:void 0;" class="wapk-dr-modal-close" aria-label="<?php esc_attr_e( 'Close', 'webappick' ); ?>">
969
  <!--suppress HtmlUnknownAttribute -->
970
  <svg class="" focusable="false" viewBox="0 0 24 24" aria-hidden="true" role="presentation">
971
  <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"></path>
@@ -974,33 +974,33 @@ class Insights {
974
  </div>
975
  <div class="wapk-dr-modal-body">
976
  <div class="wapk-row mui col-2 col-left">
977
- <label for="wapk-support-name" class="<?php echo ! empty( $displayName ) ? 'shrink' : ''; ?>"><?php esc_html_e( 'Name', 'webappick' ); ?></label>
978
  <div class="wapk-form-control">
979
  <input type="text" name="name" id="wapk-support-name" value="<?php echo esc_attr( $displayName ); ?>" required>
980
  </div>
981
  </div>
982
  <div class="wapk-row mui col-2 col-right">
983
- <label for="wapk-support-email" class="shrink"><?php esc_html_e( 'Email', 'webappick' ); ?></label>
984
  <div class="wapk-form-control">
985
  <input type="email" name="email" id="wapk-support-email" value="<?php echo esc_attr( $admin_user->user_email ); ?>" required>
986
  </div>
987
  </div>
988
  <div class="clear"></div>
989
  <div class="wapk-row mui col-2 col-left">
990
- <label for="wapk-support-subject"><?php esc_html_e( 'Subject', 'webappick' ); ?></label>
991
  <div class="wapk-form-control">
992
  <input type="text" name="subject" id="wapk-support-subject" required>
993
  </div>
994
  </div>
995
  <div class="wapk-row mui col-2 col-right">
996
- <label for="wapk-support-website" class="shrink"><?php esc_html_e( 'Website', 'webappick' ); ?></label>
997
  <div class="wapk-form-control">
998
  <input type="url" name="website" id="wapk-support-website" value="<?php echo esc_url( site_url() ); ?>" required>
999
  </div>
1000
  </div>
1001
  <div class="clear"></div>
1002
  <div class="wapk-row mui">
1003
- <label for="wapk-support-message"><?php esc_html_e( 'Message', 'webappick' ); ?></label>
1004
  <div class="wapk-form-control">
1005
  <textarea id="wapk-support-message" name='message' rows="11" required></textarea>
1006
  </div>
@@ -1010,15 +1010,15 @@ class Insights {
1010
  </div>
1011
  </div>
1012
  <div class="wapk-dr-modal-footer">
1013
- <button class="button button-primary send-ticket"><?php esc_html_e( 'Send Message', 'webappick' ); ?></button>
1014
- <button class="button button-secondary close-ticket"><?php esc_html_e( 'Cancel', 'webappick' ); ?></button>
1015
  </div>
1016
  </div>
1017
  <?php } ?>
1018
  <div class="wapk-dr-modal-wrap reason">
1019
  <div class="wapk-dr-modal-header">
1020
- <h3><?php esc_html_e( 'If you have a moment, please let us know why you are deactivating:', 'webappick' ); ?></h3>
1021
- <a href="javascript:void 0;" class="wapk-dr-modal-close" aria-label="<?php esc_attr_e( 'Close', 'webappick' ); ?>">
1022
  <!--suppress HtmlUnknownAttribute -->
1023
  <svg class="" focusable="false" viewBox="0 0 24 24" aria-hidden="true" role="presentation">
1024
  <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"></path>
@@ -1036,19 +1036,19 @@ class Insights {
1036
  <div class="response" style="<?php echo ( $showSupportTicket ) ? 'display: block;' : ''; ?>">
1037
  <div class="wrapper">
1038
  <?php if ( $showSupportTicket ) { ?>
1039
- <p><?php esc_html_e( 'In trouble? Please submit a support request.', 'webappick' ); ?></p>
1040
  <p>
1041
- <a href="#" class="button button-secondary not-interested"><?php esc_html_e( 'Not Interested', 'webappick' ); ?></a>
1042
- <button class="button button-primary open-ticket-form"><?php esc_html_e( 'Open Support Ticket', 'webappick' ); ?></button>
1043
  </p>
1044
  <?php } ?>
1045
  </div>
1046
  </div>
1047
  </div>
1048
  <div class="wapk-dr-modal-footer">
1049
- <a href="#" class="button button-link dont-bother-me disabled"><?php esc_html_e( 'I rather wouldn\'t say', 'webappick' ); ?></a>
1050
- <button class="button button-secondary deactivate disabled"><?php esc_html_e( 'Submit & Deactivate', 'webappick' ); ?></button>
1051
- <button class="button button-primary modal-close disabled"><?php esc_html_e( 'Cancel', 'webappick' ); ?></button>
1052
  </div>
1053
  </div>
1054
  </div>
@@ -1147,7 +1147,7 @@ class Insights {
1147
  }, data ), // add default action if action is empty.
1148
  beforeSend: function () {
1149
  buttonElem.addClass("disabled");
1150
- buttonElem.text('<?php esc_html_e( 'Processing...', 'webappick' ); ?>');
1151
  },
1152
  complete: function (event, xhr, options) {
1153
  if ('string' === typeof cb) {
329
  */
330
  protected function data_we_collect() {
331
  $data = [
332
+ esc_html__( 'Server environment details (php, mysql, server, WordPress versions).', 'woo-feed' ),
333
  ];
334
  $data = apply_filters( $this->client->getSlug() . '_what_tracked', $data );
335
 
452
  apply_filters(
453
  $this->client->getSlug() . '_tracking_default_notice_message',
454
  /* translators: 1: plugin name */
455
+ esc_html__( 'Want to help make %1$s even more awesome? Allow %1$s to collect non-sensitive diagnostic data and usage information.', 'woo-feed' )
456
  ),
457
  '<strong>' . esc_html( $this->client->getName() ) . '</strong>'
458
  );
460
  $notice = $this->notice;
461
  }
462
 
463
+ $notice .= ' (<a class="' . $this->client->getSlug() . '-insights-data-we-collect" href="#">' . esc_html__( 'what we collect', 'woo-feed' ) . '</a>)';
464
+ $notice .= '<p class="description" style="display:none;">' . implode( ', ', $this->data_we_collect() ) . '. ' . esc_html__( 'No sensitive data is tracked.', 'woo-feed' ) . '</p>';
465
  echo '<div class="updated"><p>';
466
  echo $notice; // phpcs:ignore xss ok
467
  echo '</p><p class="submit">';
468
+ echo '&nbsp;<a href="' . esc_url( $this->get_opt_out_url() ) . '" class="button button-secondary">' . esc_html__( 'No thanks', 'woo-feed' ) . '</a>';
469
+ echo '&nbsp;<a href="' . esc_url( $this->get_opt_in_url() ) . '" class="button button-primary">' . esc_html__( 'Allow', 'woo-feed' ) . '</a>';
470
  echo '</p></div>';
471
  echo "<script type='text/javascript'>jQuery('." . esc_attr( $this->client->getSlug() ) . "-insights-data-we-collect').on('click', function(e) {
472
  e.preventDefault();
684
  public function add_weekly_schedule( $schedules ) {
685
  $schedules['weekly'] = [
686
  'interval' => DAY_IN_SECONDS * 7,
687
+ 'display' => __( 'Once Weekly', 'woo-feed' ),
688
  ];
689
 
690
  return $schedules;
746
  $reasons = [
747
  [
748
  'id' => 'could-not-understand',
749
+ 'text' => esc_html__( 'I couldn\'t understand how to make it work', 'woo-feed' ),
750
  'type' => 'textarea',
751
+ 'placeholder' => esc_html__( 'Would you like us to assist you?', 'woo-feed' ),
752
  ],
753
  [
754
  'id' => 'found-better-plugin',
755
+ 'text' => esc_html__( 'I found a better plugin', 'woo-feed' ),
756
  'type' => 'text',
757
+ 'placeholder' => esc_html__( 'Which plugin?', 'woo-feed' ),
758
  ],
759
  [
760
  'id' => 'not-have-that-feature',
761
+ 'text' => esc_html__( 'The plugin is great, but I need specific feature that you don\'t support', 'woo-feed' ),
762
  'type' => 'textarea',
763
+ 'placeholder' => esc_html__( 'Could you tell us more about that feature?', 'woo-feed' ),
764
  ],
765
  [
766
  'id' => 'is-not-working',
767
+ 'text' => esc_html__( 'The plugin is not working', 'woo-feed' ),
768
  'type' => 'textarea',
769
+ 'placeholder' => esc_html__( 'Could you tell us a bit more whats not working?', 'woo-feed' ),
770
  ],
771
  [
772
  'id' => 'looking-for-other',
773
+ 'text' => esc_html__( 'It\'s not what I was looking for', 'woo-feed' ),
774
  'type' => '',
775
  'placeholder' => '',
776
  ],
777
  [
778
  'id' => 'did-not-work-as-expected',
779
+ 'text' => esc_html__( 'The plugin didn\'t work as expected', 'woo-feed' ),
780
  'type' => 'textarea',
781
+ 'placeholder' => esc_html__( 'What did you expect?', 'woo-feed' ),
782
  ],
783
  [
784
  'id' => 'debugging',
785
+ 'text' => esc_html__( 'Temporary deactivation for debugging', 'woo-feed' ),
786
  'type' => '',
787
  'placeholder' => '',
788
  ],
789
  [
790
  'id' => 'other',
791
+ 'text' => esc_html__( 'Other', 'woo-feed' ),
792
  'type' => 'textarea',
793
+ 'placeholder' => esc_html__( 'Could you tell us a bit more?', 'woo-feed' ),
794
  ],
795
  ];
796
  $extra = apply_filters( $this->client->getSlug() . '_extra_uninstall_reasons', [], $reasons );
810
  public function uninstall_reason_submission() {
811
  check_ajax_referer( $this->client->getSlug() . '_insight_action' );
812
  if ( ! isset( $_POST['reason_id'] ) ) {
813
+ wp_send_json_error( esc_html__( 'Invalid Request', 'woo-feed' ) );
814
  wp_die();
815
  }
816
  $current_user = wp_get_current_user();
860
  wp_send_json_error(
861
  sprintf(
862
  '<p class="mui-error">%s<br>%s</p>',
863
+ esc_html__( 'Something Went Wrong.', 'woo-feed' ),
864
+ esc_html__( 'Please try again after sometime.', 'woo-feed' )
865
  )
866
  );
867
  wp_die();
917
  } else {
918
  $this->supportResponse = sprintf(
919
  '<h3>%s</h3>',
920
+ esc_html__( 'Thank you -- Support Ticket Submitted.', 'woo-feed' )
921
  );
922
  }
923
  wp_send_json_success( $this->supportResponse );
934
  } else {
935
  $this->supportErrorResponse = sprintf(
936
  '<div class="mui-error"><p>%s</p></div>',
937
+ esc_html__( 'Something Went Wrong. Please Try Again After Sometime.', 'woo-feed' )
938
  );
939
  }
940
  wp_send_json_error( $this->supportErrorResponse );
941
  }
942
  } else {
943
+ wp_send_json_error( sprintf( '<p class="mui-error">%s</p>', esc_html__( 'Missing Required Fields.', 'woo-feed' ) ) );
944
  }
945
  wp_die();
946
  }
960
  $displayName = ( ! empty( $admin_user->first_name ) && ! empty( $admin_user->last_name ) ) ? $admin_user->first_name . ' ' . $admin_user->last_name : $admin_user->display_name;
961
  $showSupportTicket = ( ! empty( $this->ticketTemplate ) && ! empty( $this->ticketRecipient ) && ! empty( $this->supportURL ) );
962
  ?>
963
+ <div class="wapk-dr-modal" id="<?php echo esc_attr( $this->client->getSlug() ); ?>-wapk-dr-modal" aria-label="<?php /* translators: 1: Plugin Name */ printf( esc_attr__( '&ldquo;%s&rdquo; Uninstall Confirmation', 'woo-feed' ), esc_attr( $this->client->getName() ) ); ?>" role="dialog" aria-modal="true">
964
  <?php if ( $showSupportTicket ) { ?>
965
  <div class="wapk-dr-modal-wrap support" style="display: none;">
966
  <div class="wapk-dr-modal-header">
967
+ <h3><?php esc_html_e( 'Submit Support Ticket.', 'woo-feed' ); ?></h3>
968
+ <a href="javascript:void 0;" class="wapk-dr-modal-close" aria-label="<?php esc_attr_e( 'Close', 'woo-feed' ); ?>">
969
  <!--suppress HtmlUnknownAttribute -->
970
  <svg class="" focusable="false" viewBox="0 0 24 24" aria-hidden="true" role="presentation">
971
  <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"></path>
974
  </div>
975
  <div class="wapk-dr-modal-body">
976
  <div class="wapk-row mui col-2 col-left">
977
+ <label for="wapk-support-name" class="<?php echo ! empty( $displayName ) ? 'shrink' : ''; ?>"><?php esc_html_e( 'Name', 'woo-feed' ); ?></label>
978
  <div class="wapk-form-control">
979
  <input type="text" name="name" id="wapk-support-name" value="<?php echo esc_attr( $displayName ); ?>" required>
980
  </div>
981
  </div>
982
  <div class="wapk-row mui col-2 col-right">
983
+ <label for="wapk-support-email" class="shrink"><?php esc_html_e( 'Email', 'woo-feed' ); ?></label>
984
  <div class="wapk-form-control">
985
  <input type="email" name="email" id="wapk-support-email" value="<?php echo esc_attr( $admin_user->user_email ); ?>" required>
986
  </div>
987
  </div>
988
  <div class="clear"></div>
989
  <div class="wapk-row mui col-2 col-left">
990
+ <label for="wapk-support-subject"><?php esc_html_e( 'Subject', 'woo-feed' ); ?></label>
991
  <div class="wapk-form-control">
992
  <input type="text" name="subject" id="wapk-support-subject" required>
993
  </div>
994
  </div>
995
  <div class="wapk-row mui col-2 col-right">
996
+ <label for="wapk-support-website" class="shrink"><?php esc_html_e( 'Website', 'woo-feed' ); ?></label>
997
  <div class="wapk-form-control">
998
  <input type="url" name="website" id="wapk-support-website" value="<?php echo esc_url( site_url() ); ?>" required>
999
  </div>
1000
  </div>
1001
  <div class="clear"></div>
1002
  <div class="wapk-row mui">
1003
+ <label for="wapk-support-message"><?php esc_html_e( 'Message', 'woo-feed' ); ?></label>
1004
  <div class="wapk-form-control">
1005
  <textarea id="wapk-support-message" name='message' rows="11" required></textarea>
1006
  </div>
1010
  </div>
1011
  </div>
1012
  <div class="wapk-dr-modal-footer">
1013
+ <button class="button button-primary send-ticket"><?php esc_html_e( 'Send Message', 'woo-feed' ); ?></button>
1014
+ <button class="button button-secondary close-ticket"><?php esc_html_e( 'Cancel', 'woo-feed' ); ?></button>
1015
  </div>
1016
  </div>
1017
  <?php } ?>
1018
  <div class="wapk-dr-modal-wrap reason">
1019
  <div class="wapk-dr-modal-header">
1020
+ <h3><?php esc_html_e( 'If you have a moment, please let us know why you are deactivating:', 'woo-feed' ); ?></h3>
1021
+ <a href="javascript:void 0;" class="wapk-dr-modal-close" aria-label="<?php esc_attr_e( 'Close', 'woo-feed' ); ?>">
1022
  <!--suppress HtmlUnknownAttribute -->
1023
  <svg class="" focusable="false" viewBox="0 0 24 24" aria-hidden="true" role="presentation">
1024
  <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"></path>
1036
  <div class="response" style="<?php echo ( $showSupportTicket ) ? 'display: block;' : ''; ?>">
1037
  <div class="wrapper">
1038
  <?php if ( $showSupportTicket ) { ?>
1039
+ <p><?php esc_html_e( 'In trouble? Please submit a support request.', 'woo-feed' ); ?></p>
1040
  <p>
1041
+ <a href="#" class="button button-secondary not-interested"><?php esc_html_e( 'Not Interested', 'woo-feed' ); ?></a>
1042
+ <button class="button button-primary open-ticket-form"><?php esc_html_e( 'Open Support Ticket', 'woo-feed' ); ?></button>
1043
  </p>
1044
  <?php } ?>
1045
  </div>
1046
  </div>
1047
  </div>
1048
  <div class="wapk-dr-modal-footer">
1049
+ <a href="#" class="button button-link dont-bother-me disabled"><?php esc_html_e( 'I rather wouldn\'t say', 'woo-feed' ); ?></a>
1050
+ <button class="button button-secondary deactivate disabled"><?php esc_html_e( 'Submit & Deactivate', 'woo-feed' ); ?></button>
1051
+ <button class="button button-primary modal-close disabled"><?php esc_html_e( 'Cancel', 'woo-feed' ); ?></button>
1052
  </div>
1053
  </div>
1054
  </div>
1147
  }, data ), // add default action if action is empty.
1148
  beforeSend: function () {
1149
  buttonElem.addClass("disabled");
1150
+ buttonElem.text('<?php esc_html_e( 'Processing...', 'woo-feed' ); ?>');
1151
  },
1152
  complete: function (event, xhr, options) {
1153
  if ('string' === typeof cb) {
libs/WebAppick/AppServices/License.php CHANGED
@@ -178,8 +178,8 @@ class License {
178
  <p><?php
179
  printf(
180
  /* translators: 1: Warning in bold tag, 2: This plugin name, 3: API Host Name, 4: WP_ACCESSIBLE_HOSTS constant */
181
- esc_html__( '%1$s You\'re blocking external requests which means you won\'t be able to get %2$s updates. Please add %3$s to %4$s.', 'webappick' ),
182
- '<b>'. esc_html__( 'Warning!', 'webappick' ).'</b>',
183
  esc_html( $this->client->getName() ),
184
  '<strong>' . esc_html( $host ) . '</strong>',
185
  '<code>WP_ACCESSIBLE_HOSTS</code>'
@@ -195,7 +195,7 @@ class License {
195
  <p><?php
196
  printf(
197
  /* translators: 1: This plugin name, 2: Plugin/Theme, 3: Activation Page URL, 4: This Plugin Name */
198
- esc_html__( 'The %1$s API Key has not been activated, so the %2$s is inactive! %3$s to activate %4$s.', 'webappick' ),
199
  '<strong>' . esc_attr( $this->client->getName() ) . '</strong>',
200
  esc_attr( $this->client->getType() ),
201
  '<a href="' . esc_url( admin_url( 'admin.php?page=' . $this->menu_args['menu_slug'] ) ) . '">'. esc_html__( 'Click here', 'woo-feed' ) .'</a>',
@@ -344,7 +344,7 @@ class License {
344
  if ( ! in_array( $action, array_keys( $actions ) ) ) {
345
  return [
346
  'success' => false,
347
- 'error' => esc_html__( 'Invalid Request Action.', 'webappick' ),
348
  ];
349
  }
350
  // parse license data
@@ -353,7 +353,7 @@ class License {
353
  if ( ! $this->validate_license_data( $license ) ) {
354
  return [
355
  'success' => false,
356
- 'error' => esc_html__( 'Invalid/Empty License Data.', 'webappick' ),
357
  ];
358
  }
359
 
@@ -390,7 +390,7 @@ class License {
390
  if ( empty( $response ) || ! isset( $response['success'] ) || ( isset( $response['success'] ) && ! $response['success'] ) ) {
391
  return [
392
  'success' => false,
393
- 'error' => isset( $response['error'] ) ? sanitize_text_field( $response['error'] ) : esc_html__( 'Unknown error occurred, Please try again.', 'webappick' ),
394
  'code' => isset( $response['code'] ) ? sanitize_text_field( $response['code'] ) : 'UNKNOWN',
395
  'data' => isset( $response['data'] ) ? sanitize_text_field( $response['data'] ) : '',
396
  ];
@@ -449,8 +449,8 @@ class License {
449
  }
450
  $defaults = [
451
  'type' => 'menu', // Can be: menu, options, submenu.
452
- 'page_title' => esc_html__( 'Manage License', 'webappick' ),
453
- 'menu_title' => esc_html__( 'Manage License', 'webappick' ),
454
  'capability' => 'manage_options',
455
  'menu_slug' => $this->client->getSlug() . '-manage-license',
456
  'icon_url' => '',
@@ -500,7 +500,7 @@ class License {
500
  $need_prod_id = empty( $this->client->getProductId() );
501
  ?>
502
  <div class="wrap webappick-license-settings-wrapper">
503
- <h1 class="wp-heading-inline"><?php esc_html_e( 'License Settings', 'webappick' ); ?></h1>
504
  <hr class="wp-header-end">
505
  <?php do_action( 'before_webappick_' . $this->client->getSlug() . '_license_section' ); ?>
506
  <div class="webappick-license-settings webappick-license-section">
@@ -509,7 +509,7 @@ class License {
509
  <?php if ( 'activate' == $action ) { ?>
510
  <p><?php
511
  /* translators: %s: This Plugin Name */
512
- printf( esc_html__( 'Active %s by your license key to get professional support and automatic update from your WordPress dashboard.', 'webappick' ), '<strong>' . esc_html( $this->client->getName() ) . '</strong>' );
513
  ?></p>
514
  <?php } ?>
515
  <form method="post" action="<?php $this->formActionUrl(); ?>" spellcheck="false" autocomplete="off">
@@ -521,10 +521,10 @@ class License {
521
  <svg enable-background="new 0 0 512 512" version="1.1" viewBox="0 0 512 512" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
522
  <path d="m463.75 48.251c-64.336-64.336-169.01-64.335-233.35 1e-3 -43.945 43.945-59.209 108.71-40.181 167.46l-185.82 185.82c-2.813 2.813-4.395 6.621-4.395 10.606v84.858c0 8.291 6.709 15 15 15h84.858c3.984 0 7.793-1.582 10.605-4.395l21.211-21.226c3.237-3.237 4.819-7.778 4.292-12.334l-2.637-22.793 31.582-2.974c7.178-0.674 12.847-6.343 13.521-13.521l2.974-31.582 22.793 2.651c4.233 0.571 8.496-0.85 11.704-3.691 3.193-2.856 5.024-6.929 5.024-11.206v-27.929h27.422c3.984 0 7.793-1.582 10.605-4.395l38.467-37.958c58.74 19.043 122.38 4.929 166.33-39.046 64.336-64.335 64.336-169.01 0-233.35zm-42.435 106.07c-17.549 17.549-46.084 17.549-63.633 0s-17.549-46.084 0-63.633 46.084-17.549 63.633 0 17.548 46.084 0 63.633z"/>
523
  </svg>
524
- <label for="license_key" class="screen-reader-text"><?php esc_html_e( 'License Key', 'webappick' ); ?></label>
525
  <input class="regular-text" id="license_key" type="text"
526
  value="<?php echo esc_attr( $this->get_input_license_value( $action, $this->license ) ); ?>"
527
- placeholder="<?php esc_attr_e( 'Enter your license key to activate', 'webappick' ); ?>"
528
  name="<?php echo esc_attr( $this->data_key ); ?>[license_key]"<?php readonly( ( 'deactivate' == $action ), true, true ); ?>
529
  autocomplete="off" required>
530
  </div>
@@ -546,10 +546,10 @@ class License {
546
  <path d="m305.429 98.857h38.857v68.856h68.856v38.857h-137.705v30h167.705v-167.713h-167.713v98.643h30zm68.857 0h38.856v38.856h-38.856z"/>
547
  </g>
548
  </svg>
549
- <label for="product_id" class="screen-reader-text"><?php esc_html_e( 'Product ID', 'webappick' ); ?></label>
550
  <input class="regular-text" id="product_id" type="text"
551
  value="<?php echo esc_attr( $this->license['product_id'] ); ?>"
552
- placeholder="<?php esc_attr_e( 'Product ID', 'webappick' ); ?>"
553
  name="<?php echo esc_attr( $this->data_key ); ?>[product_id]"<?php readonly( ( 'deactivate' == $action ), true, true ); ?>
554
  autocomplete="off" required>
555
  </div>
@@ -570,10 +570,10 @@ class License {
570
  <path d="m305.429 98.857h38.857v68.856h68.856v38.857h-137.705v30h167.705v-167.713h-167.713v98.643h30zm68.857 0h38.856v38.856h-38.856z"/>
571
  </g>
572
  </svg>
573
- <label for="product_id" class="screen-reader-text"><?php esc_html_e( 'Select License Type', 'webappick' ); ?></label>
574
  <input type="hidden" name="<?php echo esc_attr( $this->data_key ); ?>[product_id]" value="<?php echo esc_attr( $this->client->getName() ); ?>">
575
  <select class="regular-text" id="product_id" name="<?php echo esc_attr( $this->data_key ); ?>[product_id]" <?php readonly( ( 'deactivate' == $action ), true ); ?><?php disabled( ( 'deactivate' == $action ), true ); ?>>
576
- <option value="" disabled selected><?php esc_html_e( 'Select A License Type', 'webappick' ); ?></option>
577
  <?php
578
  foreach ( $this->product_data as $id => $item ) {
579
  if( is_array( $item ) && isset( $item['label'], $item['products'] ) && is_array( $item['products'] ) ) {
@@ -607,9 +607,9 @@ class License {
607
  </div>
608
  <!-- /.input-group -->
609
  <button type="submit" name="<?php echo esc_attr( $this->data_key); ?>[submit]" class="<?php printf( '%s-button', esc_attr( $action ) );?>"><?php
610
- 'activate' == $action ? esc_html_e( 'Activate License', 'webappick' ) : esc_html_e( 'Deactivate License', 'webappick' );
611
  ?></button>
612
- <a href="http://webappick.com/my-account/api-keys/" class="button button-primary button-hero" style="margin-left: 20px;font-size: 17px;line-height: 2.5;" target="_blank"><?php esc_html_e( 'Manage License', 'webappick' ); ?></a>
613
  </div>
614
  </form>
615
  <?php $this->show_active_license_info(); ?>
@@ -857,34 +857,34 @@ class License {
857
  ?>
858
  <div class="active-license-info">
859
  <div class="single-license-info">
860
- <h3><?php esc_html_e( 'Status:', 'webappick' ); ?></h3>
861
- <p class="<?php echo esc_attr( $status ); ?>"><?php 'active' == $status ? esc_html_e( 'Active', 'webappick' ) : esc_html_e( 'Inactive', 'webappick' ); ?></p>
862
  </div>
863
  <?php if ( false !== $unlimited ) { ?>
864
  <div class="single-license-info">
865
- <h3><?php esc_html_e( 'Activation Limit:', 'webappick' ); ?></h3>
866
- <p class="active"><?php esc_html_e( 'Unlimited', 'webappick' ); ?></p>
867
  </div>
868
  <div class="single-license-info">
869
- <h3><?php esc_html_e( 'Total Activation:', 'webappick' ); ?></h3>
870
  <p class="active"><?php echo esc_attr( $activations ); ?></p>
871
  </div>
872
  <?php } else { ?>
873
  <div class="single-license-info">
874
- <h3><?php esc_html_e( 'Activation Remaining:', 'webappick' ); ?></h3>
875
  <p class="<?php echo $remaining ? 'active' : 'inactive'; ?>"><?php
876
  if ( 'active' == $status ) {
877
  /* translators: 1: Remaining activation, 2: Total activation */
878
- printf( esc_html__( '%1$d out of %2$d', 'webappick' ), esc_attr( $remaining ), esc_attr( $limit ) );
879
  } else {
880
- esc_html_e( 'N/A', 'webappick' );
881
  }
882
  ?></p>
883
  </div>
884
  <?php } ?>
885
  <div class="single-license-info">
886
- <h3><?php esc_html_e( 'Automatic Update:', 'webappick' ); ?></h3>
887
- <p class="<?php echo esc_attr( $status ); ?>"><?php 'active' == $status ? esc_html_e( 'Enabled', 'webappick' ) : esc_html_e( 'Disabled', 'webappick' ); ?></p>
888
  </div>
889
  </div>
890
  <?php
@@ -903,7 +903,7 @@ class License {
903
  <path d="m150 85.849c-13.111 0-23.775 10.665-23.775 23.775v25.319h47.548v-25.319c-1e-3 -13.108-10.665-23.775-23.773-23.775z"/>
904
  <path d="m150 1e-3c-82.839 0-150 67.158-150 150 0 82.837 67.156 150 150 150s150-67.161 150-150c0-82.839-67.161-150-150-150zm46.09 227.12h-92.173c-9.734 0-17.626-7.892-17.626-17.629v-56.919c0-8.491 6.007-15.582 14.003-17.25v-25.697c0-27.409 22.3-49.711 49.711-49.711 27.409 0 49.709 22.3 49.709 49.711v25.697c7.993 1.673 14 8.759 14 17.25v56.919h2e-3c0 9.736-7.892 17.629-17.626 17.629z"/>
905
  </svg>
906
- <span><?php esc_html_e( 'Activate License', 'webappick' ); ?></span>
907
  </div>
908
  <?php
909
  }
@@ -916,7 +916,7 @@ class License {
916
  */
917
  private function activate_client_license( $postData ) {
918
  if ( empty( $postData['license_key'] ) ) {
919
- $this->error = esc_html__('The license key field is required.', 'webappick' );
920
  return;
921
  }
922
 
@@ -928,7 +928,7 @@ class License {
928
  if ( ! $deactivate['success'] ) {
929
  $check = $this->check(); // check api status.
930
  if ( $check['success'] && 'inactive' !== $check['status_check'] ) {
931
- $this->error = $deactivate['error'] ? $deactivate['error'] : esc_html__( 'Unknown error occurred.', 'webappick' );
932
  return;
933
  }
934
  }
@@ -939,7 +939,7 @@ class License {
939
  if ( empty( $license['instance'] ) ) $license['instance'] = $this->generateInstanceId();
940
  $response = $this->activate( $license );
941
  if ( ! $response['success'] ) {
942
- $this->error = $response['error'] ? $response['error'] : esc_html__( 'Unknown error occurred.', 'webappick' );
943
  return;
944
  }
945
  // Don't reset the key.
@@ -957,9 +957,9 @@ class License {
957
  );
958
  $this->setLicense( $license );
959
  if ( ! $updateKey ) {
960
- $this->success = esc_html__( 'License activated successfully.', 'webappick' );
961
  } else {
962
- $this->success = esc_html__( 'License Updated successfully.', 'webappick' );
963
  }
964
  }
965
 
@@ -970,20 +970,20 @@ class License {
970
  */
971
  private function deactivate_client_license() {
972
  if ( ! isset( $this->license['key'] ) || empty( $this->license['key'] ) ) {
973
- $this->error = esc_html__( 'License key not found.', 'webappick' );
974
  } else {
975
  $response = $this->deactivate();
976
  if ( ! $response['success'] ) {
977
  // check api status.
978
  $check = $this->check();
979
  if ( $check['success'] && 'inactive' !== $check['status_check'] ) {
980
- $this->error = $response['error'] ? $response['error'] : esc_html__( 'Unknown error occurred.', 'webappick' );
981
  }
982
  }
983
  }
984
  // keep the instance key for reference.
985
  $this->setLicense( [ 'instance' => $this->license['instance'] ] );
986
- $this->success = esc_html__( 'License deactivated successfully.', 'webappick' );
987
  }
988
 
989
  /**
178
  <p><?php
179
  printf(
180
  /* translators: 1: Warning in bold tag, 2: This plugin name, 3: API Host Name, 4: WP_ACCESSIBLE_HOSTS constant */
181
+ esc_html__( '%1$s You\'re blocking external requests which means you won\'t be able to get %2$s updates. Please add %3$s to %4$s.', 'woo-feed' ),
182
+ '<b>'. esc_html__( 'Warning!', 'woo-feed' ).'</b>',
183
  esc_html( $this->client->getName() ),
184
  '<strong>' . esc_html( $host ) . '</strong>',
185
  '<code>WP_ACCESSIBLE_HOSTS</code>'
195
  <p><?php
196
  printf(
197
  /* translators: 1: This plugin name, 2: Plugin/Theme, 3: Activation Page URL, 4: This Plugin Name */
198
+ esc_html__( 'The %1$s API Key has not been activated, so the %2$s is inactive! %3$s to activate %4$s.', 'woo-feed' ),
199
  '<strong>' . esc_attr( $this->client->getName() ) . '</strong>',
200
  esc_attr( $this->client->getType() ),
201
  '<a href="' . esc_url( admin_url( 'admin.php?page=' . $this->menu_args['menu_slug'] ) ) . '">'. esc_html__( 'Click here', 'woo-feed' ) .'</a>',
344
  if ( ! in_array( $action, array_keys( $actions ) ) ) {
345
  return [
346
  'success' => false,
347
+ 'error' => esc_html__( 'Invalid Request Action.', 'woo-feed' ),
348
  ];
349
  }
350
  // parse license data
353
  if ( ! $this->validate_license_data( $license ) ) {
354
  return [
355
  'success' => false,
356
+ 'error' => esc_html__( 'Invalid/Empty License Data.', 'woo-feed' ),
357
  ];
358
  }
359
 
390
  if ( empty( $response ) || ! isset( $response['success'] ) || ( isset( $response['success'] ) && ! $response['success'] ) ) {
391
  return [
392
  'success' => false,
393
+ 'error' => isset( $response['error'] ) ? sanitize_text_field( $response['error'] ) : esc_html__( 'Unknown error occurred, Please try again.', 'woo-feed' ),
394
  'code' => isset( $response['code'] ) ? sanitize_text_field( $response['code'] ) : 'UNKNOWN',
395
  'data' => isset( $response['data'] ) ? sanitize_text_field( $response['data'] ) : '',
396
  ];
449
  }
450
  $defaults = [
451
  'type' => 'menu', // Can be: menu, options, submenu.
452
+ 'page_title' => esc_html__( 'Manage License', 'woo-feed' ),
453
+ 'menu_title' => esc_html__( 'Manage License', 'woo-feed' ),
454
  'capability' => 'manage_options',
455
  'menu_slug' => $this->client->getSlug() . '-manage-license',
456
  'icon_url' => '',
500
  $need_prod_id = empty( $this->client->getProductId() );
501
  ?>
502
  <div class="wrap webappick-license-settings-wrapper">
503
+ <h1 class="wp-heading-inline"><?php esc_html_e( 'License Settings', 'woo-feed' ); ?></h1>
504
  <hr class="wp-header-end">
505
  <?php do_action( 'before_webappick_' . $this->client->getSlug() . '_license_section' ); ?>
506
  <div class="webappick-license-settings webappick-license-section">
509
  <?php if ( 'activate' == $action ) { ?>
510
  <p><?php
511
  /* translators: %s: This Plugin Name */
512
+ printf( esc_html__( 'Active %s by your license key to get professional support and automatic update from your WordPress dashboard.', 'woo-feed' ), '<strong>' . esc_html( $this->client->getName() ) . '</strong>' );
513
  ?></p>
514
  <?php } ?>
515
  <form method="post" action="<?php $this->formActionUrl(); ?>" spellcheck="false" autocomplete="off">
521
  <svg enable-background="new 0 0 512 512" version="1.1" viewBox="0 0 512 512" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
522
  <path d="m463.75 48.251c-64.336-64.336-169.01-64.335-233.35 1e-3 -43.945 43.945-59.209 108.71-40.181 167.46l-185.82 185.82c-2.813 2.813-4.395 6.621-4.395 10.606v84.858c0 8.291 6.709 15 15 15h84.858c3.984 0 7.793-1.582 10.605-4.395l21.211-21.226c3.237-3.237 4.819-7.778 4.292-12.334l-2.637-22.793 31.582-2.974c7.178-0.674 12.847-6.343 13.521-13.521l2.974-31.582 22.793 2.651c4.233 0.571 8.496-0.85 11.704-3.691 3.193-2.856 5.024-6.929 5.024-11.206v-27.929h27.422c3.984 0 7.793-1.582 10.605-4.395l38.467-37.958c58.74 19.043 122.38 4.929 166.33-39.046 64.336-64.335 64.336-169.01 0-233.35zm-42.435 106.07c-17.549 17.549-46.084 17.549-63.633 0s-17.549-46.084 0-63.633 46.084-17.549 63.633 0 17.548 46.084 0 63.633z"/>
523
  </svg>
524
+ <label for="license_key" class="screen-reader-text"><?php esc_html_e( 'License Key', 'woo-feed' ); ?></label>
525
  <input class="regular-text" id="license_key" type="text"
526
  value="<?php echo esc_attr( $this->get_input_license_value( $action, $this->license ) ); ?>"
527
+ placeholder="<?php esc_attr_e( 'Enter your license key to activate', 'woo-feed' ); ?>"
528
  name="<?php echo esc_attr( $this->data_key ); ?>[license_key]"<?php readonly( ( 'deactivate' == $action ), true, true ); ?>
529
  autocomplete="off" required>
530
  </div>
546
  <path d="m305.429 98.857h38.857v68.856h68.856v38.857h-137.705v30h167.705v-167.713h-167.713v98.643h30zm68.857 0h38.856v38.856h-38.856z"/>
547
  </g>
548
  </svg>
549
+ <label for="product_id" class="screen-reader-text"><?php esc_html_e( 'Product ID', 'woo-feed' ); ?></label>
550
  <input class="regular-text" id="product_id" type="text"
551
  value="<?php echo esc_attr( $this->license['product_id'] ); ?>"
552
+ placeholder="<?php esc_attr_e( 'Product ID', 'woo-feed' ); ?>"
553
  name="<?php echo esc_attr( $this->data_key ); ?>[product_id]"<?php readonly( ( 'deactivate' == $action ), true, true ); ?>
554
  autocomplete="off" required>
555
  </div>
570
  <path d="m305.429 98.857h38.857v68.856h68.856v38.857h-137.705v30h167.705v-167.713h-167.713v98.643h30zm68.857 0h38.856v38.856h-38.856z"/>
571
  </g>
572
  </svg>
573
+ <label for="product_id" class="screen-reader-text"><?php esc_html_e( 'Select License Type', 'woo-feed' ); ?></label>
574
  <input type="hidden" name="<?php echo esc_attr( $this->data_key ); ?>[product_id]" value="<?php echo esc_attr( $this->client->getName() ); ?>">
575
  <select class="regular-text" id="product_id" name="<?php echo esc_attr( $this->data_key ); ?>[product_id]" <?php readonly( ( 'deactivate' == $action ), true ); ?><?php disabled( ( 'deactivate' == $action ), true ); ?>>
576
+ <option value="" disabled selected><?php esc_html_e( 'Select A License Type', 'woo-feed' ); ?></option>
577
  <?php
578
  foreach ( $this->product_data as $id => $item ) {
579
  if( is_array( $item ) && isset( $item['label'], $item['products'] ) && is_array( $item['products'] ) ) {
607
  </div>
608
  <!-- /.input-group -->
609
  <button type="submit" name="<?php echo esc_attr( $this->data_key); ?>[submit]" class="<?php printf( '%s-button', esc_attr( $action ) );?>"><?php
610
+ 'activate' == $action ? esc_html_e( 'Activate License', 'woo-feed' ) : esc_html_e( 'Deactivate License', 'woo-feed' );
611
  ?></button>
612
+ <a href="http://webappick.com/my-account/api-keys/" class="button button-primary button-hero" style="margin-left: 20px;font-size: 17px;line-height: 2.5;" target="_blank"><?php esc_html_e( 'Manage License', 'woo-feed' ); ?></a>
613
  </div>
614
  </form>
615
  <?php $this->show_active_license_info(); ?>
857
  ?>
858
  <div class="active-license-info">
859
  <div class="single-license-info">
860
+ <h3><?php esc_html_e( 'Status:', 'woo-feed' ); ?></h3>
861
+ <p class="<?php echo esc_attr( $status ); ?>"><?php 'active' == $status ? esc_html_e( 'Active', 'woo-feed' ) : esc_html_e( 'Inactive', 'woo-feed' ); ?></p>
862
  </div>
863
  <?php if ( false !== $unlimited ) { ?>
864
  <div class="single-license-info">
865
+ <h3><?php esc_html_e( 'Activation Limit:', 'woo-feed' ); ?></h3>
866
+ <p class="active"><?php esc_html_e( 'Unlimited', 'woo-feed' ); ?></p>
867
  </div>
868
  <div class="single-license-info">
869
+ <h3><?php esc_html_e( 'Total Activation:', 'woo-feed' ); ?></h3>
870
  <p class="active"><?php echo esc_attr( $activations ); ?></p>
871
  </div>
872
  <?php } else { ?>
873
  <div class="single-license-info">
874
+ <h3><?php esc_html_e( 'Activation Remaining:', 'woo-feed' ); ?></h3>
875
  <p class="<?php echo $remaining ? 'active' : 'inactive'; ?>"><?php
876
  if ( 'active' == $status ) {
877
  /* translators: 1: Remaining activation, 2: Total activation */
878
+ printf( esc_html__( '%1$d out of %2$d', 'woo-feed' ), esc_attr( $remaining ), esc_attr( $limit ) );
879
  } else {
880
+ esc_html_e( 'N/A', 'woo-feed' );
881
  }
882
  ?></p>
883
  </div>
884
  <?php } ?>
885
  <div class="single-license-info">
886
+ <h3><?php esc_html_e( 'Automatic Update:', 'woo-feed' ); ?></h3>
887
+ <p class="<?php echo esc_attr( $status ); ?>"><?php 'active' == $status ? esc_html_e( 'Enabled', 'woo-feed' ) : esc_html_e( 'Disabled', 'woo-feed' ); ?></p>
888
  </div>
889
  </div>
890
  <?php
903
  <path d="m150 85.849c-13.111 0-23.775 10.665-23.775 23.775v25.319h47.548v-25.319c-1e-3 -13.108-10.665-23.775-23.773-23.775z"/>
904
  <path d="m150 1e-3c-82.839 0-150 67.158-150 150 0 82.837 67.156 150 150 150s150-67.161 150-150c0-82.839-67.161-150-150-150zm46.09 227.12h-92.173c-9.734 0-17.626-7.892-17.626-17.629v-56.919c0-8.491 6.007-15.582 14.003-17.25v-25.697c0-27.409 22.3-49.711 49.711-49.711 27.409 0 49.709 22.3 49.709 49.711v25.697c7.993 1.673 14 8.759 14 17.25v56.919h2e-3c0 9.736-7.892 17.629-17.626 17.629z"/>
905
  </svg>
906
+ <span><?php esc_html_e( 'Activate License', 'woo-feed' ); ?></span>
907
  </div>
908
  <?php
909
  }
916
  */
917
  private function activate_client_license( $postData ) {
918
  if ( empty( $postData['license_key'] ) ) {
919
+ $this->error = esc_html__('The license key field is required.', 'woo-feed' );
920
  return;
921
  }
922
 
928
  if ( ! $deactivate['success'] ) {
929
  $check = $this->check(); // check api status.
930
  if ( $check['success'] && 'inactive' !== $check['status_check'] ) {
931
+ $this->error = $deactivate['error'] ? $deactivate['error'] : esc_html__( 'Unknown error occurred.', 'woo-feed' );
932
  return;
933
  }
934
  }
939
  if ( empty( $license['instance'] ) ) $license['instance'] = $this->generateInstanceId();
940
  $response = $this->activate( $license );
941
  if ( ! $response['success'] ) {
942
+ $this->error = $response['error'] ? $response['error'] : esc_html__( 'Unknown error occurred.', 'woo-feed' );
943
  return;
944
  }
945
  // Don't reset the key.
957
  );
958
  $this->setLicense( $license );
959
  if ( ! $updateKey ) {
960
+ $this->success = esc_html__( 'License activated successfully.', 'woo-feed' );
961
  } else {
962
+ $this->success = esc_html__( 'License Updated successfully.', 'woo-feed' );
963
  }
964
  }
965
 
970
  */
971
  private function deactivate_client_license() {
972
  if ( ! isset( $this->license['key'] ) || empty( $this->license['key'] ) ) {
973
+ $this->error = esc_html__( 'License key not found.', 'woo-feed' );
974
  } else {
975
  $response = $this->deactivate();
976
  if ( ! $response['success'] ) {
977
  // check api status.
978
  $check = $this->check();
979
  if ( $check['success'] && 'inactive' !== $check['status_check'] ) {
980
+ $this->error = $response['error'] ? $response['error'] : esc_html__( 'Unknown error occurred.', 'woo-feed' );
981
  }
982
  }
983
  }
984
  // keep the instance key for reference.
985
  $this->setLicense( [ 'instance' => $this->license['instance'] ] );
986
+ $this->success = esc_html__( 'License deactivated successfully.', 'woo-feed' );
987
  }
988
 
989
  /**
libs/WebAppick/AppServices/Promotions.php CHANGED
@@ -123,7 +123,7 @@ class Promotions {
123
  */
124
  public function init() {
125
  if ( is_null( $this->promotionSrc ) ) {
126
- _doing_it_wrong( __METHOD__, esc_html__( 'Promotion Source URL Not Set. see Promotions::set_source( $URL )', 'webappick' ), '1.0.0' );
127
  }
128
  add_action( 'admin_init', [ $this, '__init_internal' ], 10 );
129
  }
@@ -357,9 +357,9 @@ class Promotions {
357
  ) {
358
  $this->hiddenPromotions = array_merge( $this->hiddenPromotions, [ sanitize_text_field( $_REQUEST['hash'] ) ] );
359
  update_user_option( $this->currentUser, $this->client->getSlug() . '_hidden_promos', $this->hiddenPromotions );
360
- wp_send_json_success( esc_html__( 'Promo hidden', 'webappick' ) );
361
  }
362
- wp_send_json_error( esc_html__( 'Invalid Request', 'webappick' ) );
363
  die();
364
  }
365
 
@@ -370,7 +370,7 @@ class Promotions {
370
  */
371
  public function clear_hidden_promos() {
372
  if ( ! did_action( 'admin_init' ) ) {
373
- _doing_it_wrong( __METHOD__, esc_html__( 'Method must be invoked inside admin_init action', 'webappick' ), '1.0.0' );
374
  }
375
  $this->currentUser = get_current_user_id();
376
  return delete_user_option( $this->currentUser, $this->client->getSlug() . '_hidden_promos' );
123
  */
124
  public function init() {
125
  if ( is_null( $this->promotionSrc ) ) {
126
+ _doing_it_wrong( __METHOD__, esc_html__( 'Promotion Source URL Not Set. see Promotions::set_source( $URL )', 'woo-feed' ), '1.0.0' );
127
  }
128
  add_action( 'admin_init', [ $this, '__init_internal' ], 10 );
129
  }
357
  ) {
358
  $this->hiddenPromotions = array_merge( $this->hiddenPromotions, [ sanitize_text_field( $_REQUEST['hash'] ) ] );
359
  update_user_option( $this->currentUser, $this->client->getSlug() . '_hidden_promos', $this->hiddenPromotions );
360
+ wp_send_json_success( esc_html__( 'Promo hidden', 'woo-feed' ) );
361
  }
362
+ wp_send_json_error( esc_html__( 'Invalid Request', 'woo-feed' ) );
363
  die();
364
  }
365
 
370
  */
371
  public function clear_hidden_promos() {
372
  if ( ! did_action( 'admin_init' ) ) {
373
+ _doing_it_wrong( __METHOD__, esc_html__( 'Method must be invoked inside admin_init action', 'woo-feed' ), '1.0.0' );
374
  }
375
  $this->currentUser = get_current_user_id();
376
  return delete_user_option( $this->currentUser, $this->client->getSlug() . '_hidden_promos' );
woo-feed.php CHANGED
@@ -10,7 +10,7 @@
10
  * Plugin Name: WooCommerce Product Feed
11
  * Plugin URI: https://webappick.com/
12
  * Description: Easily generate woocommerce product feed for any marketing channel like Google Shopping(Merchant), Facebook Remarketing, Bing, eBay & more. Support 100+ Merchants.
13
- * Version: 4.0.7
14
  * Author: WebAppick
15
  * Author URI: https://webappick.com/
16
  * License: GPL v2
@@ -38,7 +38,7 @@ if ( ! defined( 'WOO_FEED_FREE_VERSION' ) ) {
38
  * @var string
39
  * @since 3.1.6
40
  */
41
- define( 'WOO_FEED_FREE_VERSION', '4.0.7' );
42
  }
43
 
44
  if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {
10
  * Plugin Name: WooCommerce Product Feed
11
  * Plugin URI: https://webappick.com/
12
  * Description: Easily generate woocommerce product feed for any marketing channel like Google Shopping(Merchant), Facebook Remarketing, Bing, eBay & more. Support 100+ Merchants.
13
+ * Version: 4.0.8
14
  * Author: WebAppick
15
  * Author URI: https://webappick.com/
16
  * License: GPL v2
38
  * @var string
39
  * @since 3.1.6
40
  */
41
+ define( 'WOO_FEED_FREE_VERSION', '4.0.8' );
42
  }
43
 
44
  if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {