CTX Feed – WooCommerce Product Feed Manager Plugin - Version 4.0.5

Version Description

(2020-10-15) = * Tweak: Admin action link style updated.

Download this release

Release Info

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

Code changes from version 4.0.4 to 4.0.5

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.4
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.4 (2020-10-14) =
312
  * Fix: Performance enhancement.
313
  * Fix: Admin page code refactor.
5
  Requires at least: 3.6
6
  Tested Up To: 5.5
7
  Requires PHP: 5.6
8
+ Stable tag: 4.0.5
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.5 (2020-10-15) =
312
+ * Tweak: Admin action link style updated.
313
+
314
  = 4.0.4 (2020-10-14) =
315
  * Fix: Performance enhancement.
316
  * Fix: Admin page code refactor.
admin/css/woo-feed-admin.css CHANGED
@@ -345,7 +345,7 @@ input[class=woo_feed_status_input]:checked + label:before {
345
  box-shadow: 0px 1.5px 2px 0px #000; }
346
 
347
  .view span.dashicons.dashicons-external {
348
- color: #30336b; }
349
 
350
  .view span.dashicons.dashicons-sos {
351
  color: #22a6b3; }
345
  box-shadow: 0px 1.5px 2px 0px #000; }
346
 
347
  .view span.dashicons.dashicons-external {
348
+ color: #22a6b3; }
349
 
350
  .view span.dashicons.dashicons-sos {
351
  color: #22a6b3; }
admin/css/woo-feed-admin.min.css CHANGED
@@ -1 +1 @@
1
- .wpf_spin{-webkit-animation:spin 1s infinite linear;animation:spin 1s infinite linear}.wpf_spin.reverse_spin{animation-direction:reverse}.wpf_regenerate.disabled{color:#737373;box-shadow:none;cursor:not-allowed}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.wfbtn{background:#3498db;background-image:linear-gradient(125deg,#3cb0fd 0,#152f8c 140%);border-radius:17px;box-shadow:inset 0 1px 3px #666;font-family:Arial,sans-serif;color:#fff;font-size:20px;padding:10px 20px 10px 20px;border:solid #2b698f 0;text-decoration:none}.wfbtn:hover{background:#3cb0fd;background-image:linear-gradient(to bottom,#3cb0fd,#3498db);text-decoration:none}.wftooltip{display:none;position:absolute;border:1px solid #333;background-color:#161616;border-radius:5px;padding:10px;color:#fff;font-size:12px}.feed-actions .makeFeedResponse{width:70%;color:green}.woo-feed-mapping-input{width:100%}.requiredIn{color:red}.generalInput{width:200px}.generalInput:not(.selectize-control){margin:5px auto}.error{color:red}.widefat td input,.widefat td select{max-width:100%}#wf_newRow{margin-left:0}.mtable tbody tr{height:25px;border:1px solid #ccc;text-align:left;-ms-flex-align:baseline;align-items:baseline;font-weight:700}.mtable th:nth-child(1){width:17px}.mtable th:nth-child(2){width:160px}.mtable th:nth-child(3){width:100px}.mtable th:nth-child(4){width:100px}.mtable th:nth-child(5){width:150px}.mtable th:nth-child(6){width:100px}.mtable th:nth-child(7){width:150px}.mtable th:nth-child(8){width:90px}.mtable th:nth-child(9){width:29px}.mtable2 tbody tr{height:25px;border:1px solid #ccc;text-align:left;-ms-flex-align:baseline;align-items:baseline;font-weight:700}.mtable2 th:nth-child(1){width:30px}.mtable2 th:nth-child(2){width:150px}.mtable2 th:nth-child(3){width:230px}.mtable2 th:nth-child(4){width:220px}.mtable2 th:nth-child(7){width:50px}.mtable2 th:nth-child(8){width:50px}.mtable2 th:nth-child(9){width:29px}.wp-admin select.wf_mattributes{width:150px;left:0;height:25px}div#wf-tab-content1 select:not([name^=output_type]){width:100%}div#wf-tab-content1 input{width:100%}div#wf-tab-content1 .dashicons{vertical-align:middle}.wf_attributes{width:150px;left:0}.wf_compare{max-width:245px;left:0}.wf_ps{width:100px;left:0}.wf_sortedtable{cursor:move}.sorted_table{position:relative}.sorted_table .dragged{position:absolute;opacity:.8;z-index:9999;background:#fff;width:100%;display:table}.sorted_table tbody tr.placeholder td{border:1px dashed #2cc185;height:46px}.wfnoempty{width:120px}p{color:#222}.wf_tabs{position:relative;margin:0 auto;width:100%;list-style:none}.wf_tabs:after{display:table;clear:both;content:""}.wf_tabs li{float:left;width:20%;display:block;border:2px solid #ccc}.wf_tabs li>input[type=radio][name=wf_tabs]{position:absolute;top:auto;left:-9999px}.wf-tab-name{display:block;padding:15px;font-size:15px;font-weight:700;line-height:1;background:#fff;cursor:pointer;position:relative;text-align:center;text-transform:uppercase;color:#2cc185}.wf-tab-name:hover{background:#2cc185;color:#fff}.wf_tabs [id^=tab]:checked+label{background:#2cc185;color:#fff}.wf_tabs .wf-tab-content{z-index:2;display:none;width:100%;font-size:.9rem;position:absolute;left:0;background:#fff;border:2px solid #ccc}.wf_tabs [id^=tab]:checked~[id^=wf-tab-content]{display:block}[id^=wf-tab-content]{margin-bottom:40px}div#wf-tab-content2 table:first-child{padding:10px 0}div#wf-tab-content2 table:first-child td:nth-child(1){width:260px}div#wf-tab-content2 table:first-child td:nth-child(2){width:260px}table.feed-actions tr td:last-child{text-align:right}select.selectize{display:none}body.no-js select.selectize{display:block!important}.wp-list-table .option_name .wf_feed_option_name_link{font-weight:700;color:#30336b}.wp-list-table #option_name a{color:#32373c}.selectize-dropdown .active{background-color:#edf9ff}.selectize-dropdown .create{padding:5px 8px}.wapk-selectize-item{background:#0073aa!important;color:#f1f1f1!important;font-weight:700!important;border-color:#0073aa!important;padding-left:5px;padding-right:5px}.selectize-input.full #googleTaxonomyId-selectized{opacity:0;position:absolute;left:-10000px}.selectize-dropdown [data-selectable].option{cursor:default}.selectize-control.plugin-remove_button [data-value] .remove{border-left:1px solid #f1f1f1!important}.selectize-dropdown .optgroup-header{font-weight:700;background:#efefef;color:#5a5a5a}.selectize-dropdown [data-selectable].option{cursor:pointer}.wf_status_wrap label{width:55px;height:30px;box-sizing:border-box;float:left;border-radius:100px;position:relative;cursor:pointer;transition:.3s ease;background:#d3d3d3}input[class=woo_feed_status_input]:checked+label{background:#4fbe79}input[class=woo_feed_status_input]:checked+label:before{left:29px}.wf_status_wrap label:before{transition:.3s ease;content:'';width:20px;height:20px;position:absolute;background:#fff;left:6px;top:5px;box-sizing:border-box;color:#000;border-radius:100px;box-shadow:0 1.5px 2px 0 #000}.view span.dashicons.dashicons-external{color:#30336b}.view span.dashicons.dashicons-sos{color:#22a6b3}.view span.dashicons.dashicons-download{color:#ee5253}.view span.dashicons.dashicons-media-code{color:#576574}.column-url,.widefat td.column-url,.widefat th.column-url{color:#1e8f9a;font-weight:700}.feed-progress-container{width:100%;color:#fff;text-align:center;font-weight:300}.feed-progress-bar{width:100%;background:#eee;padding:3px;border-radius:3px;box-shadow:inset 0 1px 3px rgba(0,0,0,.2)}.feed-progress-bar-fill{height:20px;display:block;background:#3dc264;width:0;border-radius:3px;transition:width .8s ease}.feed-progress-status{float:left;font-weight:700;color:#00008b}.feed-progress-percentage{text-align:right;font-weight:bolder;color:#41f49d;font-family:'Arial Black',sans-serif;font-size:large}#wpbody-content.woofeed-body-content{overflow:visible!important}.clippy{position:relative;width:13px;margin-top:-3px;margin-left:3px;top:3px}.column-url .clippy{display:none}.column-url:hover .clippy{display:inline-block}.tooltipped{position:relative}.tooltipped:after{position:absolute;z-index:1000000;display:none;padding:5px 8px;font:normal normal 11px/1.5 Helvetica,arial,nimbussansl,liberationsans,freesans,clean,sans-serif,"Segoe UI Emoji","Segoe UI Symbol";color:#fff;text-align:center;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-wrap:break-word;white-space:pre;pointer-events:none;content:attr(aria-label);background:rgba(0,0,0,.8);border-radius:3px;-webkit-font-smoothing:subpixel-antialiased}.tooltipped:before{position:absolute;z-index:1000001;display:none;width:0;height:0;color:rgba(0,0,0,.8);pointer-events:none;content:"";border:5px solid transparent}.tooltipped:hover:before{display:inline-block;text-decoration:none}.tooltipped:hover:after{display:inline-block;text-decoration:none}.tooltipped:active:before{display:inline-block;text-decoration:none}.tooltipped:active:after{display:inline-block;text-decoration:none}.tooltipped:focus:before{display:inline-block;text-decoration:none}.tooltipped:focus:after{display:inline-block;text-decoration:none}.tooltipped-multiline:hover:after{display:table-cell}.tooltipped-multiline:active:after{display:table-cell}.tooltipped-multiline:focus:after{display:table-cell}.tooltipped-multiline:after{width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:250px;word-break:break-word;word-wrap:normal;white-space:pre-line;border-collapse:separate}.tooltipped-s:after{top:100%;right:50%;margin-top:5px;-webkit-transform:translateX(50%);transform:translateX(50%)}.tooltipped-s:before{top:auto;right:50%;bottom:-5px;margin-right:-5px;border-bottom-color:rgba(0,0,0,.8)}.tooltipped-se:after{top:100%;margin-top:5px;right:auto;left:50%;margin-left:-15px}.tooltipped-se:before{top:auto;right:50%;bottom:-5px;margin-right:-5px;border-bottom-color:rgba(0,0,0,.8)}.tooltipped-sw:after{top:100%;right:50%;margin-top:5px;margin-right:-15px}.tooltipped-sw:before{top:auto;right:50%;bottom:-5px;margin-right:-5px;border-bottom-color:rgba(0,0,0,.8)}.tooltipped-n:after{right:50%;bottom:100%;margin-bottom:5px;-webkit-transform:translateX(50%);transform:translateX(50%)}.tooltipped-n:before{top:-5px;right:50%;bottom:auto;margin-right:-5px;border-top-color:rgba(0,0,0,.8)}.tooltipped-ne:after{bottom:100%;margin-bottom:5px;right:auto;left:50%;margin-left:-15px}.tooltipped-ne:before{top:-5px;right:50%;bottom:auto;margin-right:-5px;border-top-color:rgba(0,0,0,.8)}.tooltipped-nw:after{right:50%;bottom:100%;margin-bottom:5px;margin-right:-15px}.tooltipped-nw:before{top:-5px;right:50%;bottom:auto;margin-right:-5px;border-top-color:rgba(0,0,0,.8)}.tooltipped-w:after{right:100%;bottom:50%;margin-right:5px;-webkit-transform:translateY(50%);transform:translateY(50%)}.tooltipped-w:before{top:50%;bottom:50%;left:-5px;margin-top:-5px;border-left-color:rgba(0,0,0,.8)}.tooltipped-e:after{bottom:50%;left:100%;margin-left:5px;-webkit-transform:translateY(50%);transform:translateY(50%)}.tooltipped-e:before{top:50%;right:-5px;bottom:50%;margin-top:-5px;border-right-color:rgba(0,0,0,.8)}.tooltipped-multiline.tooltipped-s:after{right:auto;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.tooltipped-multiline.tooltipped-n:after{right:auto;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.tooltipped-multiline.tooltipped-w:after{right:100%}.tooltipped-multiline.tooltipped-e:after{right:100%}.tooltipped-sticky:before{display:inline-block}.tooltipped-sticky:after{display:inline-block}.tooltipped-sticky.tooltipped-multiline:after{display:table-cell}.fullscreen-overlay-enabled.dark-theme .tooltipped:after{color:#000;background:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped .tooltipped-s:before{border-bottom-color:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped .tooltipped-se:before{border-bottom-color:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped .tooltipped-sw:before{border-bottom-color:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped.tooltipped-n:before{border-top-color:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped.tooltipped-ne:before{border-top-color:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped.tooltipped-nw:before{border-top-color:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped.tooltipped-e:before{border-right-color:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped.tooltipped-w:before{border-left-color:rgba(255,255,255,.8)}@media screen and (min-width:0\0){.tooltipped-multiline:after{width:250px}}ul.tracker_collection_list{list-style:initial;padding:initial;margin:-10px 0 0 30px;font-size:11px!important}ul.tracker_collection_list li{margin:0}table.wf-info-table,table.wf-rate-table{vertical-align:middle;text-align:center;max-width:100%;font-weight:500}table.wf-info-table th,table.wf-rate-table th{text-align:center}table.wf-info-table th .woo-feed-top-header,table.wf-rate-table th .woo-feed-top-header{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}table.wf-info-table th .woo-feed-top-header .get-woo-feed-pro,table.wf-rate-table th .woo-feed-top-header .get-woo-feed-pro{margin-left:20px}table.wf-info-table th .woo-feed-top-header .woo-feed-top-buttons,table.wf-rate-table th .woo-feed-top-header .woo-feed-top-buttons{float:right;display:-ms-flexbox;display:flex;border-radius:7px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}table.wf-info-table th .woo-feed-top-header .woo-feed-top-buttons a,table.wf-rate-table th .woo-feed-top-header .woo-feed-top-buttons a{padding:8px 20px;background:#576574;color:#fff;box-sizing:border-box;display:inline-block;transition:.3s ease}table.wf-info-table th .woo-feed-top-header .woo-feed-top-buttons a.woo-feed-doc-link,table.wf-rate-table th .woo-feed-top-header .woo-feed-top-buttons a.woo-feed-doc-link{background:#576574;border-top-left-radius:5px;border-bottom-left-radius:5px}table.wf-info-table th .woo-feed-top-header .woo-feed-top-buttons a.woo-feed-video-link,table.wf-rate-table th .woo-feed-top-header .woo-feed-top-buttons a.woo-feed-video-link{background:#ee5253}table.wf-info-table th .woo-feed-top-header .woo-feed-top-buttons a.woo-feed-support-link,table.wf-rate-table th .woo-feed-top-header .woo-feed-top-buttons a.woo-feed-support-link{background:#22a6b3;border-top-right-radius:5px;border-bottom-right-radius:5px}table.wf-info-table th .woo-feed-top-header .woo-feed-top-buttons a span.dashicons,table.wf-rate-table th .woo-feed-top-header .woo-feed-top-buttons a span.dashicons{font-size:18px;line-height:1.2}table.wf-info-table th .woo-feed-top-header .woo-feed-top-buttons a:hover,table.wf-rate-table th .woo-feed-top-header .woo-feed-top-buttons a:hover{background:#30336b;box-shadow:0 0 33px 0 rgba(0,0,0,.12)}table.wf-info-table strong,table.wf-rate-table strong{font-weight:700}table.wf-info-table th:first-child img{margin:0 0 -5px 5px}table.wf-rate-table a{color:#0073aa}table.wf-rate-table a.review-star:after{content:"\f155\f155\f155\f155\f155"!important;font-family:dashicons;font-size:10px;font-weight:100;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#0073aa;text-decoration:underline}#adminmenu #toplevel_page_webappick-manage-feeds div.wp-menu-image::before{content:"";background:url(../images/woo-feed-icon.svg) no-repeat center center;background-size:20px 20px;opacity:.6}#adminmenu #toplevel_page_webappick-manage-feeds:hover div.wp-menu-image::before{opacity:1}#adminmenu #toplevel_page_webappick-manage-feeds.wp-has-current-submenu div.wp-menu-image::before{opacity:1}.wapk-admin,.wapk-admin *{box-sizing:border-box}.wapk-admin{position:relative;display:block;-webkit-hyphens:manual;-ms-hyphens:manual;-moz-hyphens:manual;hyphens:manual;color:#1b2730;margin:0 0 0 -10px}@media screen and (min-width:783px){.wapk-admin{margin:0 0 0 -20px}}.text-center{text-align:center}.wapk-admin h1,.wapk-admin h2,.wapk-admin h3,.wapk-admin h4,.wapk-admin h5,.wapk-admin h6,.wapk-admin p{color:#1b2730}.wapk-admin sup{vertical-align:baseline;position:relative;top:-6px}.wapk-admin sub{vertical-align:baseline;position:relative;top:4px}.wapk-admin .wapk-section{margin:10px 20px 0 22px;position:relative;display:block}.wapk-admin .wapk-section [class$=icon32]+h2{font-size:23px;font-weight:400;margin:0;padding:9px 0 4px 0;line-height:1.3}.wapk-admin .wapk-section h1{font-size:23px;font-weight:400;margin:0;padding:9px 0 4px 0;line-height:1.3}.wapk-admin .wapk-section>h2:first-child{font-size:23px;font-weight:400;margin:0;padding:9px 0 4px 0;line-height:1.3}.wapk-admin>.notice{margin:10px 20px 0 22px;position:relative;display:block}.wapk-admin span.help{display:block;float:left;width:100%;font-size:.9em;color:#636363;margin-top:5px;font-weight:500}.wapk-admin span.help .dashicons{width:11px;height:12px;font-size:inherit;vertical-align:middle}.clear:after{content:"";display:table;clear:both}.wapk-feed-docs .postbox{width:355px;margin-right:20px;display:inline-block;vertical-align:top}.wapk-feed-docs .postbox .hndle{font-size:14px;padding:8px 12px;margin:0;line-height:1.4;cursor:pointer}.wapk-feed-docs .postbox .dashicons{color:#ccc}.wapk-feed-docs .postbox a{text-decoration:none}.wapk-feed-docs .postbox .inside{margin-bottom:0}.wapk-feed-docs .postbox ul{margin-bottom:0}.wapk-feed-docs .postbox .toggle-indicator:before{content:"\F142";display:inline-block;font:400 20px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.wapk-feed-docs .postbox li{width:100%;display:block;float:left}.wapk-feed-docs .postbox li span{display:inline-block;float:left;margin-right:4px}.wapk-feed-docs .postbox li a{display:inline-block;float:left;width:calc(100% - 24px)}.wapk-feed-docs .postbox.closed .toggle-indicator:before{content:"\F140"}.wapk-section #post-body.columns-2 #side-sortables{min-height:196px}#poststuff #feed_merchant_info .inside{margin:0;padding:0}#feed_merchant_info ul.data{margin-left:24px;margin-top:5px}#feed_merchant_info ul.data li{margin-bottom:5px}.merchant-info-section{padding:6px 10px 8px}.generateFeed .wf-tab-content table:first-child{border:none;box-shadow:none}.generateFeed table th{font-weight:700}@media only screen and (max-width:850px){.wapk-feed-docs .postbox{display:block;width:auto;float:none;margin-right:auto}}.wp-submenu li span.woo-feed-docs{font-weight:700;color:#f18500}.wp-submenu li:hover span.woo-feed-docs{color:#ce7304}.wp-submenu li.current span.woo-feed-docs{color:#ce7304}.wapk-admin .wapk-feed-docs .postbox .hndle{cursor:default}.wapk-cta{position:relative;display:-ms-flexbox;display:flex;width:100%;padding:100px 15px;background:linear-gradient(45deg,#6cd5ff 33%,#c2efef 100%);-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.wapk-cta-icon .dashicons{font-size:100px;width:100px;height:auto;margin:0 10px -8px 0;color:#02658c}.wapk-cta-content{width:50%}.wapk-cta-content h2{font-size:2em;margin:.5em 0}.wapk-cta-action a.wapk-button{font-size:24px;height:auto!important;padding:10px 20px}@media (max-width:600px){.wapk-cta{display:block;text-align:center;padding:4em 0}.wapk-cta-content{width:100%;margin:2em 0}}.wapk-button{color:#00d4d4;border-color:#00d4d4;display:inline-block;text-decoration:none;font-size:13px;line-height:2.15384615;min-height:30px;margin:0;padding:0 10px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;border-radius:3px;white-space:nowrap;box-sizing:border-box}.wapk-button>svg{width:15px;margin-left:5px;fill:#00d4d4}.wapk-button>.dashicons{color:#00d4d4}.wapk-button:hover{border-color:#0bb;color:#0bb}.wapk-button:hover>svg{fill:#0bb}.wapk-button:hover>.dashicons{color:#0bb}.wapk-button:focus{border-color:#00d4d4;color:#0bb;box-shadow:0 0 0 1px #00d4d4}.wapk-button:focus>svg{fill:#0bb}.wapk-button:focus>.dashicons{color:#0bb}.wapk-button:active{background:#0bb;border-color:#0bb}.wapk-button-secondary{color:#00d4d4;border-color:#00d4d4;display:inline-block;text-decoration:none;font-size:13px;line-height:2.15384615;min-height:30px;margin:0;padding:0 10px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;border-radius:3px;white-space:nowrap;box-sizing:border-box}.wapk-button-secondary>svg{width:15px;margin-left:5px;fill:#00d4d4}.wapk-button-secondary>.dashicons{color:#00d4d4}.wapk-button-secondary:hover{border-color:#0bb;color:#0bb}.wapk-button-secondary:hover>svg{fill:#0bb}.wapk-button-secondary:hover>.dashicons{color:#0bb}.wapk-button-secondary:focus{border-color:#00d4d4;color:#0bb;box-shadow:0 0 0 1px #00d4d4}.wapk-button-secondary:focus>svg{fill:#0bb}.wapk-button-secondary:focus>.dashicons{color:#0bb}.wapk-button-primary{display:inline-block;text-decoration:none;font-size:13px;line-height:2.15384615;min-height:30px;margin:0;padding:0 10px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;border-radius:3px;white-space:nowrap;box-sizing:border-box;background:#00d4d4;border-color:#00d4d4;color:#fff;box-shadow:0 1px 0 #0bb;text-shadow:0 -1px 1px #0bb,1px 0 1px #0bb,0 1px 1px #0bb,-1px 0 1px #0bb}.wapk-button-primary>svg{fill:#fff}.wapk-button-primary:hover{background:#00e3e3;border-color:#00c5c5;color:#fff}.wapk-button-primary:hover>svg{fill:#fff}.wapk-button-primary:focus{background:#00e3e3;border-color:#00c5c5;color:#fff;box-shadow:0 0 0 1px #fff,0 0 0 3px #00d4d4}.wapk-button-primary:focus>svg{fill:#fff}.wapk-button-primary:active{background:#0bb;border-color:#0bb;color:#fff}.wapk-button-primary:active>svg{fill:#fff}.wapk-button-primary:disabled{color:#c7d1d1!important;background:#2ff!important;border-color:#2ff!important;text-shadow:none!important}.wapk-button-primary:disabled>svg{fill:#c7d1d1!important}.wapk-button.hover{border-color:#0bb;color:#0bb}.wapk-button.hover>svg{fill:#0bb}.wapk-button.hover>.dashicons{color:#0bb}.wapk-button.focus{border-color:#00d4d4;color:#0bb;box-shadow:0 0 0 1px #00d4d4}.wapk-button.focus>svg{fill:#0bb}.wapk-button.focus>.dashicons{color:#0bb}.wapk-button.active{border-color:#0bb;color:#0bb;box-shadow:inset 0 2px 5px -3px #0bb}.wapk-button.active:focus{border-color:#0bb;color:#0bb;box-shadow:inset 0 2px 5px -3px #0bb}.wapk-button.active:focus>svg{fill:#0bb}.wapk-button.active:focus>.dashicons{color:#0bb}.wapk-button.active:hover{border-color:#0bb;color:#0bb;box-shadow:inset 0 2px 5px -3px #0bb}.wapk-button.active:hover>svg{fill:#0bb}.wapk-button.active:hover>.dashicons{color:#0bb}.wapk-button.active>svg{fill:#0bb}.wapk-button.active>.dashicons{color:#0bb}.wapk-button-primary.active{background:#00d4d4;color:#fff;border-color:#088;box-shadow:inset 0 2px 5px -3px #000}.wapk-button-primary.active:focus{background:#00d4d4;color:#fff;border-color:#088;box-shadow:inset 0 2px 5px -3px #000}.wapk-button-primary.active:focus>svg{fill:#fff}.wapk-button-primary.active:hover{background:#00d4d4;color:#fff;border-color:#088;box-shadow:inset 0 2px 5px -3px #000}.wapk-button-primary.active:hover>svg{fill:#fff}.wapk-button-primary.active>svg{fill:#fff}.wapk-button-primary[disabled]{color:#c7d1d1!important;background:#2ff!important;border-color:#2ff!important;text-shadow:none!important}.wapk-button-primary[disabled]>svg{fill:#c7d1d1!important}.wapk-button-primary.wapk-button-primary-disabled{color:#c7d1d1!important;background:#2ff!important;border-color:#2ff!important;text-shadow:none!important}.wapk-button-primary.wapk-button-primary-disabled>svg{fill:#c7d1d1!important}.wapk-button-primary.disabled{color:#c7d1d1!important;background:#2ff!important;border-color:#2ff!important;text-shadow:none!important}.wapk-button-primary.disabled>svg{fill:#c7d1d1!important}.wapk-button-primary.wapk-button-hero{box-shadow:0 2px 0 #0bb}.wapk-button-primary.wapk-button-hero:focus{box-shadow:0 2px 0 #0bb,0 1px 0 #00c5c5,0 0 2px 1px #0ee}.wapk-button-primary.wapk-button-hero:active{box-shadow:inset 0 3px 0 #00a1a1}.wapk-button-primary.wapk-button-hero.active{box-shadow:inset 0 3px 0 #00a1a1}.wapk-button-primary.wapk-button-hero.active:focus,.wapk-button-primary.wapk-button-hero.active:hover{box-shadow:inset 0 3px 0 #00a1a1}.wapk-button-group>.wapk-button.active{border-color:#00d4d4}.wapk-button.wapk-button-xl{height:30px;line-height:28px;padding:0 12px 2px}.wapk-button-group.wapk-button-xl .wapk-button{height:30px;line-height:28px;padding:0 12px 2px}.wapk-button.wapk-button-hero{font-size:18px;height:50px;line-height:48px;padding:0 36px;min-height:46px}.wapk-button-group.wapk-button-hero .wapk-button{font-size:18px;height:50px;line-height:48px;padding:0 36px;min-height:46px}@media screen and (min-width:782px){th#provider,th#status{width:80px}th#type{width:50px}th#option_name{width:100px}td.option_name.column-option_name>span:first-child{display:none}th#last_updated{width:90px}th#view{width:111px}}@media screen and (min-width:960px){th#provider,th#status{width:100px}th#type{width:80px}th#option_name{width:150px}th#last_updated{width:140px}}@media screen and (max-width:782px){table.wf-info-table{margin-top:10px}table.wf-info-table th:first-child img{margin:0 auto;display:block}.wapk-button.wapk-button-xl{padding:6px 14px;line-height:normal;font-size:14px;vertical-align:middle;height:auto;margin-bottom:4px}}.wapk-feed-docs .wapk-feed-cta{margin:0}.campaign_configurator{background:#fff;padding:20px 0}.campaign_configurator table{margin:0 auto;width:51%;min-width:574px;border:none;box-shadow:none}.campaign_configurator th{min-width:120px}@media screen and (max-width:782px){.campaign_configurator{padding:0}.campaign_configurator table{width:auto;min-width:auto;max-width:100%}.campaign_configurator th{min-width:auto}}#wf-tab-content-config td>input:not([type=checkbox]):not([type=radio]),#wf-tab-content-config td>select,#wf-tab-content-config td>textarea{width:100%!important}.woo-feed-filters td>div:nth-child(2n):not(.clear):not(.selectize){width:120px;display:block}.woo-feed-filters td>div:not(.clear){float:left;margin-right:10px}.woo-feed-filters tr>td:first-child{width:290px;padding-left:40px}.woo-feed-filters,.woo-feed-ftp{margin:15px auto 25px}.wf_clean_cache_wrapper{display:-ms-flexbox;display:flex;margin-left:auto}@-webkit-keyframes LoaderClockWise{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes LoaderClockWise{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.woo-feed-cache-loader{width:18px;margin-right:5px;animation:LoaderClockWise 1s linear infinite;-webkit-animation:LoaderClockWise 1s linear infinite;display:none}.woo-feed-table-heading .woo-feed-table-heading-title{float:left;margin-right:auto;display:inline-block;line-height:30px}.woo-feed-table-heading .wf_clean_cache_wrapper{float:right;font-weight:400}.wf_clean_cache_wrapper button{background:#eb4d4b;color:#fff;border:none;font-weight:500;display:inline-block;text-decoration:none;font-size:13px;line-height:2.15384615;min-height:30px;margin:0;padding:0 10px;border-radius:3px;cursor:pointer;outline:0}.wf_clean_cache_wrapper button:hover{background:#ff7979;color:#fff}
1
+ .wpf_spin{-webkit-animation:spin 1s infinite linear;animation:spin 1s infinite linear}.wpf_spin.reverse_spin{animation-direction:reverse}.wpf_regenerate.disabled{color:#737373;box-shadow:none;cursor:not-allowed}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.wfbtn{background:#3498db;background-image:linear-gradient(125deg,#3cb0fd 0,#152f8c 140%);border-radius:17px;box-shadow:inset 0 1px 3px #666;font-family:Arial,sans-serif;color:#fff;font-size:20px;padding:10px 20px 10px 20px;border:solid #2b698f 0;text-decoration:none}.wfbtn:hover{background:#3cb0fd;background-image:linear-gradient(to bottom,#3cb0fd,#3498db);text-decoration:none}.wftooltip{display:none;position:absolute;border:1px solid #333;background-color:#161616;border-radius:5px;padding:10px;color:#fff;font-size:12px}.feed-actions .makeFeedResponse{width:70%;color:green}.woo-feed-mapping-input{width:100%}.requiredIn{color:red}.generalInput{width:200px}.generalInput:not(.selectize-control){margin:5px auto}.error{color:red}.widefat td input,.widefat td select{max-width:100%}#wf_newRow{margin-left:0}.mtable tbody tr{height:25px;border:1px solid #ccc;text-align:left;-ms-flex-align:baseline;align-items:baseline;font-weight:700}.mtable th:nth-child(1){width:17px}.mtable th:nth-child(2){width:160px}.mtable th:nth-child(3){width:100px}.mtable th:nth-child(4){width:100px}.mtable th:nth-child(5){width:150px}.mtable th:nth-child(6){width:100px}.mtable th:nth-child(7){width:150px}.mtable th:nth-child(8){width:90px}.mtable th:nth-child(9){width:29px}.mtable2 tbody tr{height:25px;border:1px solid #ccc;text-align:left;-ms-flex-align:baseline;align-items:baseline;font-weight:700}.mtable2 th:nth-child(1){width:30px}.mtable2 th:nth-child(2){width:150px}.mtable2 th:nth-child(3){width:230px}.mtable2 th:nth-child(4){width:220px}.mtable2 th:nth-child(7){width:50px}.mtable2 th:nth-child(8){width:50px}.mtable2 th:nth-child(9){width:29px}.wp-admin select.wf_mattributes{width:150px;left:0;height:25px}div#wf-tab-content1 select:not([name^=output_type]){width:100%}div#wf-tab-content1 input{width:100%}div#wf-tab-content1 .dashicons{vertical-align:middle}.wf_attributes{width:150px;left:0}.wf_compare{max-width:245px;left:0}.wf_ps{width:100px;left:0}.wf_sortedtable{cursor:move}.sorted_table{position:relative}.sorted_table .dragged{position:absolute;opacity:.8;z-index:9999;background:#fff;width:100%;display:table}.sorted_table tbody tr.placeholder td{border:1px dashed #2cc185;height:46px}.wfnoempty{width:120px}p{color:#222}.wf_tabs{position:relative;margin:0 auto;width:100%;list-style:none}.wf_tabs:after{display:table;clear:both;content:""}.wf_tabs li{float:left;width:20%;display:block;border:2px solid #ccc}.wf_tabs li>input[type=radio][name=wf_tabs]{position:absolute;top:auto;left:-9999px}.wf-tab-name{display:block;padding:15px;font-size:15px;font-weight:700;line-height:1;background:#fff;cursor:pointer;position:relative;text-align:center;text-transform:uppercase;color:#2cc185}.wf-tab-name:hover{background:#2cc185;color:#fff}.wf_tabs [id^=tab]:checked+label{background:#2cc185;color:#fff}.wf_tabs .wf-tab-content{z-index:2;display:none;width:100%;font-size:.9rem;position:absolute;left:0;background:#fff;border:2px solid #ccc}.wf_tabs [id^=tab]:checked~[id^=wf-tab-content]{display:block}[id^=wf-tab-content]{margin-bottom:40px}div#wf-tab-content2 table:first-child{padding:10px 0}div#wf-tab-content2 table:first-child td:nth-child(1){width:260px}div#wf-tab-content2 table:first-child td:nth-child(2){width:260px}table.feed-actions tr td:last-child{text-align:right}select.selectize{display:none}body.no-js select.selectize{display:block!important}.wp-list-table .option_name .wf_feed_option_name_link{font-weight:700;color:#30336b}.wp-list-table #option_name a{color:#32373c}.selectize-dropdown .active{background-color:#edf9ff}.selectize-dropdown .create{padding:5px 8px}.wapk-selectize-item{background:#0073aa!important;color:#f1f1f1!important;font-weight:700!important;border-color:#0073aa!important;padding-left:5px;padding-right:5px}.selectize-input.full #googleTaxonomyId-selectized{opacity:0;position:absolute;left:-10000px}.selectize-dropdown [data-selectable].option{cursor:default}.selectize-control.plugin-remove_button [data-value] .remove{border-left:1px solid #f1f1f1!important}.selectize-dropdown .optgroup-header{font-weight:700;background:#efefef;color:#5a5a5a}.selectize-dropdown [data-selectable].option{cursor:pointer}.wf_status_wrap label{width:55px;height:30px;box-sizing:border-box;float:left;border-radius:100px;position:relative;cursor:pointer;transition:.3s ease;background:#d3d3d3}input[class=woo_feed_status_input]:checked+label{background:#4fbe79}input[class=woo_feed_status_input]:checked+label:before{left:29px}.wf_status_wrap label:before{transition:.3s ease;content:'';width:20px;height:20px;position:absolute;background:#fff;left:6px;top:5px;box-sizing:border-box;color:#000;border-radius:100px;box-shadow:0 1.5px 2px 0 #000}.view span.dashicons.dashicons-external{color:#22a6b3}.view span.dashicons.dashicons-sos{color:#22a6b3}.view span.dashicons.dashicons-download{color:#ee5253}.view span.dashicons.dashicons-media-code{color:#576574}.column-url,.widefat td.column-url,.widefat th.column-url{color:#1e8f9a;font-weight:700}.feed-progress-container{width:100%;color:#fff;text-align:center;font-weight:300}.feed-progress-bar{width:100%;background:#eee;padding:3px;border-radius:3px;box-shadow:inset 0 1px 3px rgba(0,0,0,.2)}.feed-progress-bar-fill{height:20px;display:block;background:#3dc264;width:0;border-radius:3px;transition:width .8s ease}.feed-progress-status{float:left;font-weight:700;color:#00008b}.feed-progress-percentage{text-align:right;font-weight:bolder;color:#41f49d;font-family:'Arial Black',sans-serif;font-size:large}#wpbody-content.woofeed-body-content{overflow:visible!important}.clippy{position:relative;width:13px;margin-top:-3px;margin-left:3px;top:3px}.column-url .clippy{display:none}.column-url:hover .clippy{display:inline-block}.tooltipped{position:relative}.tooltipped:after{position:absolute;z-index:1000000;display:none;padding:5px 8px;font:normal normal 11px/1.5 Helvetica,arial,nimbussansl,liberationsans,freesans,clean,sans-serif,"Segoe UI Emoji","Segoe UI Symbol";color:#fff;text-align:center;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-wrap:break-word;white-space:pre;pointer-events:none;content:attr(aria-label);background:rgba(0,0,0,.8);border-radius:3px;-webkit-font-smoothing:subpixel-antialiased}.tooltipped:before{position:absolute;z-index:1000001;display:none;width:0;height:0;color:rgba(0,0,0,.8);pointer-events:none;content:"";border:5px solid transparent}.tooltipped:hover:before{display:inline-block;text-decoration:none}.tooltipped:hover:after{display:inline-block;text-decoration:none}.tooltipped:active:before{display:inline-block;text-decoration:none}.tooltipped:active:after{display:inline-block;text-decoration:none}.tooltipped:focus:before{display:inline-block;text-decoration:none}.tooltipped:focus:after{display:inline-block;text-decoration:none}.tooltipped-multiline:hover:after{display:table-cell}.tooltipped-multiline:active:after{display:table-cell}.tooltipped-multiline:focus:after{display:table-cell}.tooltipped-multiline:after{width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:250px;word-break:break-word;word-wrap:normal;white-space:pre-line;border-collapse:separate}.tooltipped-s:after{top:100%;right:50%;margin-top:5px;-webkit-transform:translateX(50%);transform:translateX(50%)}.tooltipped-s:before{top:auto;right:50%;bottom:-5px;margin-right:-5px;border-bottom-color:rgba(0,0,0,.8)}.tooltipped-se:after{top:100%;margin-top:5px;right:auto;left:50%;margin-left:-15px}.tooltipped-se:before{top:auto;right:50%;bottom:-5px;margin-right:-5px;border-bottom-color:rgba(0,0,0,.8)}.tooltipped-sw:after{top:100%;right:50%;margin-top:5px;margin-right:-15px}.tooltipped-sw:before{top:auto;right:50%;bottom:-5px;margin-right:-5px;border-bottom-color:rgba(0,0,0,.8)}.tooltipped-n:after{right:50%;bottom:100%;margin-bottom:5px;-webkit-transform:translateX(50%);transform:translateX(50%)}.tooltipped-n:before{top:-5px;right:50%;bottom:auto;margin-right:-5px;border-top-color:rgba(0,0,0,.8)}.tooltipped-ne:after{bottom:100%;margin-bottom:5px;right:auto;left:50%;margin-left:-15px}.tooltipped-ne:before{top:-5px;right:50%;bottom:auto;margin-right:-5px;border-top-color:rgba(0,0,0,.8)}.tooltipped-nw:after{right:50%;bottom:100%;margin-bottom:5px;margin-right:-15px}.tooltipped-nw:before{top:-5px;right:50%;bottom:auto;margin-right:-5px;border-top-color:rgba(0,0,0,.8)}.tooltipped-w:after{right:100%;bottom:50%;margin-right:5px;-webkit-transform:translateY(50%);transform:translateY(50%)}.tooltipped-w:before{top:50%;bottom:50%;left:-5px;margin-top:-5px;border-left-color:rgba(0,0,0,.8)}.tooltipped-e:after{bottom:50%;left:100%;margin-left:5px;-webkit-transform:translateY(50%);transform:translateY(50%)}.tooltipped-e:before{top:50%;right:-5px;bottom:50%;margin-top:-5px;border-right-color:rgba(0,0,0,.8)}.tooltipped-multiline.tooltipped-s:after{right:auto;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.tooltipped-multiline.tooltipped-n:after{right:auto;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.tooltipped-multiline.tooltipped-w:after{right:100%}.tooltipped-multiline.tooltipped-e:after{right:100%}.tooltipped-sticky:before{display:inline-block}.tooltipped-sticky:after{display:inline-block}.tooltipped-sticky.tooltipped-multiline:after{display:table-cell}.fullscreen-overlay-enabled.dark-theme .tooltipped:after{color:#000;background:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped .tooltipped-s:before{border-bottom-color:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped .tooltipped-se:before{border-bottom-color:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped .tooltipped-sw:before{border-bottom-color:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped.tooltipped-n:before{border-top-color:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped.tooltipped-ne:before{border-top-color:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped.tooltipped-nw:before{border-top-color:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped.tooltipped-e:before{border-right-color:rgba(255,255,255,.8)}.fullscreen-overlay-enabled.dark-theme .tooltipped.tooltipped-w:before{border-left-color:rgba(255,255,255,.8)}@media screen and (min-width:0\0){.tooltipped-multiline:after{width:250px}}ul.tracker_collection_list{list-style:initial;padding:initial;margin:-10px 0 0 30px;font-size:11px!important}ul.tracker_collection_list li{margin:0}table.wf-info-table,table.wf-rate-table{vertical-align:middle;text-align:center;max-width:100%;font-weight:500}table.wf-info-table th,table.wf-rate-table th{text-align:center}table.wf-info-table th .woo-feed-top-header,table.wf-rate-table th .woo-feed-top-header{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}table.wf-info-table th .woo-feed-top-header .get-woo-feed-pro,table.wf-rate-table th .woo-feed-top-header .get-woo-feed-pro{margin-left:20px}table.wf-info-table th .woo-feed-top-header .woo-feed-top-buttons,table.wf-rate-table th .woo-feed-top-header .woo-feed-top-buttons{float:right;display:-ms-flexbox;display:flex;border-radius:7px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}table.wf-info-table th .woo-feed-top-header .woo-feed-top-buttons a,table.wf-rate-table th .woo-feed-top-header .woo-feed-top-buttons a{padding:8px 20px;background:#576574;color:#fff;box-sizing:border-box;display:inline-block;transition:.3s ease}table.wf-info-table th .woo-feed-top-header .woo-feed-top-buttons a.woo-feed-doc-link,table.wf-rate-table th .woo-feed-top-header .woo-feed-top-buttons a.woo-feed-doc-link{background:#576574;border-top-left-radius:5px;border-bottom-left-radius:5px}table.wf-info-table th .woo-feed-top-header .woo-feed-top-buttons a.woo-feed-video-link,table.wf-rate-table th .woo-feed-top-header .woo-feed-top-buttons a.woo-feed-video-link{background:#ee5253}table.wf-info-table th .woo-feed-top-header .woo-feed-top-buttons a.woo-feed-support-link,table.wf-rate-table th .woo-feed-top-header .woo-feed-top-buttons a.woo-feed-support-link{background:#22a6b3;border-top-right-radius:5px;border-bottom-right-radius:5px}table.wf-info-table th .woo-feed-top-header .woo-feed-top-buttons a span.dashicons,table.wf-rate-table th .woo-feed-top-header .woo-feed-top-buttons a span.dashicons{font-size:18px;line-height:1.2}table.wf-info-table th .woo-feed-top-header .woo-feed-top-buttons a:hover,table.wf-rate-table th .woo-feed-top-header .woo-feed-top-buttons a:hover{background:#30336b;box-shadow:0 0 33px 0 rgba(0,0,0,.12)}table.wf-info-table strong,table.wf-rate-table strong{font-weight:700}table.wf-info-table th:first-child img{margin:0 0 -5px 5px}table.wf-rate-table a{color:#0073aa}table.wf-rate-table a.review-star:after{content:"\f155\f155\f155\f155\f155"!important;font-family:dashicons;font-size:10px;font-weight:100;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#0073aa;text-decoration:underline}#adminmenu #toplevel_page_webappick-manage-feeds div.wp-menu-image::before{content:"";background:url(../images/woo-feed-icon.svg) no-repeat center center;background-size:20px 20px;opacity:.6}#adminmenu #toplevel_page_webappick-manage-feeds:hover div.wp-menu-image::before{opacity:1}#adminmenu #toplevel_page_webappick-manage-feeds.wp-has-current-submenu div.wp-menu-image::before{opacity:1}.wapk-admin,.wapk-admin *{box-sizing:border-box}.wapk-admin{position:relative;display:block;-webkit-hyphens:manual;-ms-hyphens:manual;-moz-hyphens:manual;hyphens:manual;color:#1b2730;margin:0 0 0 -10px}@media screen and (min-width:783px){.wapk-admin{margin:0 0 0 -20px}}.text-center{text-align:center}.wapk-admin h1,.wapk-admin h2,.wapk-admin h3,.wapk-admin h4,.wapk-admin h5,.wapk-admin h6,.wapk-admin p{color:#1b2730}.wapk-admin sup{vertical-align:baseline;position:relative;top:-6px}.wapk-admin sub{vertical-align:baseline;position:relative;top:4px}.wapk-admin .wapk-section{margin:10px 20px 0 22px;position:relative;display:block}.wapk-admin .wapk-section [class$=icon32]+h2{font-size:23px;font-weight:400;margin:0;padding:9px 0 4px 0;line-height:1.3}.wapk-admin .wapk-section h1{font-size:23px;font-weight:400;margin:0;padding:9px 0 4px 0;line-height:1.3}.wapk-admin .wapk-section>h2:first-child{font-size:23px;font-weight:400;margin:0;padding:9px 0 4px 0;line-height:1.3}.wapk-admin>.notice{margin:10px 20px 0 22px;position:relative;display:block}.wapk-admin span.help{display:block;float:left;width:100%;font-size:.9em;color:#636363;margin-top:5px;font-weight:500}.wapk-admin span.help .dashicons{width:11px;height:12px;font-size:inherit;vertical-align:middle}.clear:after{content:"";display:table;clear:both}.wapk-feed-docs .postbox{width:355px;margin-right:20px;display:inline-block;vertical-align:top}.wapk-feed-docs .postbox .hndle{font-size:14px;padding:8px 12px;margin:0;line-height:1.4;cursor:pointer}.wapk-feed-docs .postbox .dashicons{color:#ccc}.wapk-feed-docs .postbox a{text-decoration:none}.wapk-feed-docs .postbox .inside{margin-bottom:0}.wapk-feed-docs .postbox ul{margin-bottom:0}.wapk-feed-docs .postbox .toggle-indicator:before{content:"\F142";display:inline-block;font:400 20px/1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.wapk-feed-docs .postbox li{width:100%;display:block;float:left}.wapk-feed-docs .postbox li span{display:inline-block;float:left;margin-right:4px}.wapk-feed-docs .postbox li a{display:inline-block;float:left;width:calc(100% - 24px)}.wapk-feed-docs .postbox.closed .toggle-indicator:before{content:"\F140"}.wapk-section #post-body.columns-2 #side-sortables{min-height:196px}#poststuff #feed_merchant_info .inside{margin:0;padding:0}#feed_merchant_info ul.data{margin-left:24px;margin-top:5px}#feed_merchant_info ul.data li{margin-bottom:5px}.merchant-info-section{padding:6px 10px 8px}.generateFeed .wf-tab-content table:first-child{border:none;box-shadow:none}.generateFeed table th{font-weight:700}@media only screen and (max-width:850px){.wapk-feed-docs .postbox{display:block;width:auto;float:none;margin-right:auto}}.wp-submenu li span.woo-feed-docs{font-weight:700;color:#f18500}.wp-submenu li:hover span.woo-feed-docs{color:#ce7304}.wp-submenu li.current span.woo-feed-docs{color:#ce7304}.wapk-admin .wapk-feed-docs .postbox .hndle{cursor:default}.wapk-cta{position:relative;display:-ms-flexbox;display:flex;width:100%;padding:100px 15px;background:linear-gradient(45deg,#6cd5ff 33%,#c2efef 100%);-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.wapk-cta-icon .dashicons{font-size:100px;width:100px;height:auto;margin:0 10px -8px 0;color:#02658c}.wapk-cta-content{width:50%}.wapk-cta-content h2{font-size:2em;margin:.5em 0}.wapk-cta-action a.wapk-button{font-size:24px;height:auto!important;padding:10px 20px}@media (max-width:600px){.wapk-cta{display:block;text-align:center;padding:4em 0}.wapk-cta-content{width:100%;margin:2em 0}}.wapk-button{color:#00d4d4;border-color:#00d4d4;display:inline-block;text-decoration:none;font-size:13px;line-height:2.15384615;min-height:30px;margin:0;padding:0 10px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;border-radius:3px;white-space:nowrap;box-sizing:border-box}.wapk-button>svg{width:15px;margin-left:5px;fill:#00d4d4}.wapk-button>.dashicons{color:#00d4d4}.wapk-button:hover{border-color:#0bb;color:#0bb}.wapk-button:hover>svg{fill:#0bb}.wapk-button:hover>.dashicons{color:#0bb}.wapk-button:focus{border-color:#00d4d4;color:#0bb;box-shadow:0 0 0 1px #00d4d4}.wapk-button:focus>svg{fill:#0bb}.wapk-button:focus>.dashicons{color:#0bb}.wapk-button:active{background:#0bb;border-color:#0bb}.wapk-button-secondary{color:#00d4d4;border-color:#00d4d4;display:inline-block;text-decoration:none;font-size:13px;line-height:2.15384615;min-height:30px;margin:0;padding:0 10px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;border-radius:3px;white-space:nowrap;box-sizing:border-box}.wapk-button-secondary>svg{width:15px;margin-left:5px;fill:#00d4d4}.wapk-button-secondary>.dashicons{color:#00d4d4}.wapk-button-secondary:hover{border-color:#0bb;color:#0bb}.wapk-button-secondary:hover>svg{fill:#0bb}.wapk-button-secondary:hover>.dashicons{color:#0bb}.wapk-button-secondary:focus{border-color:#00d4d4;color:#0bb;box-shadow:0 0 0 1px #00d4d4}.wapk-button-secondary:focus>svg{fill:#0bb}.wapk-button-secondary:focus>.dashicons{color:#0bb}.wapk-button-primary{display:inline-block;text-decoration:none;font-size:13px;line-height:2.15384615;min-height:30px;margin:0;padding:0 10px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;border-radius:3px;white-space:nowrap;box-sizing:border-box;background:#00d4d4;border-color:#00d4d4;color:#fff;box-shadow:0 1px 0 #0bb;text-shadow:0 -1px 1px #0bb,1px 0 1px #0bb,0 1px 1px #0bb,-1px 0 1px #0bb}.wapk-button-primary>svg{fill:#fff}.wapk-button-primary:hover{background:#00e3e3;border-color:#00c5c5;color:#fff}.wapk-button-primary:hover>svg{fill:#fff}.wapk-button-primary:focus{background:#00e3e3;border-color:#00c5c5;color:#fff;box-shadow:0 0 0 1px #fff,0 0 0 3px #00d4d4}.wapk-button-primary:focus>svg{fill:#fff}.wapk-button-primary:active{background:#0bb;border-color:#0bb;color:#fff}.wapk-button-primary:active>svg{fill:#fff}.wapk-button-primary:disabled{color:#c7d1d1!important;background:#2ff!important;border-color:#2ff!important;text-shadow:none!important}.wapk-button-primary:disabled>svg{fill:#c7d1d1!important}.wapk-button.hover{border-color:#0bb;color:#0bb}.wapk-button.hover>svg{fill:#0bb}.wapk-button.hover>.dashicons{color:#0bb}.wapk-button.focus{border-color:#00d4d4;color:#0bb;box-shadow:0 0 0 1px #00d4d4}.wapk-button.focus>svg{fill:#0bb}.wapk-button.focus>.dashicons{color:#0bb}.wapk-button.active{border-color:#0bb;color:#0bb;box-shadow:inset 0 2px 5px -3px #0bb}.wapk-button.active:focus{border-color:#0bb;color:#0bb;box-shadow:inset 0 2px 5px -3px #0bb}.wapk-button.active:focus>svg{fill:#0bb}.wapk-button.active:focus>.dashicons{color:#0bb}.wapk-button.active:hover{border-color:#0bb;color:#0bb;box-shadow:inset 0 2px 5px -3px #0bb}.wapk-button.active:hover>svg{fill:#0bb}.wapk-button.active:hover>.dashicons{color:#0bb}.wapk-button.active>svg{fill:#0bb}.wapk-button.active>.dashicons{color:#0bb}.wapk-button-primary.active{background:#00d4d4;color:#fff;border-color:#088;box-shadow:inset 0 2px 5px -3px #000}.wapk-button-primary.active:focus{background:#00d4d4;color:#fff;border-color:#088;box-shadow:inset 0 2px 5px -3px #000}.wapk-button-primary.active:focus>svg{fill:#fff}.wapk-button-primary.active:hover{background:#00d4d4;color:#fff;border-color:#088;box-shadow:inset 0 2px 5px -3px #000}.wapk-button-primary.active:hover>svg{fill:#fff}.wapk-button-primary.active>svg{fill:#fff}.wapk-button-primary[disabled]{color:#c7d1d1!important;background:#2ff!important;border-color:#2ff!important;text-shadow:none!important}.wapk-button-primary[disabled]>svg{fill:#c7d1d1!important}.wapk-button-primary.wapk-button-primary-disabled{color:#c7d1d1!important;background:#2ff!important;border-color:#2ff!important;text-shadow:none!important}.wapk-button-primary.wapk-button-primary-disabled>svg{fill:#c7d1d1!important}.wapk-button-primary.disabled{color:#c7d1d1!important;background:#2ff!important;border-color:#2ff!important;text-shadow:none!important}.wapk-button-primary.disabled>svg{fill:#c7d1d1!important}.wapk-button-primary.wapk-button-hero{box-shadow:0 2px 0 #0bb}.wapk-button-primary.wapk-button-hero:focus{box-shadow:0 2px 0 #0bb,0 1px 0 #00c5c5,0 0 2px 1px #0ee}.wapk-button-primary.wapk-button-hero:active{box-shadow:inset 0 3px 0 #00a1a1}.wapk-button-primary.wapk-button-hero.active{box-shadow:inset 0 3px 0 #00a1a1}.wapk-button-primary.wapk-button-hero.active:focus,.wapk-button-primary.wapk-button-hero.active:hover{box-shadow:inset 0 3px 0 #00a1a1}.wapk-button-group>.wapk-button.active{border-color:#00d4d4}.wapk-button.wapk-button-xl{height:30px;line-height:28px;padding:0 12px 2px}.wapk-button-group.wapk-button-xl .wapk-button{height:30px;line-height:28px;padding:0 12px 2px}.wapk-button.wapk-button-hero{font-size:18px;height:50px;line-height:48px;padding:0 36px;min-height:46px}.wapk-button-group.wapk-button-hero .wapk-button{font-size:18px;height:50px;line-height:48px;padding:0 36px;min-height:46px}@media screen and (min-width:782px){th#provider,th#status{width:80px}th#type{width:50px}th#option_name{width:100px}td.option_name.column-option_name>span:first-child{display:none}th#last_updated{width:90px}th#view{width:111px}}@media screen and (min-width:960px){th#provider,th#status{width:100px}th#type{width:80px}th#option_name{width:150px}th#last_updated{width:140px}}@media screen and (max-width:782px){table.wf-info-table{margin-top:10px}table.wf-info-table th:first-child img{margin:0 auto;display:block}.wapk-button.wapk-button-xl{padding:6px 14px;line-height:normal;font-size:14px;vertical-align:middle;height:auto;margin-bottom:4px}}.wapk-feed-docs .wapk-feed-cta{margin:0}.campaign_configurator{background:#fff;padding:20px 0}.campaign_configurator table{margin:0 auto;width:51%;min-width:574px;border:none;box-shadow:none}.campaign_configurator th{min-width:120px}@media screen and (max-width:782px){.campaign_configurator{padding:0}.campaign_configurator table{width:auto;min-width:auto;max-width:100%}.campaign_configurator th{min-width:auto}}#wf-tab-content-config td>input:not([type=checkbox]):not([type=radio]),#wf-tab-content-config td>select,#wf-tab-content-config td>textarea{width:100%!important}.woo-feed-filters td>div:nth-child(2n):not(.clear):not(.selectize){width:120px;display:block}.woo-feed-filters td>div:not(.clear){float:left;margin-right:10px}.woo-feed-filters tr>td:first-child{width:290px;padding-left:40px}.woo-feed-filters,.woo-feed-ftp{margin:15px auto 25px}.wf_clean_cache_wrapper{display:-ms-flexbox;display:flex;margin-left:auto}@-webkit-keyframes LoaderClockWise{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes LoaderClockWise{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.woo-feed-cache-loader{width:18px;margin-right:5px;animation:LoaderClockWise 1s linear infinite;-webkit-animation:LoaderClockWise 1s linear infinite;display:none}.woo-feed-table-heading .woo-feed-table-heading-title{float:left;margin-right:auto;display:inline-block;line-height:30px}.woo-feed-table-heading .wf_clean_cache_wrapper{float:right;font-weight:400}.wf_clean_cache_wrapper button{background:#eb4d4b;color:#fff;border:none;font-weight:500;display:inline-block;text-decoration:none;font-size:13px;line-height:2.15384615;min-height:30px;margin:0;padding:0 10px;border-radius:3px;cursor:pointer;outline:0}.wf_clean_cache_wrapper button:hover{background:#ff7979;color:#fff}
admin/css/woo-feed-admin.scss CHANGED
@@ -448,7 +448,7 @@ input[class=woo_feed_status_input]:checked + label:before {
448
  span {
449
  &.dashicons {
450
  &.dashicons-external {
451
- color: #30336b;
452
  }
453
 
454
  &.dashicons-sos {
448
  span {
449
  &.dashicons {
450
  &.dashicons-external {
451
+ color: #22a6b3;
452
  }
453
 
454
  &.dashicons-sos {
admin/js/woo-feed-admin.js CHANGED
@@ -814,7 +814,7 @@
814
  event.preventDefault();
815
 
816
  if (!$(this).closest('.generateFeed').hasClass('add-new')) return; // only for new feed.
817
-
818
  let merchant = $(this).val(),
819
  feedType = $("#feedType"),
820
  feedForm = $("#providerPage"),
@@ -829,6 +829,8 @@
829
  feedType.parent().find('.spinner').addClass('is-active');
830
  merchantInfo.find('.merchant-info-section .data').html(''); // remove previous data
831
  // Get Merchant info for selected Provider/Merchant
 
 
832
 
833
  if (merchantInfoCache.hasOwnProperty(merchant)) {
834
  feedEditor.renderMerchantInfo(merchantInfo, feedType, merchantInfoCache[merchant]);
@@ -855,6 +857,11 @@
855
  }).then(function (r) {
856
  merchantTemplateCache[merchant] = r;
857
  feedEditor.renderMerchantTemplate(feedForm, r);
 
 
 
 
 
858
  }).fail(helper.ajax_fail);
859
  }
860
  })
814
  event.preventDefault();
815
 
816
  if (!$(this).closest('.generateFeed').hasClass('add-new')) return; // only for new feed.
817
+
818
  let merchant = $(this).val(),
819
  feedType = $("#feedType"),
820
  feedForm = $("#providerPage"),
829
  feedType.parent().find('.spinner').addClass('is-active');
830
  merchantInfo.find('.merchant-info-section .data').html(''); // remove previous data
831
  // Get Merchant info for selected Provider/Merchant
832
+
833
+
834
 
835
  if (merchantInfoCache.hasOwnProperty(merchant)) {
836
  feedEditor.renderMerchantInfo(merchantInfo, feedType, merchantInfoCache[merchant]);
857
  }).then(function (r) {
858
  merchantTemplateCache[merchant] = r;
859
  feedEditor.renderMerchantTemplate(feedForm, r);
860
+
861
+ //reviewer options hide
862
+ if( 'google_product_review' !== merchant) {
863
+ $('.wf_attributes option[value="reviewer_name"]').hide();
864
+ }
865
  }).fail(helper.ajax_fail);
866
  }
867
  })
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=[],h=[],p=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:p},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 p).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),h.hasOwnProperty(t)?d.renderMerchantTemplate(a,h[t]):o.post("get_feed_merchant",{_ajax_nonce:c.nonce,merchant:t}).then(function(e){h[t]=e,d.renderMerchantTemplate(a,e)}).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=[],h=[],p=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:p},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 p).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),h.hasOwnProperty(t)?d.renderMerchantTemplate(a,h[t]):o.post("get_feed_merchant",{_ajax_nonce:c.nonce,merchant:t}).then(function(e){h[t]=e,d.renderMerchantTemplate(a,e),"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
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","key","value","_regenerate","_current_btn_label","regenerate","_this","_log","response","_updateProgressStatus","message","product","setTimeout","_stopProgressBar","_process_batch","_color","_resetProgressBar","_ajax_nonce","post","_save_feed_file","_current_batch","_total_batch","_unblock_button","then","refreshInterval","arguments","undefined","_timer","setInterval","_updateProgressBar","clearInterval","update","table","show","hide","width","bar","percentage","load","background","current_page_url_query","page_action","preventDefault","pagenow","template","common","hover","title","appendTo","userAgent","merchantTemplateCache","remove","ClipboardJS","clipboard","location","slideToggle","loader","tbody","confirm","del_confirm","fail","href","_ajax_clean_nonce","current_attribute_value","outputSelect","fancyOption","fancyDataPicker","log","selectKey","parents","indexOf","selectIf","includes","urlParams","URLSearchParams","row","del_confirm_multi","closest","reindex_config_table","type","valid","validate","save","server","sftp_checking","sftp_available","price_attributes","send","provider","merchant","nonce","feedName","outOfStockVisibilityRow","valueColumn","attribute","select","query","parent","cb","checked","itemWrapper"],"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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AsCE,CA+FD+F,YAAcxC,EAAViH,MACHG,OAAAA,wBA7FFA,SAAAA,KAECtE,KAFDwD,SAAA7G,GAIE+C,EADD9I,EAAAA,GAECsN,EAAAA,KAAAA,YAAAA,WAFgC7B,KAAAxG,EAAAxC,mBAcjC+K,qBAAAA,EAAAA,OAAAA,IAAAA,EAAAA,KAAAA,oBAAAA,SACAnK,EAAMuJ,KAAE3M,QAAQ+N,SAHiBC,EAAAA,OAAA,sGAmGnB,YAhGd5K,EAgGMiD,OA5FR2H,EAAAA,KACClM,oBADDgI,UAIE0D,GAAAA,SAAAA,sBAAAA,WACA,IAAAb,EAAAxM,EAAA,aAAAkG,MACAmH,EACArN,EAAA,aAPHkG,MAnWC2H,EAAA7N,EAAA,gBA6WCqF,EA/2BJrF,EA+2BIoF","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\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\tbackground: this._color || \"#3DC264\",\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).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})\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 select any custom taxonomy\r\n\t\t\t\tif( \"\" !== current_attribute_value && -1 !== current_attribute_value.indexOf('wf_taxo') ) {\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}\r\n\r\n\t\t\t\t// when select any price attribute\r\n\t\t\t\tif( price_attributes.includes(current_attribute_value) ) {\r\n\t\t\t\t\tselectIf = 'for_price';\r\n\t\t\t\t\tselectKey = \"Price\";\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\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\tif (!$(this).closest('.generateFeed').hasClass('add-new')) return; // only for new feed.\r\n\t\t\t\t\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\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\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 () {\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} else if (type === 'xml') {\r\n\t\t\t\t\titemWrapper.show();\r\n\t\t\t\t\twf_csv_txt.hide();\r\n\t\t\t\t} else if (type === 'csv' || type === 'txt') {\r\n\t\t\t\t\titemWrapper.hide();\r\n\t\t\t\t\twf_csv_txt.show();\r\n\t\t\t\t} else {\r\n\t\t\t\t\titemWrapper.hide();\r\n\t\t\t\t\twf_csv_txt.hide();\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","key","value","_regenerate","_current_btn_label","regenerate","_this","_log","response","_updateProgressStatus","message","product","setTimeout","_stopProgressBar","_process_batch","_color","_resetProgressBar","_ajax_nonce","post","_save_feed_file","_current_batch","_total_batch","_unblock_button","then","refreshInterval","arguments","undefined","_timer","setInterval","_updateProgressBar","clearInterval","update","table","show","hide","width","bar","percentage","load","background","current_page_url_query","page_action","preventDefault","pagenow","template","common","hover","title","appendTo","userAgent","merchantTemplateCache","remove","ClipboardJS","clipboard","location","slideToggle","loader","tbody","confirm","del_confirm","fail","href","_ajax_clean_nonce","current_attribute_value","outputSelect","fancyOption","fancyDataPicker","log","selectKey","parents","indexOf","selectIf","includes","urlParams","URLSearchParams","row","del_confirm_multi","closest","reindex_config_table","type","valid","validate","save","server","sftp_checking","sftp_available","price_attributes","send","provider","merchant","nonce","checked","valueColumn","append","attribute","select","preload","query","learn_more","cb","itemWrapper","wf_csv_tx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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\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\tbackground: this._color || \"#3DC264\",\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).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})\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 select any custom taxonomy\r\n\t\t\t\tif( \"\" !== current_attribute_value && -1 !== current_attribute_value.indexOf('wf_taxo') ) {\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}\r\n\r\n\t\t\t\t// when select any price attribute\r\n\t\t\t\tif( price_attributes.includes(current_attribute_value) ) {\r\n\t\t\t\t\tselectIf = 'for_price';\r\n\t\t\t\t\tselectKey = \"Price\";\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\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\tif (!$(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//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 () {\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} else if (type === 'xml') {\r\n\t\t\t\t\titemWrapper.show();\r\n\t\t\t\t\twf_csv_txt.hide();\r\n\t\t\t\t} else if (type === 'csv' || type === 'txt') {\r\n\t\t\t\t\titemWrapper.hide();\r\n\t\t\t\t\twf_csv_txt.show();\r\n\t\t\t\t} else {\r\n\t\t\t\t\titemWrapper.hide();\r\n\t\t\t\t\twf_csv_txt.hide();\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"]}
includes/classes/class-woo-feed-dropdown.php CHANGED
@@ -198,6 +198,7 @@ class Woo_Feed_Dropdown {
198
  'sale_price_with_tax' => esc_html__( 'Sale Price With Tax', 'woo-feed' ),
199
  'sale_price_sdate' => esc_html__( 'Sale Start Date', 'woo-feed' ),
200
  'sale_price_edate' => esc_html__( 'Sale End Date', 'woo-feed' ),
 
201
  'weight' => esc_html__( 'Weight', 'woo-feed' ),
202
  'width' => esc_html__( 'Width', 'woo-feed' ),
203
  'height' => esc_html__( 'Height', 'woo-feed' ),
198
  'sale_price_with_tax' => esc_html__( 'Sale Price With Tax', 'woo-feed' ),
199
  'sale_price_sdate' => esc_html__( 'Sale Start Date', 'woo-feed' ),
200
  'sale_price_edate' => esc_html__( 'Sale End Date', 'woo-feed' ),
201
+ 'reviewer_name' => esc_html__( 'Reviewer Name', 'woo-feed' ),
202
  'weight' => esc_html__( 'Weight', 'woo-feed' ),
203
  'width' => esc_html__( 'Width', 'woo-feed' ),
204
  'height' => esc_html__( 'Height', 'woo-feed' ),
includes/classes/class-woo-feed-merchant.php CHANGED
@@ -324,6 +324,7 @@ class Woo_Feed_Merchant {
324
  'google' => esc_html__( 'Google Shopping', 'woo-feed' ),
325
  'google_local' => esc_html__( 'Google Local Product', 'woo-feed' ),
326
  'google_local_inventory' => esc_html__( 'Google Local Product Inventory', 'woo-feed' ),
 
327
  'google_shopping_action' => esc_html__( 'Google Shopping Action', 'woo-feed' ),
328
  'adwords' => esc_html__( 'Google Adwords', 'woo-feed' ),
329
  'facebook' => esc_html__( 'Facebook', 'woo-feed' ),
324
  'google' => esc_html__( 'Google Shopping', 'woo-feed' ),
325
  'google_local' => esc_html__( 'Google Local Product', 'woo-feed' ),
326
  'google_local_inventory' => esc_html__( 'Google Local Product Inventory', 'woo-feed' ),
327
+ 'google_product_review' => esc_html__( 'Google Product Review', 'woo-feed' ),
328
  'google_shopping_action' => esc_html__( 'Google Shopping Action', 'woo-feed' ),
329
  'adwords' => esc_html__( 'Google Adwords', 'woo-feed' ),
330
  'facebook' => esc_html__( 'Facebook', 'woo-feed' ),
includes/classes/class-woo-feed-products-v3.php CHANGED
@@ -387,10 +387,14 @@ class Woo_Feed_Products_v3
387
  continue;
388
  }
389
 
390
- if ( $this->process_variation($product) ) {
391
- continue;
 
 
 
392
  }
393
 
 
394
  if ( ! $this->filter_product($product) ) {
395
  woo_feed_log_feed_process($this->config['filename'], 'Skipping Product :: Matched with filter conditions');
396
  continue;
@@ -551,7 +555,18 @@ class Woo_Feed_Products_v3
551
  // Strip slash from output
552
  $attributeValue = stripslashes($attributeValue);
553
 
554
- $this->feedBody .= '<' . $getReplacedAttribute . '>' . "$attributeValue" . '</' . $getReplacedAttribute . '>';
 
 
 
 
 
 
 
 
 
 
 
555
  $this->feedBody .= "\n";
556
 
557
  } else {
@@ -572,6 +587,64 @@ class Woo_Feed_Products_v3
572
  }
573
  }
