Version Description
(2021-04-01) = * Fixed: Conflict with XT WooCommerce Variation Swatches plugin has been solved.
Download this release
Release Info
Developer | wahid0003 |
Plugin | CTX Feed – WooCommerce Product Feed Manager Plugin |
Version | 4.3.58 |
Comparing to | |
See all releases |
Code changes from version 4.3.57 to 4.3.58
- README.txt +4 -1
- admin/js/woo-feed-admin.min.js.map +1 -1
- woo-feed.php +6 -3
README.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: Product Feed, WooCommerce, Google Shopping, Google Merchant, Facebook Cata
|
|
5 |
Requires at least: 3.6
|
6 |
Tested Up To: 5.7
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 4.3.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -498,6 +498,9 @@ Using pro version:
|
|
498 |
|
499 |
== Changelog ==
|
500 |
|
|
|
|
|
|
|
501 |
= 4.3.57 (2021-03-31) =
|
502 |
* Fixed: TAB delimiter missing issue solved.
|
503 |
* Fixed: FeedType change make wrong delimiter selected issue has been solved.
|
5 |
Requires at least: 3.6
|
6 |
Tested Up To: 5.7
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 4.3.58
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
498 |
|
499 |
== Changelog ==
|
500 |
|
501 |
+
= 4.3.58 (2021-04-01) =
|
502 |
+
* Fixed: Conflict with XT WooCommerce Variation Swatches plugin has been solved.
|
503 |
+
|
504 |
= 4.3.57 (2021-03-31) =
|
505 |
* Fixed: TAB delimiter missing issue solved.
|
506 |
* Fixed: FeedType change make wrong delimiter selected issue has been solved.
|
admin/js/woo-feed-admin.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["woo-feed-admin.js"],"names":["_defineProperties","target","props","descriptor","i","_createClass","Constructor","protoProps","staticProps","prototype","window","wpAjax","self","prop","showTooltip","$","hasClass","currentTarget","clearTooltip","removeClass","actionMsg","className","match","index","action","removeAttr","actionKey","elem","addClass","attr","msg","extend","_default","_args","clip","$copyBtn","feedGenerator","left","event","trigger","test","navigator","on","console","googleCategories","in_array","needle","haystack","sortable","escape","data","text","ajax_fail","column_count","find","warn","wf_sortable","selectize_render_item","e","hasOwnProperty","opts","ajax","error","statusText","status","el","config","column","_onDrop","each","this","length","selectize","itemPath","create","concat","plugins","$item","container","containerSelector","group","options","bodyClass","itemSelector","handle","onDrop","fancySelect","maxItemShow","split","map","s","trim","helper","render","item","replace","x","form","merchantInfo","document","jQuery","k","init","renderMerchantInfo","opt","feedType","r","types","html","t","toLowerCase","na","disabled","val","_loop2","feedForm","contentSettings","renderMerchantTemplate","feedEditor","is","merchantInfoCache","tooltip","css","top","isRegenerating","_feed","_current_btn","feed","_limit","generator","limit","_progress","_product_ids","_progress_per_batch","_refresh","_all_btn","generate","condition","then","_current_btn_label","response","_color","preventDefault","parent","hide","_ajax_nonce","_log","_updateProgressStatus","message","key","regenerate","_block_button","value","_this","product","setTimeout","_stopProgressBar","_process_batch","_current_batch","_total_batch","post","_save_feed_file","fail","_resetProgressBar","_unblock_button","refreshInterval","arguments","undefined","clearInterval","_timer","_updateProgressBar","update","table","show","width","bar","wf","current_page_url_query","page_action","postboxes","add_postbox_toggles","pagenow","template","common","hover","title","appendTo","userAgent","merchantTemplateCache","remove","ClipboardJS","clipboard","slideToggle","loader","tbody","confirm","del_confirm","href","button","status_area","execCommand","success","current_attribute_value","fancyOption","fancyDataPicker","selectIf","price_attributes","selectKey","outputSelect","parents","includes","indexOf","row","type","reindex_config_table","valid","server","validate","save","sftp_available","send","provider","merchant","nonce","checked","outOfStockVisibilityRow","valueColumn","append","attribute","select","load","google_category","query","preload","cb","itemWrapper","wf_csv_txt","wp","wpf_ajax_obj","item_wrapper_hidden"],"mappings":"yHAAA,SAAAA,kBAAAC,EAAAC,+BACA,IAAAC,EAAAD,EAAAE,kHADA,SAAAC,aAAAC,EAAAC,EAAAC,GAW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jK,EAAAqC,KAAAsI,gBAAAH,EAAAnH,SA2FE,GAAuB,IAAvBiH,EAAKtL,KAAAA,oBAAkB2B,OAAA,CACtB5D,EAAAA,KAAM,oBAAMkL,SAzFbD,EAAAA,OAAAA,sGAAJ3C,EAAAA,OAAAA,gLACC3B,OAAAA,EAAAA,WAAAA,gBAGC2B,GAHD3B,EAAAA,OAAAA,8DAOCA,IAAAA,EAAAA,EAAAA,KAAAA,yBAGA1B,EAAApB,UAAA0F,EAAI,CACHuE,SA4EC,EA3ED1N,YAAAA,EAAAA,KAAAA,gBACAA,KAAAA,SAAAA,EAAAA,GA0FC6B,EAxEHqG,EAAAA,GAtCmB6E,EAAlBtG,KAAAA,wBAAAA,CAwBCzG,KAAAA,MAvCHmF,KA2BsB,CAsGrB+C,YAAchC,EAAV8G,MACHG,OAAAA,wBAvFAA,SAAAA,KAECxF,KAAA2E,SAAA3G,GAEFgI,EADCR,EAAAxH,GAlQJwH,EAAA5K,KAAA,YAAAuI,WAsQEnJ,KAAAA,EAAAA,mBAWA,qBAAAiM,EAAAA,OAAA,IAAAT,EAAA5K,KAAA,oBAAAiB,SAuFC2J,EArFAD,KAAAA,QAAAA,wHADD,YAECZ,EAFDpG,OAGCgH,EAAAA,KAAAA,oBAAAjF,UAKD2F,GAAAA,SAAAA,sBAAA,SAAAjL,GAAAkL,IAAAA,EAAAA,EAAAA,aAAA3H,MAAA4G,EAAA9M,EAAA,aAAAkG,MAyFC0H,EAAA5N,EAAA,gBApFAqM,EACI9J,EAAAA,cAFL5C,KAIC0F,GAAMD,EAAA0I,SAAAC,EAAAA,EA57BX7I,KAAA8I","file":"woo-feed-admin.min.js","sourcesContent":["// noinspection JSUnresolvedletiable\r\n/**!\r\n * WooFeed Scripts\r\n * @version 3.3.6\r\n * @package WooFeed\r\n * @copyright 2020 WebAppick\r\n *\r\n */\r\n/* global ajaxurl, wpAjax, postboxes, pagenow, alert, deleteUserSetting, typenow, adminpage, thousandsSeparator, decimalPoint, isRtl */\r\n// noinspection JSUnresolvedVariable\r\n(function($, window, document, wpAjax, opts) {\r\n\t\"use strict\";\r\n\t/**\r\n\t * All of the code for your admin-facing JavaScript source\r\n\t * should reside in this file.\r\n\t *\r\n\t * Note: It has been assumed you will write jQuery code here, so the\r\n\t * $ function reference has been prepared for usage within the scope\r\n\t * of this function.\r\n\t *\r\n\t * This enables you to define handlers, for when the DOM is ready:\r\n\t */\r\n\r\n\t/**\r\n\t * disable element utility\r\n\t *\r\n\t * @since 3.1.9\r\n\t *\r\n\t * @param {*} status\r\n\t * @returns {jQuery|HTMLElement}\r\n\t */\r\n\t$.fn.disabled = function(status) {\r\n\t\t$(this).each(function() {\r\n\t\t\tlet self = $(this),\r\n\t\t\t\tprop = 'disabled';\r\n\r\n\t\t\tif (typeof self.prop(prop) !== 'undefined') {\r\n\t\t\t\tself.prop(prop, status === void 0 || status === true);\r\n\t\t\t} else {\r\n\t\t\t\t!0 === status ? self.addClass(prop) : self.removeClass(prop);\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn self; // method chaining\r\n\t};\r\n\t\r\n\t/**\r\n\t * Check if a HTMLElement or jQuery is disabled\r\n\t */\r\n\t$.fn.isDisabled = function() {\r\n\t\tlet self = $(this),\r\n\t\t\tprop = 'disabled';\r\n\t\treturn typeof self.prop(prop) !== 'undefined' ? self.prop(prop) : self.hasClass(prop);\r\n\t};\r\n\t\r\n\t/**\r\n\t * Clear Tooltip for clip board js\r\n\t * @param {Object} event\r\n\t */\r\n\tconst clearTooltip = (event) => {\r\n\t\t$(event.currentTarget).removeClass( (index, className) => (className.match(/\\btooltipped-\\S+/g) || []).join(' ') ).removeClass('tooltipped').removeAttr('aria-label');\r\n\t};\r\n\r\n\tconst showTooltip = (elem, msg) => {\r\n\t\t$(elem).addClass('tooltipped tooltipped-s').attr('aria-label', msg);\r\n\t};\r\n\r\n\tconst fallbackMessage = (action) =>{\r\n\t\tlet actionMsg,\r\n\t\t\tactionKey = action === 'cut' ? 'X' : 'C';\r\n\r\n\t\tif (/iPhone|iPad/i.test(navigator.userAgent)) {\r\n\t\t\tactionMsg = 'No support :(';\r\n\t\t} else if (/Mac/i.test(navigator.userAgent)) {\r\n\t\t\tactionMsg = 'Press ⌘-' + actionKey + ' to ' + action;\r\n\t\t} else {\r\n\t\t\tactionMsg = 'Press Ctrl-' + actionKey + ' to ' + action;\r\n\t\t}\r\n\r\n\t\treturn actionMsg;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Alias of jQuery.extend()\r\n\t * @param {Object} _default\r\n\t * @param {Object} _args\r\n\t */\r\n\tconst extend = (_default, _args) => $.extend(true, {}, _default, _args);\r\n\t\r\n\tlet $copyBtn,\r\n\t\tclipboard,\r\n\t\tgoogleCategories,\r\n\t\thelper = {\r\n\t\t\tin_array: (needle, haystack) => {\r\n\t\t\t\ttry {\r\n\t\t\t\t\treturn haystack.indexOf(needle) !== -1;\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tselectize_render_item: (data, escape) => `<div class=\"item wapk-selectize-item\">${ escape(data.text)}</div>`, // phpcs:ignore WordPressVIPMinimum.JS.StringConcat.Found,\r\n\t\t\tajax_fail: e => {\r\n\t\t\t\tconsole.warn(e);\r\n\t\t\t\talert(e.hasOwnProperty('statusText') && e.hasOwnProperty('status') ? opts.ajax.error + '\\n' + e.statusText + ' (' + e.status + ')' : e);\r\n\t\t\t},\r\n\t\t\t/**\r\n\t\t\t * Initialize Sortable\r\n\t\t\t * @param {jQuery|HTMLElement} el\r\n\t\t\t * @param {object} config\r\n\t\t\t * @param {int|boolean} column\r\n\t\t\t * @param {function} onDrop\r\n\t\t\t * @return {jQuery|HTMLElement}\r\n\t\t\t */\r\n\t\t\tsortable: (el, config, column, onDrop) => {\r\n\t\t\t\treturn (el || $('.sorted_table')).each(function() {\r\n\t\t\t\t\tlet self = $(this),\r\n\t\t\t\t\t\tcolumn_count = self.find('tbody > tr:eq(0) > td').length || column || 9;\r\n\t\t\t\t\tself.wf_sortable(extend({\r\n\t\t\t\t\t\tcontainerSelector: 'table',\r\n\t\t\t\t\t\titemPath: '> tbody',\r\n\t\t\t\t\t\titemSelector: 'tr',\r\n\t\t\t\t\t\thandle: 'i.wf_sortedtable',\r\n\t\t\t\t\t\tplaceholder: `<tr class=\"placeholder\"><td colspan=\"${column_count}\"></td></tr>`,\r\n\t\t\t\t\t\tonDrop: ($item, container, _super, event) => {\r\n\t\t\t\t\t\t\t$item.removeClass(container.group.options.draggedClass).removeAttr('style');\r\n\t\t\t\t\t\t\t$(\"body\").removeClass(container.group.options.bodyClass);\r\n\t\t\t\t\t\t\tif ( onDrop && 'function' === typeof( onDrop ) ) {\r\n\t\t\t\t\t\t\t\tonDrop( $item, container, _super, event );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t}, config));\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\tselectize: (el, config) => {\r\n\t\t\t\treturn (el || $('select.selectize')).not('.selectized').each(function() {\r\n\t\t\t\t\tlet self = $(this);\r\n\t\t\t\t\tself.selectize(extend({\r\n\t\t\t\t\t\tcreate: self.data('create') || false,\r\n\t\t\t\t\t\tplugins: self.data('plugins') ? self.data('plugins').split(',').map(function(s) {\r\n\t\t\t\t\t\t\treturn s.trim();\r\n\t\t\t\t\t\t}) : [],\r\n\t\t\t\t\t\t//['remove_button'],\r\n\t\t\t\t\t\trender: {\r\n\t\t\t\t\t\t\titem: helper.selectize_render_item\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}, config));\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\tfancySelect: (el, config) => {\r\n\t\t\t\treturn (el || $('select.fancySelect')).not('.FancySelectInit').each(function() {\r\n\t\t\t\t\tlet self = $(this);\r\n\t\t\t\t\tself.fancySelect(extend({\r\n\t\t\t\t\t\tmaxItemShow: 3\r\n\t\t\t\t\t}, config));\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\treindex_config_table: () => {\r\n\t\t\t\t$('#table-1').find('tbody tr').each( ( x, el ) => {\r\n\t\t\t\t\t$(el).find('[name]').each( ( x1, el ) => {\r\n\t\t\t\t\t\t$(el).attr('name', $(el).attr('name').replace(/(\\[\\d\\])/g, `[${x}]`));\r\n\t\t\t\t\t} );\r\n\t\t\t\t} );\r\n\t\t\t},\r\n\t\t\tcommon: () => {\r\n\t\t\t\thelper.sortable( $('.sorted_table'), {}, 9, helper.reindex_config_table );\r\n\t\t\t\thelper.selectize();\r\n\t\t\t\thelper.fancySelect($('.outputType'));\r\n\t\t\t}\r\n\t\t},\r\n\t\t// helper functions\r\n\t\tfeedEditor = {\r\n\t\t\t/**\r\n\t\t\t * The Editor Form Elem.\r\n\t\t\t * @type {jQuery|HTMLElement}\r\n\t\t\t */\r\n\t\t\tform: null,\r\n\r\n\t\t\t/**\r\n\t\t\t * Initialize The Feed Editor {Tabs...}\r\n\t\t\t * @returns {void}\r\n\t\t\t */\r\n\t\t\tinit: function () {\r\n\t\t\t\tlet self = this;\r\n\t\t\t\tself.form = $('.generateFeed');\r\n\t\t\t\tif (!self.form.length) return;\r\n\t\t\t\thelper.common();\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t$(document).trigger(new jQuery.Event('feedEditor.init', {\r\n\t\t\t\t\ttarget: this.form\r\n\t\t\t\t}));\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Render Merchant info ajax response and handle allowed feed type for selected merchant\r\n\t\t\t * @param {jQuery|HTMLElement} merchantInfo jQuery dom object\r\n\t\t\t * @param {jQuery|HTMLElement} feedType jQuery dom object\r\n\t\t\t * @param {Object} r ajax response object\r\n\t\t\t */\r\n\t\t\trenderMerchantInfo: function (merchantInfo, feedType, r) {\r\n\t\t\t\tfor (let k in r) {\r\n\t\t\t\t\tif (r.hasOwnProperty(k)) {\r\n\t\t\t\t\t\tmerchantInfo.find('.merchant-info-section.' + k + ' .data').html(r[k]); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html\r\n\r\n\t\t\t\t\t\tif ('feed_file_type' === k) {\r\n\t\t\t\t\t\t\t(function() {\r\n\t\t\t\t\t\t\t\tlet types = r[k].split(\",\").map(function(t) {\r\n\t\t\t\t\t\t\t\t\treturn t.trim().toLowerCase();\r\n\t\t\t\t\t\t\t\t}).filter(function(t) {\r\n\t\t\t\t\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\t\t\t\t\treturn t !== '' && t !== opts.na.toLowerCase();\r\n\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\t\tif (types.length) {\r\n\t\t\t\t\t\t\t\t\tfeedType.find('option').removeAttr('selected').each(function() {\r\n\t\t\t\t\t\t\t\t\t\tlet opt = $(this);\r\n\t\t\t\t\t\t\t\t\t\topt.val() && !helper.in_array(opt.val(), types) ? opt.disabled(!0) : opt.disabled(!1);\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\tif (types.length === 1) feedType.find('option[value=\"' + types[0] + '\"]').attr('selected', 'selected');\r\n\t\t\t\t\t\t\t\t} else feedType.find('option').disabled(!1);\r\n\t\t\t\t\t\t\t})();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmerchantInfo.find('.spinner').removeClass('is-active');\r\n\t\t\t\tfeedType.disabled(!1);\r\n\t\t\t\tfeedType.trigger('change');\r\n\t\t\t\tfeedType.parent().find('.spinner').removeClass('is-active');\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Render Feed Template Tabs and settings while creating new feed.\r\n\t\t\t * @param {jQuery|HTMLElement} feedForm feed from query dom object\r\n\t\t\t * @param {object} r merchant template ajax response object\r\n\t\t\t */\r\n\t\t\trenderMerchantTemplate: function (feedForm, r) {\r\n\t\t\t\tlet _loop = function _loop(k) {\r\n\t\t\t\t\tif (r.hasOwnProperty(k)) {\r\n\t\t\t\t\t\tif ('tabs' === k) {\r\n\t\t\t\t\t\t\t// noinspection JSUnresolvedFunction\r\n\t\t\t\t\t\t\tfeedForm.html(r[k]); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tlet contentSettings = $('[name=\"' + k + '\"]');\r\n\r\n\t\t\t\t\t\t\tif (contentSettings.length) {\r\n\t\t\t\t\t\t\t\tcontentSettings.each(function() {\r\n\t\t\t\t\t\t\t\t\tlet elem = $(this);\r\n\r\n\t\t\t\t\t\t\t\t\tif (elem.is('select')) {\r\n\t\t\t\t\t\t\t\t\t\telem.find('[value=\"' + r[k] + '\"]').prop('selected', true);\r\n\t\t\t\t\t\t\t\t\t} else if ((elem.is('[type=checkbox]') || elem.is('[type=radio]')) && elem.val() === r[k]) {\r\n\t\t\t\t\t\t\t\t\t\telem.prop('checked', true);\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\telem.val(r[k]); // type=text\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}).trigger('change');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\tfor (let k in r) {\r\n\t\t\t\t\t_loop(k);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfeedEditor.init();\r\n\t\t\t}\r\n\t\t},\r\n\t\t// Feed Editor Table\r\n\t\tmerchantInfoCache = [],\r\n\t\tmerchantTemplateCache = [],\r\n\t\ttooltip = () => {\r\n\t\t\t// Tooltip only Text\r\n\t\t\t$('.wfmasterTooltip')\r\n\t\t\t\t.hover(function () {\r\n\t\t\t\t\t// Hover over code\r\n\t\t\t\t\tlet self = $(this), title = self.attr('wftitle');\r\n\t\t\t\t\tself.data('tipText', title).removeAttr('wftitle');\r\n\t\t\t\t\t$('<p class=\"wftooltip\"></p>').text(title).appendTo('body').fadeIn('slow');\r\n\t\t\t\t}, function () {\r\n\t\t\t\t\t// Hover out code\r\n\t\t\t\t\tlet self = $(this);\r\n\t\t\t\t\tself.attr('wftitle', self.data('tipText'));\r\n\t\t\t\t\t$('.wftooltip').remove();\r\n\t\t\t\t})\r\n\t\t\t\t.mousemove(function (e) {\r\n\t\t\t\t\t$('.wftooltip').css({\r\n\t\t\t\t\t\ttop: e.pageY + 10,\r\n\t\t\t\t\t\tleft: e.pageX + 20\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t},\r\n\t\tclip = () => {\r\n\t\t\t$copyBtn = $('.toClipboard');\r\n\t\t\tif (!ClipboardJS.isSupported() || /iPhone|iPad/i.test(navigator.userAgent)) {\r\n\t\t\t\t$copyBtn.find('img').hide(0);\r\n\t\t\t} else {\r\n\t\t\t\t$copyBtn.each(function() {\r\n\t\t\t\t\t$(this).on('mouseleave', clearTooltip).on('blur', clearTooltip);\r\n\t\t\t\t});\r\n\t\t\t\tclipboard = new ClipboardJS('.toClipboard');\r\n\t\t\t\tclipboard.on('error', function(event) {\r\n\t\t\t\t\tshowTooltip(event.trigger, fallbackMessage(event.action));\r\n\t\t\t\t}).on('success', function(event) {\r\n\t\t\t\t\tshowTooltip(event.trigger, 'Copied!');\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t};\r\n\t\r\n\t/**\r\n\t * Feed Generator Module\r\n\t */\r\n\tclass feedGenerator {\r\n\t\t\r\n\t\t/**\r\n\t\t * Constructor\r\n\t\t * @constructor\r\n\t\t */\r\n\t\tconstructor() {\r\n\t\t\tthis._feed = opts.generator.feed; // wf_config+xxxx\r\n\t\t\tthis._limit = opts.generator.limit;\r\n\t\t\tthis._progress = 0;\r\n\t\t\tthis._timer = null;\r\n\t\t\tthis._color = false;\r\n\t\t\t// batch info\r\n\t\t\tthis._total_batch = 0;\r\n\t\t\tthis._current_batch = 0;\r\n\t\t\tthis._product_ids = [];\r\n\t\t\tthis._progress_per_batch = 0;\r\n\t\t\tthis._refresh = true;\r\n\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\tthis._regenerate = opts.generator.regenerate;\r\n\t\t\twindow.isRegenerating = false;\r\n\t\t\tthis._all_btn = $('.wpf_regenerate');\r\n\t\t\tthis._current_btn = $(`#${this._feed.replace( 'wf_config', 'wf_feed_' )}`);\r\n\t\t\tthis._current_btn_label = '';\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Init Hooks (Event)\r\n\t\t * @return {feedGenerator}\r\n\t\t */\r\n\t\tinit() {\r\n\t\t\tlet self = this;\r\n\t\t\tif ( '' !== this._feed && this._regenerate && false === window.isRegenerating ) {\r\n\t\t\t\tthis.generate();\r\n\t\t\t}\r\n\r\n\t\t\t//thickbox body add feed plugin class to make it unique and custom style\r\n\t\t\tlet current_page_query = window.location.search;\r\n\t\t\tlet params = new URLSearchParams(current_page_query);\r\n\t\t\tlet page_name = params.get(\"page\");\r\n\t\t\tif( \"webappick-manage-feeds\" === page_name ) {\r\n\t\t\t\t$('body').addClass('woo-import-popup-body');\r\n\t\t\t}\r\n\r\n\t\t\t$(document).on('click', '.woo-feed-campaign-close-button', function(event) {\r\n\t\t\t\tevent.preventDefault();\r\n\r\n\t\t\t\t$(this).parent('.woo-feed-promotion').hide();\r\n\t\t\t\tlet condition = $(this).data('condition');\r\n\t\t\t\tif(1 === condition) {\r\n\t\t\t\t\twpAjax.post( 'woo_feed_hide_promotion', {\r\n\t\t\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\t\t\tcondition: condition,\r\n\t\t\t\t\t} ).then( response => {\r\n\t\t\t\t\t\tself._log( response );\r\n\t\t\t\t\t} ).fail( error => {\r\n\t\t\t\t\t\tself._log( error );\r\n\t\t\t\t\t\tself._updateProgressStatus( error.message );\r\n\t\t\t\t\t\tself._color = 'red';\r\n\t\t\t\t\t} );\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t$(document).on('click', '.wpf_regenerate', function(event) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\tself._current_btn = $( this );\r\n\t\t\t\tif( self._current_btn.hasClass('disabled') || window.isRegenerating === true ) return;\r\n\t\t\t\tself._feed = self._current_btn.attr('id').replace( 'wf_feed_', 'wf_config' );\r\n\t\t\t\tif( '' !== self._feed ) {\r\n\t\t\t\t\tself.generate();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t_block_button() {\r\n\t\t\tif ( this._all_btn.length ) {\r\n\t\t\t\tthis._all_btn.addClass('disabled');\r\n\t\t\t}\r\n\t\t\tif ( this._current_btn.length ) {\r\n\t\t\t\tthis._current_btn.find('span').addClass('wpf_spin reverse_spin');\r\n\t\t\t\tthis._current_btn_label = this._current_btn.attr('title');\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\tthis._current_btn.attr( 'aria-label', opts.regenerate ).attr( 'title', opts.regenerate );\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t_unblock_button() {\r\n\t\t\tif ( this._all_btn.length ) {\r\n\t\t\t\tthis._all_btn.removeClass('disabled');\r\n\t\t\t}\r\n\t\t\tif ( this._current_btn.length ) {\r\n\t\t\t\tthis._current_btn.find('span').removeClass('wpf_spin');\r\n\t\t\t\tthis._current_btn.find('span').removeClass('reverse_spin');\r\n\t\t\t\tthis._current_btn.attr( 'aria-label', this._current_btn_label ).attr( 'title', this._current_btn_label );\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Generate Feed\r\n\t\t * @return void\r\n\t\t */\r\n\t\tgenerate() {\r\n\t\t\tlet self = this;\r\n\t\t\twindow.isRegenerating = true;\r\n\t\t\tthis._block_button();\r\n\t\t\tthis._resetProgressBar();\r\n\t\t\tthis._progressBarActive();\r\n\t\t\tthis._log( 'Counting Total Products' );\r\n\t\t\tthis._updateProgressStatus( 'Fetching products.' );\r\n\t\t\tthis._get_product_ids().then( response => {\r\n\t\t\t\tthis._progress = 10;\r\n\t\t\t\tself._log( {response} );\r\n\t\t\t\tif(response.success) {\r\n\t\t\t\t\tself._log( `Total ${response.total} Products found.` );\r\n\t\t\t\t\tself._product_ids = response.product;\r\n\t\t\t\t\tself._total_batch = this._product_ids.length;\r\n\t\t\t\t\tself._current_batch = 0;\r\n\t\t\t\t\tself._progress_per_batch = ( 90 - this._progress ) / this._total_batch;\r\n\t\t\t\t\tself._process_batch();\r\n\t\t\t\t\tself._updateProgressStatus( 'Processing Products...' );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tself._updateProgressStatus( response.data.message );\r\n\t\t\t\t}\r\n\t\t\t}).fail( error => {\r\n\t\t\t\tself._log( error );\r\n\t\t\t\tself._updateProgressStatus( error.message );\r\n\t\t\t\tself._color = 'red';\r\n\t\t\t\tsetTimeout( function(){\r\n\t\t\t\t\tself._stopProgressBar();\r\n\t\t\t\t\tself._unblock_button();\r\n\t\t\t\t}, 1500 );\r\n\t\t\t} );\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Get Product Ids\r\n\t\t * @returns {$.promise}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_get_product_ids() {\r\n\t\t\tthis._progress = 5;\r\n\t\t\treturn wpAjax.post( 'get_product_information', {\r\n\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\tfeed: this._feed,\r\n\t\t\t\tlimit: this._limit,\r\n\t\t\t} );\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Run the Batch\r\n\t\t * @private\r\n\t\t */\r\n\t\t_process_batch() {\r\n\t\t\tlet self = this;\r\n\t\t\tlet status = `Processing Batch ${this._current_batch+1} of ${this._total_batch}`;\r\n\t\t\tthis._updateProgressStatus( status );\r\n\t\t\tthis._log( status );\r\n\t\t\twpAjax.post( 'make_batch_feed', {\r\n\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\tfeed: this._feed,\r\n\t\t\t\tproducts: this._product_ids[this._current_batch],\r\n\t\t\t\tloop: this._current_batch,\r\n\t\t\t} ).then( response => {\r\n\t\t\t\tself._current_batch++;\r\n\t\t\t\tself._log( `Batch ${self._current_batch} Completed` );\r\n\t\t\t\tself._log( response );\r\n\t\t\t\tif ( self._current_batch < self._total_batch ) {\r\n\t\t\t\t\tself._process_batch();\r\n\t\t\t\t\tself._progress += self._progress_per_batch;\r\n\t\t\t\t}\r\n\t\t\t\tif ( self._current_batch === self._total_batch ) {\r\n\t\t\t\t\tself._save_feed_file();\r\n\t\t\t\t}\r\n\t\t\t} ).fail( error => {\r\n\t\t\t\tself._log( error );\r\n\t\t\t\tself._updateProgressStatus( error.message );\r\n\t\t\t\tself._color = 'red';\r\n\t\t\t\tsetTimeout( function(){\r\n\t\t\t\t\tself._stopProgressBar();\r\n\t\t\t\t\tself._unblock_button();\r\n\t\t\t\t}, 1500 );\r\n\t\t\t} );\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Save Feed Data from temp to feed file\r\n\t\t * @private\r\n\t\t */\r\n\t\t_save_feed_file() {\r\n\t\t\tlet self = this;\r\n\t\t\tthis._log( 'Saving feed file' );\r\n\t\t\tthis._updateProgressStatus( 'Saving feed file' );\r\n\t\t\twpAjax.post( 'save_feed_file', {\r\n\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\tfeed: this._feed,\r\n\t\t\t} ).then( response => {\r\n\t\t\t\tself._log( response );\r\n\t\t\t\tself._progress = 100;\r\n\t\t\t\tif ( self._refresh ) {\r\n\t\t\t\t\twindow.location.href = `${opts.pages.list.feed}&link=${response.url}&cat=${response.cat}`;\r\n\t\t\t\t}\r\n\t\t\t\tsetTimeout( function(){\r\n\t\t\t\t\tself._stopProgressBar();\r\n\t\t\t\t\tsetTimeout( function(){\r\n\t\t\t\t\t\tself._resetProgressBar( true );\r\n\t\t\t\t\t\tself._unblock_button();\r\n\t\t\t\t\t}, 3000 );\r\n\t\t\t\t}, 2500 );\r\n\t\t\t} ).fail( error => {\r\n\t\t\t\tself._log( error );\r\n\t\t\t\tself._updateProgressStatus( error.message );\r\n\t\t\t\tself._color = 'red';\r\n\t\t\t\tsetTimeout( function(){\r\n\t\t\t\t\tself._stopProgressBar();\r\n\t\t\t\t\tself._unblock_button();\r\n\t\t\t\t}, 1500 );\r\n\t\t\t} );\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Console log wrapper with debug settings.\r\n\t\t * @param data\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_log( data ) {\r\n\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\tif ( opts.wpf_debug ) {\r\n\t\t\t\tconsole.log( data );\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Run the progressbar refresh interval\r\n\t\t * @param {int} refreshInterval\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_progressBarActive( refreshInterval = 0 ) {\r\n\t\t\tlet self = this;\r\n\t\t\tthis._toggleProgressBar( true );\r\n\t\t\tthis._timer = setInterval( function(){\r\n\t\t\t\tself._updateProgressBar();\r\n\t\t\t}, refreshInterval || 1000 );\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Stop Progressbar\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_stopProgressBar() {\r\n\t\t\tclearInterval( this._timer );\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Reset Progressbar\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_resetProgressBar( update ) {\r\n\t\t\tthis._toggleProgressBar( false );\r\n\t\t\tthis._updateProgressStatus( '' );\r\n\t\t\tclearInterval( this._timer );\r\n\t\t\tthis._color = false;\r\n\t\t\tthis._timer = null;\r\n\t\t\tthis._progress = 0;\r\n\t\t\tif ( update ) {\r\n\t\t\t\tthis._updateProgressBar();\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Show hide the progress bar el\r\n\t\t * @param status\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_toggleProgressBar( status ) {\r\n\t\t\tlet table = $('#feed_progress_table');\r\n\t\t\tif ( status ) {\r\n\t\t\t\ttable.show();\r\n\t\t\t} else {\r\n\t\t\t\ttable.hide();\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Update Progress bar text status\r\n\t\t * @param {string} status\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_updateProgressStatus( status ) {\r\n\t\t\t$( '.feed-progress-status' ).text( status );\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Update Progress Data\r\n\t\t * hooked with setInterval\r\n\t\t * @private\r\n\t\t */\r\n\t\t_updateProgressBar() {\r\n\t\t\tlet percentage = $( '.feed-progress-percentage' ),\r\n\t\t\t\tbar = $( '.feed-progress-bar-fill' ),\r\n\t\t\t\t_progress = `${Math.round( this._progress )}%`;\r\n\t\t\tbar.css( {\r\n\t\t\t\twidth: _progress,\r\n\t\t\t} );\r\n\t\t\tpercentage.text( _progress );\r\n\t\t}\r\n\t}\r\n\t// expose to the global scope\r\n\twindow.wf = {\r\n\t\thelper: helper,\r\n\t\tfeedEditor: feedEditor,\r\n\t\tgenerator: feedGenerator,\r\n\t};\r\n\t$(window).on('load', function() {\r\n\t\t// Template loading ui conflict\r\n\t\tif ($(location).attr(\"href\").match(/webappick.*feed/g) !== null) {\r\n\t\t\t$('#wpbody-content').addClass('woofeed-body-content');\r\n\t\t}\r\n\r\n\t\t// on edit page show item wrapper dropdown\r\n\t\tlet current_page_url_query = window.location.search;\r\n\t\tlet urlParams = new URLSearchParams(current_page_url_query);\r\n\t\tlet page_action = urlParams.get('action');\r\n\t\tif ( page_action === 'edit-feed' ) {\r\n\t\t\t$('.itemWrapper').show();\r\n\t\t}\r\n\r\n\t\t// ClipBoardJS\r\n\t\tclip();\r\n\t\t// postbox toggle\r\n\t\tpostboxes.add_postbox_toggles(pagenow);\r\n\t\t// initialize generator\r\n\t\tlet generator = new feedGenerator();\r\n\t\tgenerator.init();\r\n\t\t// noinspection JSUnresolvedVariable\r\n\t\tif( '' !== opts.generator.feed && opts.generator.regenerate ) {\r\n\t\t\r\n\t\t}\r\n\t\t// initialize editor\r\n\t\tfeedEditor.init();\r\n\t\thelper.common(); // Generate Feed Add Table Row\r\n\t\ttooltip();\r\n\t\t// validate feed editor\r\n\t\t$(\".generateFeed\").validate();\r\n\t\t// document events\r\n\t\t$(document)\r\n\t\t\t.on('click', '[data-toggle_slide]', function(e) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\t$($(this).data('toggle_slide')).slideToggle('fast');\r\n\t\t\t})\r\n\t\t\t// XML Feed Wrapper\r\n\t\t\t.on('click', '#wf_newRow', function () {\r\n\t\t\t\tlet tbody = $('#table-1 tbody'),\r\n\t\t\t\t\ttemplate = $('#feed_config_template').text().trim().replace(/__idx__/g, tbody.find('tr').length);\r\n\t\t\t\ttbody.append(template);\r\n\t\t\t\thelper.fancySelect($('.outputType'));\r\n\t\t\t})\r\n\t\t\t// feed delete alert.\r\n\t\t\t.on('click', '.single-feed-delete', function (event) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\tif (confirm(opts.form.del_confirm)) {\r\n\t\t\t\t\twindow.location.href = $(this).attr('val');\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t// clear cache data.\r\n\t\t\t.on('click', '.wf_clean_cache_wrapper', function(event) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\tvar nonce = $('.woo-feed-clean-cache-nonce').val();\r\n\t\t\t\tvar loader = $('.woo-feed-cache-loader');\r\n\r\n\t\t\t\t//show loader\r\n\t\t\t\tloader.show();\r\n\r\n\t\t\t\t// passed cache nonce\r\n\t\t\t\twpAjax.post('clear_cache_data', {\r\n\t\t\t\t\t_ajax_clean_nonce: nonce\r\n\t\t\t\t}).then(function (response) {\r\n\t\t\t\t\tif( response.success ) {\r\n\t\t\t\t\t\tloader.hide(); //hide loader\r\n\t\t\t\t\t}\r\n\t\t\t\t}).fail(function (e) {\r\n\t\t\t\t\tconsole.log('something wrong');\r\n\t\t\t\t});\r\n\r\n\t\t\t})// Copy Status\r\n\t\t\t.on('click', '#woo-feed-copy-status-btn', function(event) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\tlet button = $('#woo-feed-copy-status-btn');\r\n\t\t\t\tlet status_area = $('#woo-feed-status-area');\r\n\t\t\t\tbutton.val('Copied');\r\n\t\t\t\tstatus_area.css('visibility','visible');\r\n\t\t\t\tstatus_area.select();\r\n\r\n\t\t\t\tdocument.execCommand('copy');\r\n\t\t\t})\r\n\t\t\t// feed value dropdown change.\r\n\t\t\t.on('change', '.wf_attr.wf_attributes', function(event) {\r\n\t\t\t\tevent.preventDefault();\r\n\r\n\t\t\t\t$('.fancy-picker-picked').trigger(\"click\"); // trigger fancy select box clicked\r\n\r\n\t\t\t\t// price attributes\r\n\t\t\t\tvar price_attributes = ['price', 'current_price', 'sale_price', 'price_with_tax', 'current_price_with_tax', 'sale_price_with_tax'];\r\n\t\t\t\t// current value\r\n\t\t\t\tvar current_attribute_value = $(this).val();\r\n\t\t\t\tvar outputSelect = $(this).parents('tr').find('.outputType');\r\n\t\t\t\tvar fancyOption = $(this).parents('tr').find('.fancy-picker-content .fancy-picker-option');\r\n\t\t\t\tvar fancyDataPicker = $(this).parents('tr').find('.fancy-picker-data span');\r\n\t\t\t\tvar selectIf, selectKey;\r\n\r\n\t\t\t\t// when any attribute is selected, pick the key\r\n\t\t\t\tif( price_attributes.includes(current_attribute_value) ) {\r\n\t\t\t\t\t// when select any price attribute\r\n\t\t\t\t\tselectIf = 'for_price';\r\n\t\t\t\t\tselectKey = \"Price\";\r\n\t\t\t\t} else if ( \"\" !== current_attribute_value && -1 !== current_attribute_value.indexOf('wf_taxo') ) {\r\n\r\n\t\t\t\t\t// when select any custom taxonomy\r\n\t\t\t\t\tselectIf = 'for_custom_taxo';\r\n\t\t\t\t\tselectKey = \"parent_if_empty\";\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tselectIf = 'for_all';\r\n\t\t\t\t\tselectKey = 'Default';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// remove selected class from old selected option\r\n\t\t\t\tfancyOption.removeClass('selected');\r\n\r\n\t\t\t\t// when value dropdown is selected as price or any custom taxonomy\r\n\t\t\t\tif( selectIf === 'for_custom_taxo' || selectIf === 'for_price' ) {\r\n\r\n\t\t\t\t\t// update \"Option Type\" when select key matches\r\n\t\t\t\t\tfancyOption.each(function(item) {\r\n\t\t\t\t\t\tif( selectKey === $(this).text() ) {\r\n\t\t\t\t\t\t\t$(this).addClass('selected');\r\n\t\t\t\t\t\t\tfancyDataPicker.text(selectKey);\r\n\t\t\t\t\t\t\toutputSelect.find(\"option\").text(selectKey);\r\n\t\t\t\t\t\t\toutputSelect.find(\"option\").val( $(this).data('value') );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\t// update \"Option Type\" when select key matches\r\n\t\t\t\t\tfancyOption.each(function(item) {\r\n\t\t\t\t\t\tif( \"parent_if_empty\" !== $(this).text() && \"for_all\" === selectIf ) {\r\n\t\t\t\t\t\t\t$(this).addClass('selected');\r\n\t\t\t\t\t\t\tfancyDataPicker.text(selectKey);\r\n\t\t\t\t\t\t\toutputSelect.find(\"option\").text(selectKey);\r\n\t\t\t\t\t\t\toutputSelect.find(\"option\").val( $(this).data('value') );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t})\r\n\t\t\t// bulk delete alert.\r\n\t\t\t.on('click', '#doaction, #doaction2', function () {\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\treturn confirm(opts.form.del_confirm_multi);\r\n\t\t\t})\r\n\t\t\t// Generate Feed Table Row Delete\r\n\t\t\t.on('change', '.dType', function () {\r\n\t\t\t\tlet self = $(this),\r\n\t\t\t\t\ttype = self.val(),\r\n\t\t\t\t\trow = self.closest('tr');\r\n\t\t\t\t\r\n\t\t\t\tif (type === 'pattern') {\r\n\t\t\t\t\trow.find('.value_attribute').hide();\r\n\t\t\t\t\trow.find('.value_pattern').show();\r\n\t\t\t\t} else if (type === 'attribute') {\r\n\t\t\t\t\trow.find('.value_attribute').show();\r\n\t\t\t\t\trow.find('.value_pattern').hide();\r\n\t\t\t\t} else if (type === 'remove') {\r\n\t\t\t\t\trow.find('.value_attribute').hide();\r\n\t\t\t\t\trow.find('.value_pattern').hide();\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t// Generate Feed Form Submit\r\n\t\t\t.on('click', '.delRow', function (e) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\t$(this).closest('tr').remove();\r\n\t\t\t\thelper.reindex_config_table();\r\n\t\t\t})\r\n\t\t\t.on('submit', '#generateFeed', function () {\r\n\t\t\t\t// Feed Generating form validation\r\n\t\t\t\t$(this).validate();\r\n\t\t\t\t\r\n\t\t\t\tif ($(this).valid()) {\r\n\t\t\t\t\t$(\".makeFeedResponse\")\r\n\t\t\t\t\t\t.show()\r\n\t\t\t\t\t\t.html(`<b style=\"color: darkblue;\"><i class=\"dashicons dashicons-sos wpf_spin\"></i> ${opts.form.generate}</b>`); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html, WordPressVIPMinimum.JS.StringConcat.Found\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t// Generate Update Feed Form Submit\r\n\t\t\t.on('submit', '#updatefeed', function (e, data) {\r\n\t\t\t\t// Feed Generating form validation\r\n\t\t\t\t$(this).validate();\r\n\t\t\t\t\r\n\t\t\t\tif ($(this).valid()) {\r\n\t\t\t\t\t$(\".makeFeedResponse\")\r\n\t\t\t\t\t\t.show()\r\n\t\t\t\t\t\t.html(`<b style=\"color: darkblue;\"><i class=\"dashicons dashicons-sos wpf_spin\"></i> ${data && data.save ? opts.form.save : opts.form.generate}</b>`); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html, WordPressVIPMinimum.JS.StringConcat.Found\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.on('change', '.ftporsftp', function () {\r\n\t\t\t\tlet server = $(this).val(),\r\n\t\t\t\t\tstatus = $('.ssh2_status');\r\n\t\t\t\t\r\n\t\t\t\tif (server === 'sftp') {\r\n\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\tstatus.show().css('color', 'dodgerblue').text(opts.form.sftp_checking);\r\n\t\t\t\t\twpAjax.post('get_ssh2_status', {\r\n\t\t\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\t\t\tserver: server\r\n\t\t\t\t\t}).then(function (response) {\r\n\t\t\t\t\t\tif (response === 'exists') {\r\n\t\t\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\t\t\tstatus.css('color', '#2CC185').text(opts.form.sftp_available);\r\n\t\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\t\tstatus.hide();\r\n\t\t\t\t\t\t\t}, 1500);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\t\t\tstatus.show().css('color', 'red').text(opts.form.sftp_warning);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}).fail(function (e) {\r\n\t\t\t\t\t\tstatus.hide();\r\n\t\t\t\t\t\thelper.ajax_fail(e);\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstatus.hide();\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.on('click', '[name=\"save_feed_config\"]', function (e) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\t$('#updatefeed').trigger('submit', {\r\n\t\t\t\t\tsave: true\r\n\t\t\t\t});\r\n\t\t\t})\r\n\t\t\t.on('change', '#provider', function (event) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\r\n\t\t\t\t//if (!$(this).closest('.generateFeed').hasClass('add-new')) return; // only for new feed.\r\n\r\n\t\t\t\tlet merchant = $(this).val(),\r\n\t\t\t\t\tfeedType = $(\"#feedType\"),\r\n\t\t\t\t\tfeedForm = $(\"#providerPage\"),\r\n\t\t\t\t\tmerchantInfo = $('#feed_merchant_info'); // set loading..\r\n\t\t\t\t\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\tfeedForm.html('<h3><span style=\"float:none;margin: -3px 0 0;\" class=\"spinner is-active\"></span> ' + opts.form.loading_tmpl + '</h3>'); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html, WordPressVIPMinimum.JS.StringConcat.Found\r\n\t\t\t\t\r\n\t\t\t\tmerchantInfo.find('.spinner').addClass('is-active');\r\n\t\t\t\tfeedType.disabled(!0); // disable dropdown\r\n\t\t\t\t\r\n\t\t\t\tfeedType.parent().find('.spinner').addClass('is-active');\r\n\t\t\t\tmerchantInfo.find('.merchant-info-section .data').html(''); // remove previous data\r\n\t\t\t\t// Get Merchant info for selected Provider/Merchant\r\n\r\n\r\n\t\t\t\t\r\n\t\t\t\tif (merchantInfoCache.hasOwnProperty(merchant)) {\r\n\t\t\t\t\tfeedEditor.renderMerchantInfo(merchantInfo, feedType, merchantInfoCache[merchant]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\twpAjax.send('woo_feed_get_merchant_info', {\r\n\t\t\t\t\t\ttype: 'GET',\r\n\t\t\t\t\t\tdata: {\r\n\t\t\t\t\t\t\tnonce: opts.nonce,\r\n\t\t\t\t\t\t\tprovider: merchant\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}).then(function (r) {\r\n\t\t\t\t\t\tmerchantInfoCache[merchant] = r;\r\n\t\t\t\t\t\tfeedEditor.renderMerchantInfo(merchantInfo, feedType, r);\r\n\t\t\t\t\t}).fail(helper.ajax_fail);\r\n\t\t\t\t} // Get FeedForm For Selected Provider/Merchant\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif (merchantTemplateCache.hasOwnProperty(merchant)) {\r\n\t\t\t\t\tfeedEditor.renderMerchantTemplate(feedForm, merchantTemplateCache[merchant]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\twpAjax.post('get_feed_merchant', {\r\n\t\t\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\t\t\tmerchant: merchant\r\n\t\t\t\t\t}).then(function (r) {\r\n\t\t\t\t\t\tmerchantTemplateCache[merchant] = r;\r\n\t\t\t\t\t\tfeedEditor.renderMerchantTemplate(feedForm, r);\r\n\r\n\t\t\t\t\t\t//when merchant is bing, change delimiter and enclosure\r\n\t\t\t\t\t\tif( 'bing' === merchant ) {\r\n\t\t\t\t\t\t\t//delimiter value\r\n\t\t\t\t\t\t\t$(\"#delimiter option\").removeAttr('selected');\r\n\t\t\t\t\t\t\t$(\"#delimiter option[value=\\\"tab\\\"]\").attr('selected', 'selected');\r\n\r\n\t\t\t\t\t\t\t//enclosure value\r\n\t\t\t\t\t\t\t$(\"#enclosure option\").removeAttr('selected');\r\n\t\t\t\t\t\t\t$(\"#enclosure option[value=\\\" \\\"]\").attr('selected', 'selected');\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t//reviewer options hide\r\n\t\t\t\t\t\tif( 'google_product_review' !== merchant) {\r\n\t\t\t\t\t\t\t$('.wf_attributes option[value=\"reviewer_name\"]').hide();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}).fail(helper.ajax_fail);\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t// Feed Active and Inactive status change via ajax\r\n\t\t\t.on('change', '.woo_feed_status_input', function () {\r\n\t\t\t\tlet self = $(this);\r\n\t\t\t\twpAjax.post('update_feed_status', {\r\n\t\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\t\tfeedName: self.val(),\r\n\t\t\t\t\tstatus: self[0].checked ? 1 : 0\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t// event with trigger\r\n\t\t$(document)\r\n\t\t\t.on('change', '[name=\"is_outOfStock\"], [name=\"product_visibility\"]', function () {\r\n\t\t\t\tlet outOfStockVisibilityRow = $('.out-of-stock-visibility');\r\n\t\t\t\tif ($('[name=\"is_outOfStock\"]:checked').val() === 'n' && $('[name=\"product_visibility\"]:checked').val() === '1') {\r\n\t\t\t\t\toutOfStockVisibilityRow.show();\r\n\t\t\t\t} else {\r\n\t\t\t\t\toutOfStockVisibilityRow.hide();\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.on('change', '.attr_type', function () {\r\n\t\t\t\t// Attribute type selection\r\n\t\t\t\tlet self = $(this),\r\n\t\t\t\t\ttype = self.val(),\r\n\t\t\t\t\trow = self.closest('tr');\r\n\t\t\t\t\r\n\t\t\t\tif (type === 'pattern') {\r\n\t\t\t\t\trow.find('.wf_attr').hide();\r\n\t\t\t\t\trow.find('.wf_attr').val('');\r\n\t\t\t\t\trow.find('.wf_default').show();\r\n\t\t\t\t} else {\r\n\t\t\t\t\trow.find('.wf_attr').show();\r\n\t\t\t\t\trow.find('.wf_default').hide();\r\n\t\t\t\t\trow.find('.wf_default').val('');\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.on('change', '.wf_mattributes, .attr_type', function () {\r\n\t\t\t\tlet row = $(this).closest('tr'),\r\n\t\t\t\t\tattribute = row.find('.wf_mattributes'),\r\n\t\t\t\t\ttype = row.find('.attr_type'),\r\n\t\t\t\t\tvalueColumn = row.find('td:eq(4)'),\r\n\t\t\t\t\tprovider = $('#provider').val();\r\n\t\t\t\t\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\tif (opts.form.google_category.hasOwnProperty(attribute.val()) && type.val() === 'pattern' && helper.in_array(provider, opts.form.google_category[attribute.val()])) {\r\n\t\t\t\t\tif (valueColumn.find('select.selectize').length === 0) {\r\n\t\t\t\t\t\tvalueColumn.find('input.wf_default').remove();\r\n\t\t\t\t\t\tvalueColumn.append('<span class=\"wf_default wf_attributes\"><select name=\"default[]\" class=\"selectize\"></select></span>');\r\n\t\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\t\tvalueColumn.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\">${opts.learn_more}</a></span>`);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (!googleCategories) {\r\n\t\t\t\t\t\t\tvalueColumn.append('<span class=\"spinner is-active\" style=\"margin: 0;\"></span>');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tlet select = valueColumn.find('.wf_attributes select');\r\n\t\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\t\thelper.selectize(select, {\r\n\t\t\t\t\t\t\tpreload: true,\r\n\t\t\t\t\t\t\tplaceholder: opts.form.select_category,\r\n\t\t\t\t\t\t\tload: function load(query, cb) {\r\n\t\t\t\t\t\t\t\tif (!googleCategories) {\r\n\t\t\t\t\t\t\t\t\twpAjax.send('get_google_categories', {\r\n\t\t\t\t\t\t\t\t\t\ttype: 'GET',\r\n\t\t\t\t\t\t\t\t\t\tdata: {\r\n\t\t\t\t\t\t\t\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\t\t\t\t\t\t\t\taction: \"get_google_categories\",\r\n\t\t\t\t\t\t\t\t\t\t\tprovider: provider\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}).then(function (r) {\r\n\t\t\t\t\t\t\t\t\t\tgoogleCategories = r;\r\n\t\t\t\t\t\t\t\t\t\tcb(googleCategories);\r\n\t\t\t\t\t\t\t\t\t\tvalueColumn.find('.spinner').remove();\r\n\t\t\t\t\t\t\t\t\t}).fail(helper.ajax_fail);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tcb(googleCategories);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (attribute.val() !== 'current_category' && valueColumn.find('input.wf_default').length === 0) {\r\n\t\t\t\t\t\tvalueColumn.find('span').remove();\r\n\t\t\t\t\t\tvalueColumn.append('<input autocomplete=\"off\" class=\"wf_default wf_attributes\" type=\"text\" name=\"default[]\" value=\"\">');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (type.val() !== 'pattern') {\r\n\t\t\t\t\t\t\tvalueColumn.find('input.wf_default').hide();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.on('change', '#feedType,#provider', function (e) {\r\n\t\t\t\tlet type = $('#feedType').val(),\r\n\t\t\t\t\tprovider = $('#provider').val(),\r\n\t\t\t\t\titemWrapper = $('.itemWrapper'),\r\n\t\t\t\t\twf_csv_txt = $('.wf_csvtxt');\r\n\t\t\t\t\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\tif (type !== '' && helper.in_array(provider, opts.form.item_wrapper_hidden)) {\r\n\t\t\t\t\titemWrapper.hide();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//when feed type is changed\r\n\t\t\t\tif( 'feedType' === e.target.id ) {\r\n\t\t\t\t\tif (type === 'csv' || type === 'txt') {\r\n\t\t\t\t\t\titemWrapper.hide();\r\n\t\t\t\t\t\twf_csv_txt.show();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\titemWrapper.show();\r\n\t\t\t\t\t\twf_csv_txt.hide();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t})\r\n\t\t\t.trigger('change');\r\n\t});\r\n})(jQuery, window, document, wp.ajax, wpf_ajax_obj);\r\n"]}
|
1 |
+
{"version":3,"sources":["woo-feed-admin.js"],"names":["_defineProperties","target","props","descriptor","i","_createClass","Constructor","protoProps","staticProps","prototype","window","wpAjax","self","prop","showTooltip","$","hasClass","currentTarget","clearTooltip","removeClass","actionMsg","className","match","index","action","removeAttr","actionKey","elem","addClass","attr","msg","extend","_default","_args","clip","$copyBtn","feedGenerator","left","event","trigger","test","navigator","on","console","googleCategories","in_array","needle","haystack","sortable","escape","data","text","ajax_fail","column_count","find","warn","wf_sortable","selectize_render_item","e","hasOwnProperty","opts","ajax","error","statusText","status","el","config","column","_onDrop","each","this","length","selectize","itemPath","create","concat","plugins","$item","container","containerSelector","group","options","bodyClass","itemSelector","handle","onDrop","fancySelect","maxItemShow","split","map","s","trim","helper","render","item","replace","x","form","merchantInfo","document","jQuery","k","init","renderMerchantInfo","opt","feedType","r","types","html","t","toLowerCase","na","disabled","val","_loop2","feedForm","contentSettings","renderMerchantTemplate","feedEditor","is","merchantInfoCache","tooltip","css","top","isRegenerating","_feed","_current_btn","feed","_limit","generator","limit","_progress","_product_ids","_progress_per_batch","_refresh","_all_btn","generate","condition","then","_current_btn_label","response","_color","preventDefault","parent","hide","_ajax_nonce","_log","_updateProgressStatus","message","key","regenerate","_block_button","value","_this","product","setTimeout","_stopProgressBar","_process_batch","_current_batch","_total_batch","post","_save_feed_file","fail","_resetProgressBar","_unblock_button","refreshInterval","arguments","undefined","clearInterval","_timer","_updateProgressBar","update","table","show","width","bar","wf","current_page_url_query","postboxes","location","setInterval","URLSearchParams","pagenow","template","common","hover","title","appendTo","userAgent","merchantTemplateCache","remove","ClipboardJS","clipboard","slideToggle","loader","tbody","reload","nonce","status_area","select","execCommand","button","fancyOption","fancyDataPicker","selectIf","price_attributes","selectKey","percentage","outputSelect","parents","includes","current_attribute_value","indexOf","row","closest","reindex_config_table","type","_ajax_clean_nonce","server","validate","save","sftp_checking","sftp_available","confirm","send","provider","merchant","checked","outOfStockVisibilityRow","feedName","valueColumn","attribute","preload","load","google_category","query","learn_more","append","cb","itemWrapper","wf_csv_txt","id","wpf_ajax_obj"],"mappings":"yHAAA,SAAAA,kBAAAC,EAAAC,+BACA,IAAAC,EAAAD,EAAAE,kHADA,SAAAC,aAAAC,EAAAC,EAAAC,GAWC,OAFDD,GAAAP,kBAAAM,EAAAG,UAAAF,GARAC,GAAAE,kBAAAC,EAAAH,GAUCF,gFA0BGM,IAAAA,EAAAA,EAAAA,MACAC,EAAAD,gBAEA,IAAAA,EAAAA,KAAAC,GAHAD,EAAAA,KAAAA,OAAAA,IAAAA,IAAAA,IAAAA,4EAYF,IAAAE,EAAAA,EAAAA,MAEAC,EAAA,WACA,YAHA,IAAAH,EAAAC,KAAAA,GAAAD,EAAAC,KAAAA,GAAAD,EAAAI,SAAAH,IAUQI,SAWRC,EAXuBC,GAAaC,EAAAA,EAAAA,eAAuBC,YAAUC,SAAMC,EAAhBC,GAAvB,OAA+EL,EAAAA,MAAAA,sBAAAA,IAAAA,KAAAA,OADpHC,YAAA,cAAAK,WAAAC,cAKGC,SAAFZ,EAAAA,EAAAA,GACAA,EAEDY,GAAAC,SAAA,2BAAAC,KAAA,aAAAC,GAiCyB,SAAAC,EAAAC,EAAAC,GAAA,OAvBvBlB,EAAAgB,QAAA,EAAA,GAAAC,EAAAC,GAHAb,SA8MEc,IAEAtB,EAAAA,EAAAA,4GAxRLuB,EA4RMC,KAAAA,WAEAC,EAAAA,MAAAA,GAAAA,aAAAA,GAAAA,GAAAA,OAAAA,oEAvMLvB,EAAAwB,EAAAC,WA2MQD,EAAAd,oEA5NG,gBAATO,OAAAS,KAAAC,UAAAT,WAAAZ,WAAAA,EAAAA,OAAAA,EAEAA,cAAAA,EAAAA,OAAAA,MA0NMsB,GAAA,UAAA,SAAAJ,6BAxOPvB,IA0CE4B,EAfYC,KAAfC,SAAA,SAAAC,EAAAC,uFAQIC,MAAAA,yCAAwBF,O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.js","sourcesContent":["// noinspection JSUnresolvedletiable\r\n/**!\r\n * WooFeed Scripts\r\n * @version 3.3.6\r\n * @package WooFeed\r\n * @copyright 2020 WebAppick\r\n *\r\n */\r\n/* global ajaxurl, wpAjax, postboxes, pagenow, alert, deleteUserSetting, typenow, adminpage, thousandsSeparator, decimalPoint, isRtl */\r\n// noinspection JSUnresolvedVariable\r\n(function($, window, document, wpAjax, opts) {\r\n\t\"use strict\";\r\n\t/**\r\n\t * All of the code for your admin-facing JavaScript source\r\n\t * should reside in this file.\r\n\t *\r\n\t * Note: It has been assumed you will write jQuery code here, so the\r\n\t * $ function reference has been prepared for usage within the scope\r\n\t * of this function.\r\n\t *\r\n\t * This enables you to define handlers, for when the DOM is ready:\r\n\t */\r\n\r\n\t/**\r\n\t * disable element utility\r\n\t *\r\n\t * @since 3.1.9\r\n\t *\r\n\t * @param {*} status\r\n\t * @returns {jQuery|HTMLElement}\r\n\t */\r\n\t$.fn.disabled = function(status) {\r\n\t\t$(this).each(function() {\r\n\t\t\tlet self = $(this),\r\n\t\t\t\tprop = 'disabled';\r\n\r\n\t\t\tif (typeof self.prop(prop) !== 'undefined') {\r\n\t\t\t\tself.prop(prop, status === void 0 || status === true);\r\n\t\t\t} else {\r\n\t\t\t\t!0 === status ? self.addClass(prop) : self.removeClass(prop);\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn self; // method chaining\r\n\t};\r\n\t\r\n\t/**\r\n\t * Check if a HTMLElement or jQuery is disabled\r\n\t */\r\n\t$.fn.isDisabled = function() {\r\n\t\tlet self = $(this),\r\n\t\t\tprop = 'disabled';\r\n\t\treturn typeof self.prop(prop) !== 'undefined' ? self.prop(prop) : self.hasClass(prop);\r\n\t};\r\n\t\r\n\t/**\r\n\t * Clear Tooltip for clip board js\r\n\t * @param {Object} event\r\n\t */\r\n\tconst clearTooltip = (event) => {\r\n\t\t$(event.currentTarget).removeClass( (index, className) => (className.match(/\\btooltipped-\\S+/g) || []).join(' ') ).removeClass('tooltipped').removeAttr('aria-label');\r\n\t};\r\n\r\n\tconst showTooltip = (elem, msg) => {\r\n\t\t$(elem).addClass('tooltipped tooltipped-s').attr('aria-label', msg);\r\n\t};\r\n\r\n\tconst fallbackMessage = (action) =>{\r\n\t\tlet actionMsg,\r\n\t\t\tactionKey = action === 'cut' ? 'X' : 'C';\r\n\r\n\t\tif (/iPhone|iPad/i.test(navigator.userAgent)) {\r\n\t\t\tactionMsg = 'No support :(';\r\n\t\t} else if (/Mac/i.test(navigator.userAgent)) {\r\n\t\t\tactionMsg = 'Press ⌘-' + actionKey + ' to ' + action;\r\n\t\t} else {\r\n\t\t\tactionMsg = 'Press Ctrl-' + actionKey + ' to ' + action;\r\n\t\t}\r\n\r\n\t\treturn actionMsg;\r\n\t};\r\n\t\r\n\t/**\r\n\t * Alias of jQuery.extend()\r\n\t * @param {Object} _default\r\n\t * @param {Object} _args\r\n\t */\r\n\tconst extend = (_default, _args) => $.extend(true, {}, _default, _args);\r\n\t\r\n\tlet $copyBtn,\r\n\t\tclipboard,\r\n\t\tgoogleCategories,\r\n\t\thelper = {\r\n\t\t\tin_array: (needle, haystack) => {\r\n\t\t\t\ttry {\r\n\t\t\t\t\treturn haystack.indexOf(needle) !== -1;\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tselectize_render_item: (data, escape) => `<div class=\"item wapk-selectize-item\">${ escape(data.text)}</div>`, // phpcs:ignore WordPressVIPMinimum.JS.StringConcat.Found,\r\n\t\t\tajax_fail: e => {\r\n\t\t\t\tconsole.warn(e);\r\n\t\t\t\talert(e.hasOwnProperty('statusText') && e.hasOwnProperty('status') ? opts.ajax.error + '\\n' + e.statusText + ' (' + e.status + ')' : e);\r\n\t\t\t},\r\n\t\t\t/**\r\n\t\t\t * Initialize Sortable\r\n\t\t\t * @param {jQuery|HTMLElement} el\r\n\t\t\t * @param {object} config\r\n\t\t\t * @param {int|boolean} column\r\n\t\t\t * @param {function} onDrop\r\n\t\t\t * @return {jQuery|HTMLElement}\r\n\t\t\t */\r\n\t\t\tsortable: (el, config, column, onDrop) => {\r\n\t\t\t\treturn (el || $('.sorted_table')).each(function() {\r\n\t\t\t\t\tlet self = $(this),\r\n\t\t\t\t\t\tcolumn_count = self.find('tbody > tr:eq(0) > td').length || column || 9;\r\n\t\t\t\t\tself.wf_sortable(extend({\r\n\t\t\t\t\t\tcontainerSelector: 'table',\r\n\t\t\t\t\t\titemPath: '> tbody',\r\n\t\t\t\t\t\titemSelector: 'tr',\r\n\t\t\t\t\t\thandle: 'i.wf_sortedtable',\r\n\t\t\t\t\t\tplaceholder: `<tr class=\"placeholder\"><td colspan=\"${column_count}\"></td></tr>`,\r\n\t\t\t\t\t\tonDrop: ($item, container, _super, event) => {\r\n\t\t\t\t\t\t\t$item.removeClass(container.group.options.draggedClass).removeAttr('style');\r\n\t\t\t\t\t\t\t$(\"body\").removeClass(container.group.options.bodyClass);\r\n\t\t\t\t\t\t\tif ( onDrop && 'function' === typeof( onDrop ) ) {\r\n\t\t\t\t\t\t\t\tonDrop( $item, container, _super, event );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t}, config));\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\tselectize: (el, config) => {\r\n\t\t\t\treturn (el || $('select.selectize')).not('.selectized').each(function() {\r\n\t\t\t\t\tlet self = $(this);\r\n\t\t\t\t\tself.selectize(extend({\r\n\t\t\t\t\t\tcreate: self.data('create') || false,\r\n\t\t\t\t\t\tplugins: self.data('plugins') ? self.data('plugins').split(',').map(function(s) {\r\n\t\t\t\t\t\t\treturn s.trim();\r\n\t\t\t\t\t\t}) : [],\r\n\t\t\t\t\t\t//['remove_button'],\r\n\t\t\t\t\t\trender: {\r\n\t\t\t\t\t\t\titem: helper.selectize_render_item\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}, config));\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\tfancySelect: (el, config) => {\r\n\t\t\t\treturn (el || $('select.fancySelect')).not('.FancySelectInit').each(function() {\r\n\t\t\t\t\tlet self = $(this);\r\n\t\t\t\t\tself.fancySelect(extend({\r\n\t\t\t\t\t\tmaxItemShow: 3\r\n\t\t\t\t\t}, config));\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\treindex_config_table: () => {\r\n\t\t\t\t$('#table-1').find('tbody tr').each( ( x, el ) => {\r\n\t\t\t\t\t$(el).find('[name]').each( ( x1, el ) => {\r\n\t\t\t\t\t\t$(el).attr('name', $(el).attr('name').replace(/(\\[\\d\\])/g, `[${x}]`));\r\n\t\t\t\t\t} );\r\n\t\t\t\t} );\r\n\t\t\t},\r\n\t\t\tcommon: () => {\r\n\t\t\t\thelper.sortable( $('.sorted_table'), {}, 9, helper.reindex_config_table );\r\n\t\t\t\thelper.selectize();\r\n\t\t\t\thelper.fancySelect($('.outputType'));\r\n\t\t\t}\r\n\t\t},\r\n\t\t// helper functions\r\n\t\tfeedEditor = {\r\n\t\t\t/**\r\n\t\t\t * The Editor Form Elem.\r\n\t\t\t * @type {jQuery|HTMLElement}\r\n\t\t\t */\r\n\t\t\tform: null,\r\n\r\n\t\t\t/**\r\n\t\t\t * Initialize The Feed Editor {Tabs...}\r\n\t\t\t * @returns {void}\r\n\t\t\t */\r\n\t\t\tinit: function () {\r\n\t\t\t\tlet self = this;\r\n\t\t\t\tself.form = $('.generateFeed');\r\n\t\t\t\tif (!self.form.length) return;\r\n\t\t\t\thelper.common();\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t$(document).trigger(new jQuery.Event('feedEditor.init', {\r\n\t\t\t\t\ttarget: this.form\r\n\t\t\t\t}));\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Render Merchant info ajax response and handle allowed feed type for selected merchant\r\n\t\t\t * @param {jQuery|HTMLElement} merchantInfo jQuery dom object\r\n\t\t\t * @param {jQuery|HTMLElement} feedType jQuery dom object\r\n\t\t\t * @param {Object} r ajax response object\r\n\t\t\t */\r\n\t\t\trenderMerchantInfo: function (merchantInfo, feedType, r) {\r\n\t\t\t\tfor (let k in r) {\r\n\t\t\t\t\tif (r.hasOwnProperty(k)) {\r\n\t\t\t\t\t\tmerchantInfo.find('.merchant-info-section.' + k + ' .data').html(r[k]); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html\r\n\r\n\t\t\t\t\t\tif ('feed_file_type' === k) {\r\n\t\t\t\t\t\t\t(function() {\r\n\t\t\t\t\t\t\t\tlet types = r[k].split(\",\").map(function(t) {\r\n\t\t\t\t\t\t\t\t\treturn t.trim().toLowerCase();\r\n\t\t\t\t\t\t\t\t}).filter(function(t) {\r\n\t\t\t\t\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\t\t\t\t\treturn t !== '' && t !== opts.na.toLowerCase();\r\n\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\t\tif (types.length) {\r\n\t\t\t\t\t\t\t\t\tfeedType.find('option').removeAttr('selected').each(function() {\r\n\t\t\t\t\t\t\t\t\t\tlet opt = $(this);\r\n\t\t\t\t\t\t\t\t\t\topt.val() && !helper.in_array(opt.val(), types) ? opt.disabled(!0) : opt.disabled(!1);\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\tif (types.length === 1) feedType.find('option[value=\"' + types[0] + '\"]').attr('selected', 'selected');\r\n\t\t\t\t\t\t\t\t} else feedType.find('option').disabled(!1);\r\n\t\t\t\t\t\t\t})();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmerchantInfo.find('.spinner').removeClass('is-active');\r\n\t\t\t\tfeedType.disabled(!1);\r\n\t\t\t\tfeedType.trigger('change');\r\n\t\t\t\tfeedType.parent().find('.spinner').removeClass('is-active');\r\n\t\t\t},\r\n\r\n\t\t\t/**\r\n\t\t\t * Render Feed Template Tabs and settings while creating new feed.\r\n\t\t\t * @param {jQuery|HTMLElement} feedForm feed from query dom object\r\n\t\t\t * @param {object} r merchant template ajax response object\r\n\t\t\t */\r\n\t\t\trenderMerchantTemplate: function (feedForm, r) {\r\n\t\t\t\tlet _loop = function _loop(k) {\r\n\t\t\t\t\tif (r.hasOwnProperty(k)) {\r\n\t\t\t\t\t\tif ('tabs' === k) {\r\n\t\t\t\t\t\t\t// noinspection JSUnresolvedFunction\r\n\t\t\t\t\t\t\tfeedForm.html(r[k]); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tlet contentSettings = $('[name=\"' + k + '\"]');\r\n\r\n\t\t\t\t\t\t\tif (contentSettings.length) {\r\n\t\t\t\t\t\t\t\tcontentSettings.each(function() {\r\n\t\t\t\t\t\t\t\t\tlet elem = $(this);\r\n\r\n\t\t\t\t\t\t\t\t\tif (elem.is('select')) {\r\n\t\t\t\t\t\t\t\t\t\telem.find('[value=\"' + r[k] + '\"]').prop('selected', true);\r\n\t\t\t\t\t\t\t\t\t} else if ((elem.is('[type=checkbox]') || elem.is('[type=radio]')) && elem.val() === r[k]) {\r\n\t\t\t\t\t\t\t\t\t\telem.prop('checked', true);\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\telem.val(r[k]); // type=text\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}).trigger('change');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\tfor (let k in r) {\r\n\t\t\t\t\t_loop(k);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfeedEditor.init();\r\n\t\t\t}\r\n\t\t},\r\n\t\t// Feed Editor Table\r\n\t\tmerchantInfoCache = [],\r\n\t\tmerchantTemplateCache = [],\r\n\t\ttooltip = () => {\r\n\t\t\t// Tooltip only Text\r\n\t\t\t$('.wfmasterTooltip')\r\n\t\t\t\t.hover(function () {\r\n\t\t\t\t\t// Hover over code\r\n\t\t\t\t\tlet self = $(this), title = self.attr('wftitle');\r\n\t\t\t\t\tself.data('tipText', title).removeAttr('wftitle');\r\n\t\t\t\t\t$('<p class=\"wftooltip\"></p>').text(title).appendTo('body').fadeIn('slow');\r\n\t\t\t\t}, function () {\r\n\t\t\t\t\t// Hover out code\r\n\t\t\t\t\tlet self = $(this);\r\n\t\t\t\t\tself.attr('wftitle', self.data('tipText'));\r\n\t\t\t\t\t$('.wftooltip').remove();\r\n\t\t\t\t})\r\n\t\t\t\t.mousemove(function (e) {\r\n\t\t\t\t\t$('.wftooltip').css({\r\n\t\t\t\t\t\ttop: e.pageY + 10,\r\n\t\t\t\t\t\tleft: e.pageX + 20\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t},\r\n\t\tclip = () => {\r\n\t\t\t$copyBtn = $('.toClipboard');\r\n\t\t\tif (!ClipboardJS.isSupported() || /iPhone|iPad/i.test(navigator.userAgent)) {\r\n\t\t\t\t$copyBtn.find('img').hide(0);\r\n\t\t\t} else {\r\n\t\t\t\t$copyBtn.each(function() {\r\n\t\t\t\t\t$(this).on('mouseleave', clearTooltip).on('blur', clearTooltip);\r\n\t\t\t\t});\r\n\t\t\t\tclipboard = new ClipboardJS('.toClipboard');\r\n\t\t\t\tclipboard.on('error', function(event) {\r\n\t\t\t\t\tshowTooltip(event.trigger, fallbackMessage(event.action));\r\n\t\t\t\t}).on('success', function(event) {\r\n\t\t\t\t\tshowTooltip(event.trigger, 'Copied!');\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t};\r\n\t\r\n\t/**\r\n\t * Feed Generator Module\r\n\t */\r\n\tclass feedGenerator {\r\n\t\t\r\n\t\t/**\r\n\t\t * Constructor\r\n\t\t * @constructor\r\n\t\t */\r\n\t\tconstructor() {\r\n\t\t\tthis._feed = opts.generator.feed; // wf_config+xxxx\r\n\t\t\tthis._limit = opts.generator.limit;\r\n\t\t\tthis._progress = 0;\r\n\t\t\tthis._timer = null;\r\n\t\t\tthis._color = false;\r\n\t\t\t// batch info\r\n\t\t\tthis._total_batch = 0;\r\n\t\t\tthis._current_batch = 0;\r\n\t\t\tthis._product_ids = [];\r\n\t\t\tthis._progress_per_batch = 0;\r\n\t\t\tthis._refresh = true;\r\n\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\tthis._regenerate = opts.generator.regenerate;\r\n\t\t\twindow.isRegenerating = false;\r\n\t\t\tthis._all_btn = $('.wpf_regenerate');\r\n\t\t\tthis._current_btn = $(`#${this._feed.replace( 'wf_config', 'wf_feed_' )}`);\r\n\t\t\tthis._current_btn_label = '';\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Init Hooks (Event)\r\n\t\t * @return {feedGenerator}\r\n\t\t */\r\n\t\tinit() {\r\n\t\t\tlet self = this;\r\n\t\t\tif ( '' !== this._feed && this._regenerate && false === window.isRegenerating ) {\r\n\t\t\t\tthis.generate();\r\n\t\t\t}\r\n\r\n\t\t\t//thickbox body add feed plugin class to make it unique and custom style\r\n\t\t\tlet current_page_query = window.location.search;\r\n\t\t\tlet params = new URLSearchParams(current_page_query);\r\n\t\t\tlet page_name = params.get(\"page\");\r\n\t\t\tif( \"webappick-manage-feeds\" === page_name ) {\r\n\t\t\t\t$('body').addClass('woo-import-popup-body');\r\n\t\t\t}\r\n\r\n\t\t\t$(document).on('click', '.woo-feed-campaign-close-button', function(event) {\r\n\t\t\t\tevent.preventDefault();\r\n\r\n\t\t\t\t$(this).parent('.woo-feed-promotion').hide();\r\n\t\t\t\tlet condition = $(this).data('condition');\r\n\t\t\t\tif(1 === condition) {\r\n\t\t\t\t\twpAjax.post( 'woo_feed_hide_promotion', {\r\n\t\t\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\t\t\tcondition: condition,\r\n\t\t\t\t\t} ).then( response => {\r\n\t\t\t\t\t\tself._log( response );\r\n\t\t\t\t\t} ).fail( error => {\r\n\t\t\t\t\t\tself._log( error );\r\n\t\t\t\t\t\tself._updateProgressStatus( error.message );\r\n\t\t\t\t\t\tself._color = 'red';\r\n\t\t\t\t\t} );\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t$(document).on('click', '.wpf_regenerate', function(event) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\tself._current_btn = $( this );\r\n\t\t\t\tif( self._current_btn.hasClass('disabled') || window.isRegenerating === true ) return;\r\n\t\t\t\tself._feed = self._current_btn.attr('id').replace( 'wf_feed_', 'wf_config' );\r\n\t\t\t\tif( '' !== self._feed ) {\r\n\t\t\t\t\tself.generate();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t_block_button() {\r\n\t\t\tif ( this._all_btn.length ) {\r\n\t\t\t\tthis._all_btn.addClass('disabled');\r\n\t\t\t}\r\n\t\t\tif ( this._current_btn.length ) {\r\n\t\t\t\tthis._current_btn.find('span').addClass('wpf_spin reverse_spin');\r\n\t\t\t\tthis._current_btn_label = this._current_btn.attr('title');\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\tthis._current_btn.attr( 'aria-label', opts.regenerate ).attr( 'title', opts.regenerate );\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t_unblock_button() {\r\n\t\t\tif ( this._all_btn.length ) {\r\n\t\t\t\tthis._all_btn.removeClass('disabled');\r\n\t\t\t}\r\n\t\t\tif ( this._current_btn.length ) {\r\n\t\t\t\tthis._current_btn.find('span').removeClass('wpf_spin');\r\n\t\t\t\tthis._current_btn.find('span').removeClass('reverse_spin');\r\n\t\t\t\tthis._current_btn.attr( 'aria-label', this._current_btn_label ).attr( 'title', this._current_btn_label );\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Generate Feed\r\n\t\t * @return void\r\n\t\t */\r\n\t\tgenerate() {\r\n\t\t\tlet self = this;\r\n\t\t\twindow.isRegenerating = true;\r\n\t\t\tthis._block_button();\r\n\t\t\tthis._resetProgressBar();\r\n\t\t\tthis._progressBarActive();\r\n\t\t\tthis._log( 'Counting Total Products' );\r\n\t\t\tthis._updateProgressStatus( 'Fetching products.' );\r\n\t\t\tthis._get_product_ids().then( response => {\r\n\t\t\t\tthis._progress = 10;\r\n\t\t\t\tself._log( {response} );\r\n\t\t\t\tif(response.success) {\r\n\t\t\t\t\tself._log( `Total ${response.total} Products found.` );\r\n\t\t\t\t\tself._product_ids = response.product;\r\n\t\t\t\t\tself._total_batch = this._product_ids.length;\r\n\t\t\t\t\tself._current_batch = 0;\r\n\t\t\t\t\tself._progress_per_batch = ( 90 - this._progress ) / this._total_batch;\r\n\t\t\t\t\tself._process_batch();\r\n\t\t\t\t\tself._updateProgressStatus( 'Processing Products...' );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tself._updateProgressStatus( response.data.message );\r\n\t\t\t\t}\r\n\t\t\t}).fail( error => {\r\n\t\t\t\tself._log( error );\r\n\t\t\t\tself._updateProgressStatus( error.message );\r\n\t\t\t\tself._color = 'red';\r\n\t\t\t\tsetTimeout( function(){\r\n\t\t\t\t\tself._stopProgressBar();\r\n\t\t\t\t\tself._unblock_button();\r\n\t\t\t\t}, 1500 );\r\n\t\t\t} );\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Get Product Ids\r\n\t\t * @returns {$.promise}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_get_product_ids() {\r\n\t\t\tthis._progress = 5;\r\n\t\t\treturn wpAjax.post( 'get_product_information', {\r\n\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\tfeed: this._feed,\r\n\t\t\t\tlimit: this._limit,\r\n\t\t\t} );\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Run the Batch\r\n\t\t * @private\r\n\t\t */\r\n\t\t_process_batch() {\r\n\t\t\tlet self = this;\r\n\t\t\tlet status = `Processing Batch ${this._current_batch+1} of ${this._total_batch}`;\r\n\t\t\tthis._updateProgressStatus( status );\r\n\t\t\tthis._log( status );\r\n\t\t\twpAjax.post( 'make_batch_feed', {\r\n\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\tfeed: this._feed,\r\n\t\t\t\tproducts: this._product_ids[this._current_batch],\r\n\t\t\t\tloop: this._current_batch,\r\n\t\t\t} ).then( response => {\r\n\t\t\t\tself._current_batch++;\r\n\t\t\t\tself._log( `Batch ${self._current_batch} Completed` );\r\n\t\t\t\tself._log( response );\r\n\t\t\t\tif ( self._current_batch < self._total_batch ) {\r\n\t\t\t\t\tself._process_batch();\r\n\t\t\t\t\tself._progress += self._progress_per_batch;\r\n\t\t\t\t}\r\n\t\t\t\tif ( self._current_batch === self._total_batch ) {\r\n\t\t\t\t\tself._save_feed_file();\r\n\t\t\t\t}\r\n\t\t\t} ).fail( error => {\r\n\t\t\t\tself._log( error );\r\n\t\t\t\tself._updateProgressStatus( error.message );\r\n\t\t\t\tself._color = 'red';\r\n\t\t\t\tsetTimeout( function(){\r\n\t\t\t\t\tself._stopProgressBar();\r\n\t\t\t\t\tself._unblock_button();\r\n\t\t\t\t}, 1500 );\r\n\t\t\t} );\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Save Feed Data from temp to feed file\r\n\t\t * @private\r\n\t\t */\r\n\t\t_save_feed_file() {\r\n\t\t\tlet self = this;\r\n\t\t\tthis._log( 'Saving feed file' );\r\n\t\t\tthis._updateProgressStatus( 'Saving feed file' );\r\n\t\t\twpAjax.post( 'save_feed_file', {\r\n\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\tfeed: this._feed,\r\n\t\t\t} ).then( response => {\r\n\t\t\t\tself._log( response );\r\n\t\t\t\tself._progress = 100;\r\n\t\t\t\tif ( self._refresh ) {\r\n\t\t\t\t\twindow.location.href = `${opts.pages.list.feed}&link=${response.url}&cat=${response.cat}`;\r\n\t\t\t\t}\r\n\t\t\t\tsetTimeout( function(){\r\n\t\t\t\t\tself._stopProgressBar();\r\n\t\t\t\t\tsetTimeout( function(){\r\n\t\t\t\t\t\tself._resetProgressBar( true );\r\n\t\t\t\t\t\tself._unblock_button();\r\n\t\t\t\t\t}, 3000 );\r\n\t\t\t\t}, 2500 );\r\n\t\t\t} ).fail( error => {\r\n\t\t\t\tself._log( error );\r\n\t\t\t\tself._updateProgressStatus( error.message );\r\n\t\t\t\tself._color = 'red';\r\n\t\t\t\tsetTimeout( function(){\r\n\t\t\t\t\tself._stopProgressBar();\r\n\t\t\t\t\tself._unblock_button();\r\n\t\t\t\t}, 1500 );\r\n\t\t\t} );\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Console log wrapper with debug settings.\r\n\t\t * @param data\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_log( data ) {\r\n\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\tif ( opts.wpf_debug ) {\r\n\t\t\t\tconsole.log( data );\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Run the progressbar refresh interval\r\n\t\t * @param {int} refreshInterval\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_progressBarActive( refreshInterval = 0 ) {\r\n\t\t\tlet self = this;\r\n\t\t\tthis._toggleProgressBar( true );\r\n\t\t\tthis._timer = setInterval( function(){\r\n\t\t\t\tself._updateProgressBar();\r\n\t\t\t}, refreshInterval || 1000 );\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Stop Progressbar\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_stopProgressBar() {\r\n\t\t\tclearInterval( this._timer );\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Reset Progressbar\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_resetProgressBar( update ) {\r\n\t\t\tthis._toggleProgressBar( false );\r\n\t\t\tthis._updateProgressStatus( '' );\r\n\t\t\tclearInterval( this._timer );\r\n\t\t\tthis._color = false;\r\n\t\t\tthis._timer = null;\r\n\t\t\tthis._progress = 0;\r\n\t\t\tif ( update ) {\r\n\t\t\t\tthis._updateProgressBar();\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Show hide the progress bar el\r\n\t\t * @param status\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_toggleProgressBar( status ) {\r\n\t\t\tlet table = $('#feed_progress_table');\r\n\t\t\tif ( status ) {\r\n\t\t\t\ttable.show();\r\n\t\t\t} else {\r\n\t\t\t\ttable.hide();\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Update Progress bar text status\r\n\t\t * @param {string} status\r\n\t\t * @returns {feedGenerator}\r\n\t\t * @private\r\n\t\t */\r\n\t\t_updateProgressStatus( status ) {\r\n\t\t\t$( '.feed-progress-status' ).text( status );\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Update Progress Data\r\n\t\t * hooked with setInterval\r\n\t\t * @private\r\n\t\t */\r\n\t\t_updateProgressBar() {\r\n\t\t\tlet percentage = $( '.feed-progress-percentage' ),\r\n\t\t\t\tbar = $( '.feed-progress-bar-fill' ),\r\n\t\t\t\t_progress = `${Math.round( this._progress )}%`;\r\n\t\t\tbar.css( {\r\n\t\t\t\twidth: _progress,\r\n\t\t\t} );\r\n\t\t\tpercentage.text( _progress );\r\n\t\t}\r\n\t}\r\n\t// expose to the global scope\r\n\twindow.wf = {\r\n\t\thelper: helper,\r\n\t\tfeedEditor: feedEditor,\r\n\t\tgenerator: feedGenerator,\r\n\t};\r\n\t$(window).on('load', function() {\r\n\t\t// Template loading ui conflict\r\n\t\tif ($(location).attr(\"href\").match(/webappick.*feed/g) !== null) {\r\n\t\t\t$('#wpbody-content').addClass('woofeed-body-content');\r\n\t\t}\r\n\r\n\t\t// on edit page show item wrapper dropdown\r\n\t\tlet current_page_url_query = window.location.search;\r\n\t\tlet urlParams = new URLSearchParams(current_page_url_query);\r\n\t\tlet page_action = urlParams.get('action');\r\n\r\n\t\t// ClipBoardJS\r\n\t\tclip();\r\n\t\t// postbox toggle\r\n\t\tpostboxes.add_postbox_toggles(pagenow);\r\n\t\t// initialize generator\r\n\t\tlet generator = new feedGenerator();\r\n\t\tgenerator.init();\r\n\t\t// noinspection JSUnresolvedVariable\r\n\t\tif( '' !== opts.generator.feed && opts.generator.regenerate ) {\r\n\t\t\r\n\t\t}\r\n\t\t// initialize editor\r\n\t\tfeedEditor.init();\r\n\t\thelper.common(); // Generate Feed Add Table Row\r\n\t\ttooltip();\r\n\t\t// validate feed editor\r\n\t\t$(\".generateFeed\").validate();\r\n\t\t// document events\r\n\t\t$(document)\r\n\t\t\t.on('click', '[data-toggle_slide]', function(e) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\t$($(this).data('toggle_slide')).slideToggle('fast');\r\n\t\t\t})\r\n\t\t\t// XML Feed Wrapper\r\n\t\t\t.on('click', '#wf_newRow', function () {\r\n\t\t\t\tlet tbody = $('#table-1 tbody'),\r\n\t\t\t\t\ttemplate = $('#feed_config_template').text().trim().replace(/__idx__/g, tbody.find('tr').length);\r\n\t\t\t\ttbody.append(template);\r\n\t\t\t\thelper.fancySelect($('.outputType'));\r\n\t\t\t})\r\n\t\t\t// feed delete alert.\r\n\t\t\t.on('click', '.single-feed-delete', function (event) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\tif (confirm(opts.form.del_confirm)) {\r\n\t\t\t\t\twindow.location.href = $(this).attr('val');\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t// clear cache data.\r\n\t\t\t.on('click', '.wf_clean_cache_wrapper', function(event) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\tvar nonce = $('.woo-feed-clean-cache-nonce').val();\r\n\t\t\t\tvar loader = $('.woo-feed-cache-loader');\r\n\r\n\t\t\t\t//show loader\r\n\t\t\t\tloader.show();\r\n\r\n\t\t\t\t// passed cache nonce\r\n\t\t\t\twpAjax.post('clear_cache_data', {\r\n\t\t\t\t\t_ajax_clean_nonce: nonce\r\n\t\t\t\t}).then(function (response) {\r\n\t\t\t\t\tif( response.success ) {\r\n\t\t\t\t\t\tloader.hide(); //hide loader\r\n\t\t\t\t\t\tlocation.reload();\r\n\t\t\t\t\t}\r\n\t\t\t\t}).fail(function (e) {\r\n\t\t\t\t\tconsole.log('something wrong');\r\n\t\t\t\t});\r\n\r\n\t\t\t})// Copy Status\r\n\t\t\t.on('click', '#woo-feed-copy-status-btn', function(event) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\tlet button = $('#woo-feed-copy-status-btn');\r\n\t\t\t\tlet status_area = $('#woo-feed-status-area');\r\n\t\t\t\tbutton.val('Copied');\r\n\t\t\t\tstatus_area.css('visibility','visible');\r\n\t\t\t\tstatus_area.select();\r\n\r\n\t\t\t\tdocument.execCommand('copy');\r\n\t\t\t})\r\n\t\t\t// feed value dropdown change.\r\n\t\t\t.on('change', '.wf_attr.wf_attributes', function(event) {\r\n\t\t\t\tevent.preventDefault();\r\n\r\n\t\t\t\t$('.fancy-picker-picked').trigger(\"click\"); // trigger fancy select box clicked\r\n\r\n\t\t\t\t// price attributes\r\n\t\t\t\tvar price_attributes = ['price', 'current_price', 'sale_price', 'price_with_tax', 'current_price_with_tax', 'sale_price_with_tax'];\r\n\t\t\t\t// current value\r\n\t\t\t\tvar current_attribute_value = $(this).val();\r\n\t\t\t\tvar outputSelect = $(this).parents('tr').find('.outputType');\r\n\t\t\t\tvar fancyOption = $(this).parents('tr').find('.fancy-picker-content .fancy-picker-option');\r\n\t\t\t\tvar fancyDataPicker = $(this).parents('tr').find('.fancy-picker-data span');\r\n\t\t\t\tvar selectIf, selectKey;\r\n\r\n\t\t\t\t// when any attribute is selected, pick the key\r\n\t\t\t\tif( price_attributes.includes(current_attribute_value) ) {\r\n\t\t\t\t\t// when select any price attribute\r\n\t\t\t\t\tselectIf = 'for_price';\r\n\t\t\t\t\tselectKey = \"Price\";\r\n\t\t\t\t} else if ( \"\" !== current_attribute_value && -1 !== current_attribute_value.indexOf('wf_taxo') ) {\r\n\r\n\t\t\t\t\t// when select any custom taxonomy\r\n\t\t\t\t\tselectIf = 'for_custom_taxo';\r\n\t\t\t\t\tselectKey = \"parent_if_empty\";\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tselectIf = 'for_all';\r\n\t\t\t\t\tselectKey = 'Default';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// remove selected class from old selected option\r\n\t\t\t\tfancyOption.removeClass('selected');\r\n\r\n\t\t\t\t// when value dropdown is selected as price or any custom taxonomy\r\n\t\t\t\tif( selectIf === 'for_custom_taxo' || selectIf === 'for_price' ) {\r\n\r\n\t\t\t\t\t// update \"Option Type\" when select key matches\r\n\t\t\t\t\tfancyOption.each(function(item) {\r\n\t\t\t\t\t\tif( selectKey === $(this).text() ) {\r\n\t\t\t\t\t\t\t$(this).addClass('selected');\r\n\t\t\t\t\t\t\tfancyDataPicker.text(selectKey);\r\n\t\t\t\t\t\t\toutputSelect.find(\"option\").text(selectKey);\r\n\t\t\t\t\t\t\toutputSelect.find(\"option\").val( $(this).data('value') );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\t// update \"Option Type\" when select key matches\r\n\t\t\t\t\tfancyOption.each(function(item) {\r\n\t\t\t\t\t\tif( \"parent_if_empty\" !== $(this).text() && \"for_all\" === selectIf ) {\r\n\t\t\t\t\t\t\t$(this).addClass('selected');\r\n\t\t\t\t\t\t\tfancyDataPicker.text(selectKey);\r\n\t\t\t\t\t\t\toutputSelect.find(\"option\").text(selectKey);\r\n\t\t\t\t\t\t\toutputSelect.find(\"option\").val( $(this).data('value') );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t})\r\n\t\t\t// bulk delete alert.\r\n\t\t\t.on('click', '#doaction, #doaction2', function () {\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\treturn confirm(opts.form.del_confirm_multi);\r\n\t\t\t})\r\n\t\t\t// Generate Feed Table Row Delete\r\n\t\t\t.on('change', '.dType', function () {\r\n\t\t\t\tlet self = $(this),\r\n\t\t\t\t\ttype = self.val(),\r\n\t\t\t\t\trow = self.closest('tr');\r\n\t\t\t\t\r\n\t\t\t\tif (type === 'pattern') {\r\n\t\t\t\t\trow.find('.value_attribute').hide();\r\n\t\t\t\t\trow.find('.value_pattern').show();\r\n\t\t\t\t} else if (type === 'attribute') {\r\n\t\t\t\t\trow.find('.value_attribute').show();\r\n\t\t\t\t\trow.find('.value_pattern').hide();\r\n\t\t\t\t} else if (type === 'remove') {\r\n\t\t\t\t\trow.find('.value_attribute').hide();\r\n\t\t\t\t\trow.find('.value_pattern').hide();\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t// Generate Feed Form Submit\r\n\t\t\t.on('click', '.delRow', function (e) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\t$(this).closest('tr').remove();\r\n\t\t\t\thelper.reindex_config_table();\r\n\t\t\t})\r\n\t\t\t.on('submit', '#generateFeed', function () {\r\n\t\t\t\t// Feed Generating form validation\r\n\t\t\t\t$(this).validate();\r\n\t\t\t\t\r\n\t\t\t\tif ($(this).valid()) {\r\n\t\t\t\t\t$(\".makeFeedResponse\")\r\n\t\t\t\t\t\t.show()\r\n\t\t\t\t\t\t.html(`<b style=\"color: darkblue;\"><i class=\"dashicons dashicons-sos wpf_spin\"></i> ${opts.form.generate}</b>`); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html, WordPressVIPMinimum.JS.StringConcat.Found\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t// Generate Update Feed Form Submit\r\n\t\t\t.on('submit', '#updatefeed', function (e, data) {\r\n\t\t\t\t// Feed Generating form validation\r\n\t\t\t\t$(this).validate();\r\n\t\t\t\t\r\n\t\t\t\tif ($(this).valid()) {\r\n\t\t\t\t\t$(\".makeFeedResponse\")\r\n\t\t\t\t\t\t.show()\r\n\t\t\t\t\t\t.html(`<b style=\"color: darkblue;\"><i class=\"dashicons dashicons-sos wpf_spin\"></i> ${data && data.save ? opts.form.save : opts.form.generate}</b>`); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html, WordPressVIPMinimum.JS.StringConcat.Found\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.on('change', '.ftporsftp', function () {\r\n\t\t\t\tlet server = $(this).val(),\r\n\t\t\t\t\tstatus = $('.ssh2_status');\r\n\t\t\t\t\r\n\t\t\t\tif (server === 'sftp') {\r\n\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\tstatus.show().css('color', 'dodgerblue').text(opts.form.sftp_checking);\r\n\t\t\t\t\twpAjax.post('get_ssh2_status', {\r\n\t\t\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\t\t\tserver: server\r\n\t\t\t\t\t}).then(function (response) {\r\n\t\t\t\t\t\tif (response === 'exists') {\r\n\t\t\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\t\t\tstatus.css('color', '#2CC185').text(opts.form.sftp_available);\r\n\t\t\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t\t\tstatus.hide();\r\n\t\t\t\t\t\t\t}, 1500);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\t\t\tstatus.show().css('color', 'red').text(opts.form.sftp_warning);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}).fail(function (e) {\r\n\t\t\t\t\t\tstatus.hide();\r\n\t\t\t\t\t\thelper.ajax_fail(e);\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstatus.hide();\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.on('click', '[name=\"save_feed_config\"]', function (e) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\t$('#updatefeed').trigger('submit', {\r\n\t\t\t\t\tsave: true\r\n\t\t\t\t});\r\n\t\t\t})\r\n\t\t\t.on('change', '#provider', function (event) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\r\n\t\t\t\t//if (!$(this).closest('.generateFeed').hasClass('add-new')) return; // only for new feed.\r\n\r\n\t\t\t\tlet merchant = $(this).val(),\r\n\t\t\t\t\tfeedType = $(\"#feedType\"),\r\n\t\t\t\t\tfeedForm = $(\"#providerPage\"),\r\n\t\t\t\t\tmerchantInfo = $('#feed_merchant_info'); // set loading..\r\n\t\t\t\t\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\tfeedForm.html('<h3><span style=\"float:none;margin: -3px 0 0;\" class=\"spinner is-active\"></span> ' + opts.form.loading_tmpl + '</h3>'); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html, WordPressVIPMinimum.JS.StringConcat.Found\r\n\t\t\t\t\r\n\t\t\t\tmerchantInfo.find('.spinner').addClass('is-active');\r\n\t\t\t\tfeedType.disabled(!0); // disable dropdown\r\n\t\t\t\t\r\n\t\t\t\tfeedType.parent().find('.spinner').addClass('is-active');\r\n\t\t\t\tmerchantInfo.find('.merchant-info-section .data').html(''); // remove previous data\r\n\t\t\t\t// Get Merchant info for selected Provider/Merchant\r\n\r\n\r\n\t\t\t\t\r\n\t\t\t\tif (merchantInfoCache.hasOwnProperty(merchant)) {\r\n\t\t\t\t\tfeedEditor.renderMerchantInfo(merchantInfo, feedType, merchantInfoCache[merchant]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\twpAjax.send('woo_feed_get_merchant_info', {\r\n\t\t\t\t\t\ttype: 'GET',\r\n\t\t\t\t\t\tdata: {\r\n\t\t\t\t\t\t\tnonce: opts.nonce,\r\n\t\t\t\t\t\t\tprovider: merchant\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}).then(function (r) {\r\n\t\t\t\t\t\tmerchantInfoCache[merchant] = r;\r\n\t\t\t\t\t\tfeedEditor.renderMerchantInfo(merchantInfo, feedType, r);\r\n\t\t\t\t\t}).fail(helper.ajax_fail);\r\n\t\t\t\t} // Get FeedForm For Selected Provider/Merchant\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif (merchantTemplateCache.hasOwnProperty(merchant)) {\r\n\t\t\t\t\tfeedEditor.renderMerchantTemplate(feedForm, merchantTemplateCache[merchant]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\twpAjax.post('get_feed_merchant', {\r\n\t\t\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\t\t\tmerchant: merchant\r\n\t\t\t\t\t}).then(function (r) {\r\n\t\t\t\t\t\tmerchantTemplateCache[merchant] = r;\r\n\t\t\t\t\t\tfeedEditor.renderMerchantTemplate(feedForm, r);\r\n\r\n\t\t\t\t\t\t//when merchant is bing, change delimiter and enclosure\r\n\t\t\t\t\t\tif( 'bing' === merchant ) {\r\n\t\t\t\t\t\t\t//delimiter value\r\n\t\t\t\t\t\t\t$(\"#delimiter option\").removeAttr('selected');\r\n\t\t\t\t\t\t\t$(\"#delimiter option[value=\\\"tab\\\"]\").attr('selected', 'selected');\r\n\r\n\t\t\t\t\t\t\t//enclosure value\r\n\t\t\t\t\t\t\t$(\"#enclosure option\").removeAttr('selected');\r\n\t\t\t\t\t\t\t$(\"#enclosure option[value=\\\" \\\"]\").attr('selected', 'selected');\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t//reviewer options hide\r\n\t\t\t\t\t\tif( 'google_product_review' !== merchant) {\r\n\t\t\t\t\t\t\t$('.wf_attributes option[value=\"reviewer_name\"]').hide();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}).fail(helper.ajax_fail);\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t// Feed Active and Inactive status change via ajax\r\n\t\t\t.on('change', '.woo_feed_status_input', function () {\r\n\t\t\t\tlet self = $(this);\r\n\t\t\t\twpAjax.post('update_feed_status', {\r\n\t\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\t\tfeedName: self.val(),\r\n\t\t\t\t\tstatus: self[0].checked ? 1 : 0\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t// event with trigger\r\n\t\t$(document)\r\n\t\t\t.on('change', '[name=\"is_outOfStock\"], [name=\"product_visibility\"]', function () {\r\n\t\t\t\tlet outOfStockVisibilityRow = $('.out-of-stock-visibility');\r\n\t\t\t\tif ($('[name=\"is_outOfStock\"]:checked').val() === 'n' && $('[name=\"product_visibility\"]:checked').val() === '1') {\r\n\t\t\t\t\toutOfStockVisibilityRow.show();\r\n\t\t\t\t} else {\r\n\t\t\t\t\toutOfStockVisibilityRow.hide();\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.on('change', '.attr_type', function () {\r\n\t\t\t\t// Attribute type selection\r\n\t\t\t\tlet self = $(this),\r\n\t\t\t\t\ttype = self.val(),\r\n\t\t\t\t\trow = self.closest('tr');\r\n\t\t\t\t\r\n\t\t\t\tif (type === 'pattern') {\r\n\t\t\t\t\trow.find('.wf_attr').hide();\r\n\t\t\t\t\trow.find('.wf_attr').val('');\r\n\t\t\t\t\trow.find('.wf_default').show();\r\n\t\t\t\t} else {\r\n\t\t\t\t\trow.find('.wf_attr').show();\r\n\t\t\t\t\trow.find('.wf_default').hide();\r\n\t\t\t\t\trow.find('.wf_default').val('');\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.on('change', '.wf_mattributes, .attr_type', function () {\r\n\t\t\t\tlet row = $(this).closest('tr'),\r\n\t\t\t\t\tattribute = row.find('.wf_mattributes'),\r\n\t\t\t\t\ttype = row.find('.attr_type'),\r\n\t\t\t\t\tvalueColumn = row.find('td:eq(4)'),\r\n\t\t\t\t\tprovider = $('#provider').val();\r\n\t\t\t\t\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\tif (opts.form.google_category.hasOwnProperty(attribute.val()) && type.val() === 'pattern' && helper.in_array(provider, opts.form.google_category[attribute.val()])) {\r\n\t\t\t\t\tif (valueColumn.find('select.selectize').length === 0) {\r\n\t\t\t\t\t\tvalueColumn.find('input.wf_default').remove();\r\n\t\t\t\t\t\tvalueColumn.append('<span class=\"wf_default wf_attributes\"><select name=\"default[]\" class=\"selectize\"></select></span>');\r\n\t\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\t\tvalueColumn.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\">${opts.learn_more}</a></span>`);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (!googleCategories) {\r\n\t\t\t\t\t\t\tvalueColumn.append('<span class=\"spinner is-active\" style=\"margin: 0;\"></span>');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tlet select = valueColumn.find('.wf_attributes select');\r\n\t\t\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\t\t\thelper.selectize(select, {\r\n\t\t\t\t\t\t\tpreload: true,\r\n\t\t\t\t\t\t\tplaceholder: opts.form.select_category,\r\n\t\t\t\t\t\t\tload: function load(query, cb) {\r\n\t\t\t\t\t\t\t\tif (!googleCategories) {\r\n\t\t\t\t\t\t\t\t\twpAjax.send('get_google_categories', {\r\n\t\t\t\t\t\t\t\t\t\ttype: 'GET',\r\n\t\t\t\t\t\t\t\t\t\tdata: {\r\n\t\t\t\t\t\t\t\t\t\t\t_ajax_nonce: opts.nonce,\r\n\t\t\t\t\t\t\t\t\t\t\taction: \"get_google_categories\",\r\n\t\t\t\t\t\t\t\t\t\t\tprovider: provider\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}).then(function (r) {\r\n\t\t\t\t\t\t\t\t\t\tgoogleCategories = r;\r\n\t\t\t\t\t\t\t\t\t\tcb(googleCategories);\r\n\t\t\t\t\t\t\t\t\t\tvalueColumn.find('.spinner').remove();\r\n\t\t\t\t\t\t\t\t\t}).fail(helper.ajax_fail);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tcb(googleCategories);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (attribute.val() !== 'current_category' && valueColumn.find('input.wf_default').length === 0) {\r\n\t\t\t\t\t\tvalueColumn.find('span').remove();\r\n\t\t\t\t\t\tvalueColumn.append('<input autocomplete=\"off\" class=\"wf_default wf_attributes\" type=\"text\" name=\"default[]\" value=\"\">');\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (type.val() !== 'pattern') {\r\n\t\t\t\t\t\t\tvalueColumn.find('input.wf_default').hide();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.on('change', '#feedType,#provider', function (e) {\r\n\t\t\t\tlet type = $('#feedType').val(),\r\n\t\t\t\t\tprovider = $('#provider').val(),\r\n\t\t\t\t\titemWrapper = $('.itemWrapper'),\r\n\t\t\t\t\twf_csv_txt = $('.wf_csvtxt');\r\n\t\t\t\t\r\n\t\t\t\t// noinspection JSUnresolvedVariable\r\n\t\t\t\tif (type !== '' && helper.in_array(provider, opts.form.item_wrapper_hidden)) {\r\n\t\t\t\t\titemWrapper.hide();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//when feed type is changed\r\n\t\t\t\tif( 'feedType' === e.target.id ) {\r\n\t\t\t\t\tif (type === 'csv' || type === 'txt' || type === 'tsv') {\r\n\t\t\t\t\t\titemWrapper.hide();\r\n\t\t\t\t\t\twf_csv_txt.show();\r\n\r\n\t\t\t\t\t\tif( 'tsv' === type ) {\r\n\t\t\t\t\t\t\t$('#delimiter option:last').prop(\"selected\", \"selected\");\r\n\t\t\t\t\t\t} else if( 'csv' === type ) {\r\n\t\t\t\t\t\t\t$('#delimiter option:first').prop(\"selected\", \"selected\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if( type === 'xml' ) {\r\n\t\t\t\t\t\titemWrapper.show();\r\n\t\t\t\t\t\twf_csv_txt.hide();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t})\r\n\t\t\t.trigger('change');\r\n\t});\r\n})(jQuery, window, document, wp.ajax, wpf_ajax_obj);\r\n"]}
|
woo-feed.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
* Plugin Name: CTX 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.3.
|
14 |
* Author: WebAppick
|
15 |
* Author URI: https://webappick.com/
|
16 |
* License: GPL v2
|
@@ -39,7 +39,7 @@ if ( ! defined( 'WOO_FEED_FREE_VERSION' ) ) {
|
|
39 |
* @var string
|
40 |
* @since 3.1.6
|
41 |
*/
|
42 |
-
define( 'WOO_FEED_FREE_VERSION', '4.3.
|
43 |
}
|
44 |
|
45 |
if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {
|
@@ -932,13 +932,16 @@ if ( ! class_exists( 'webappick_suggest_plugin' ) ) {
|
|
932 |
|
933 |
static function init() {
|
934 |
if ( is_admin() ) {
|
935 |
-
|
|
|
|
|
936 |
}
|
937 |
} // init
|
938 |
// add our plugins to recommended list
|
939 |
static function plugins_api_result( $res, $action, $args ) {
|
940 |
remove_filter( 'plugins_api_result', array( __CLASS__, 'plugins_api_result' ), 10, 1 );
|
941 |
$res = self::add_plugin_favs( 'webappick-pdf-invoice-for-woocommerce', $res );
|
|
|
942 |
return $res;
|
943 |
} // plugins_api_result
|
944 |
// helper function for adding plugins to fav list
|
10 |
* Plugin Name: CTX 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.3.58
|
14 |
* Author: WebAppick
|
15 |
* Author URI: https://webappick.com/
|
16 |
* License: GPL v2
|
39 |
* @var string
|
40 |
* @since 3.1.6
|
41 |
*/
|
42 |
+
define( 'WOO_FEED_FREE_VERSION', '4.3.58' );
|
43 |
}
|
44 |
|
45 |
if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {
|
932 |
|
933 |
static function init() {
|
934 |
if ( is_admin() ) {
|
935 |
+
if( ! is_plugin_active('xt-woo-variation-swatches/xt-woo-variation-swatches.php') ) {
|
936 |
+
add_filter( 'install_plugins_table_api_args_featured', array( __CLASS__, 'featured_plugins_tab' ) );
|
937 |
+
}
|
938 |
}
|
939 |
} // init
|
940 |
// add our plugins to recommended list
|
941 |
static function plugins_api_result( $res, $action, $args ) {
|
942 |
remove_filter( 'plugins_api_result', array( __CLASS__, 'plugins_api_result' ), 10, 1 );
|
943 |
$res = self::add_plugin_favs( 'webappick-pdf-invoice-for-woocommerce', $res );
|
944 |
+
|
945 |
return $res;
|
946 |
} // plugins_api_result
|
947 |
// helper function for adding plugins to fav list
|