574
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
575
  /**
576
  * Check if current product should be processed for feed
577
  * This should be using by Woo_Feed_Products_v3::get_products()
387
  continue;
388
  }
389
 
390
+ //when marchant is not google product review and product is variation then skip the product
391
+ if( 'google_product_review' !== $this->config['provider'] ) {
392
+ if ( $this->process_variation($product) ) {
393
+ continue;
394
+ }
395
  }
396
 
397
+
398
  if ( ! $this->filter_product($product) ) {
399
  woo_feed_log_feed_process($this->config['filename'], 'Skipping Product :: Matched with filter conditions');
400
  continue;
555
  // Strip slash from output
556
  $attributeValue = stripslashes($attributeValue);
557
 
558
+ if( 'google_product_review' === $merchant ) {
559
+ $nested_attributes = array_keys( $this->feed_nested_attributes() );
560
+ if( in_array($getReplacedAttribute, $nested_attributes, true) ) {
561
+ $this->feedBody .= $this->nested_attributes_element($getReplacedAttribute, $attributeValue);
562
+ }else {
563
+ $this->feedBody .= '<' . $getReplacedAttribute . '>' . "$attributeValue" . '</' . $getReplacedAttribute . '>';
564
+ }
565
+
566
+ }else {
567
+ $this->feedBody .= '<' . $getReplacedAttribute . '>' . "$attributeValue" . '</' . $getReplacedAttribute . '>';
568
+ }
569
+
570
  $this->feedBody .= "\n";
571
 
572
  } else {
587
  }
588
  }
589
 
590
+ /**
591
+ * Process Nested Attributes
592
+ *
593
+ * @return array
594
+ * @since 4.0.5
595
+ *
596
+ */
597
+ protected function feed_nested_attributes() {
598
+ $attributes = [
599
+ 'reviewer' => [ 'reviewer', 'name' ],
600
+ 'ratings' => [ 'ratings', 'overall' ],
601
+ 'product_url' => [ 'products', 'product', 'product_url' ],
602
+ ];
603
+
604
+ return $attributes;
605
+ }
606
+
607
+ /**
608
+ * Process Nested Attributes
609
+ *
610
+ * @param string $attribute //product feed tag
611
+ * @param string $content //product feed content
612
+ *
613
+ * @return string
614
+ * @since 4.0.5
615
+ *
616
+ */
617
+ protected function nested_attributes_element( $attribute, $content ) {
618
+ $starter = '';
619
+ $finisher = '';
620
+ $element = '';
621
+
622
+ if( empty($attribute) ) return $attribute;
623
+
624
+ //get nested attributes
625
+ $attr_names = $this->feed_nested_attributes();
626
+
627
+ //loop through nested attributes to make nested element
628
+ foreach( $attr_names as $key => $value ) {
629
+ if( $key === $attribute ) {
630
+ //starter tags element
631
+ foreach( $value as $item_value ) {
632
+ $starter .= '<' . strval($item_value) . '>';
633
+ }
634
+
635
+ //finishing tags element
636
+ $rev_value = array_reverse($value);
637
+ foreach( $rev_value as $item_value ) {
638
+ $finisher .= '</' . strval($item_value) . '>';
639
+ }
640
+ }
641
+ }
642
+
643
+ $element = $starter . $content . $finisher;
644
+
645
+ return $element;
646
+ }
647
+
648
  /**
649
  * Check if current product should be processed for feed
650
  * This should be using by Woo_Feed_Products_v3::get_products()
includes/feeds/merchant_infos.php CHANGED
@@ -31,6 +31,10 @@ return array(
31
  'google_local_inventory' => array(
32
  'link' => 'https://support.google.com/merchants/answer/3061342?hl=en',
33
  'feed_file_type' => array( 'XML', 'CSV', 'TXT' ),
 
 
 
 
34
  ),
35
  'adwords' => '',
36
  'facebook' => array(
31
  'google_local_inventory' => array(
32
  'link' => 'https://support.google.com/merchants/answer/3061342?hl=en',
33
  'feed_file_type' => array( 'XML', 'CSV', 'TXT' ),
34
+ ),
35
+ 'google_product_review' => array(
36
+ 'link' => 'https://developers.google.com/product-review-feeds/sample',
37
+ 'feed_file_type' => array( 'XML' ),
38
  ),
39
  'adwords' => '',
40
  'facebook' => array(
includes/helper.php CHANGED
@@ -2806,5 +2806,23 @@ if( ! function_exists('woo_feed_get_terms_list_hierarchical_order') ) {
2806
  }
2807
  }
2808
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2809
 
2810
  // End of file helper.php.
2806
  }
2807
  }
2808
 
2809
+ if( ! function_exists( 'woo_feed_get_products_ids_of_reviews' ) ) {
2810
+ /**
2811
+ * Get reviews product ids .
2812
+ *
2813
+ * @return array $review_products_ids // review products ids
2814
+ * @since 4.0.5
2815
+ */
2816
+ function woo_feed_get_products_ids_of_reviews() {
2817
+ $args = array('post_type' => 'product');
2818
+ $reviews = get_comments($args);
2819
+ $review_products_ids = wp_list_pluck($reviews, 'comment_post_ID');
2820
+
2821
+
2822
+ return !empty($review_products_ids) && is_array($review_products_ids) ? array_unique($review_products_ids) : array();
2823
+
2824
+ }
2825
+ }
2826
+
2827
 
2828
  // End of file helper.php.
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.4
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.4' );
42
  }
43
 
44
  if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {
@@ -220,8 +220,14 @@ if ( ! function_exists( 'woo_feed_get_product_information' ) ) {
220
  try {
221
  do_action( 'before_woo_feed_get_product_information', $getConfig );
222
  $products = new Woo_Feed_Products_v3( $getConfig );
223
- $ids = $products->query_products();
224
- do_action( 'after_woo_feed_get_product_information', $getConfig );
 
 
 
 
 
 
225
  woo_feed_log_feed_process( $getConfig['filename'], sprintf( 'Total %d product found', is_array( $ids ) && ! empty( $ids ) ? count( $ids ) : 0 ) );
226
  if ( is_array( $ids ) && ! empty( $ids ) ) {
227
  rsort($ids); //sorting ids in descending order
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.5
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.5' );
42
  }
43
 
44
  if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {
220
  try {
221
  do_action( 'before_woo_feed_get_product_information', $getConfig );
222
  $products = new Woo_Feed_Products_v3( $getConfig );
223
+
224
+ if( array_key_exists('provider', $getConfig) && 'google_product_review' === $getConfig['provider'] ) {
225
+ $ids = woo_feed_get_products_ids_of_reviews(); //get review products ids
226
+ }else {
227
+ $ids = $products->query_products();
228
+ }
229
+
230
+ do_action( 'after_woo_feed_get_product_information', $getConfig );
231
  woo_feed_log_feed_process( $getConfig['filename'], sprintf( 'Total %d product found', is_array( $ids ) && ! empty( $ids ) ? count( $ids ) : 0 ) );
232
  if ( is_array( $ids ) && ! empty( $ids ) ) {
233
  rsort($ids); //sorting ids in descending order