CTX Feed – WooCommerce Product Feed Manager Plugin - Version 4.4.19

Version Description

(2021-08-06) = * Fixed: License key activation issue. * Fixed: Auto generate attribute key.

Download this release

Release Info

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

Code changes from version 4.4.18 to 4.4.19

README.txt CHANGED
@@ -5,7 +5,7 @@ Tags: Product Feed, WooCommerce, Google Shopping, Google Merchant, Facebook Cata
5
  Requires at least: 4.4
6
  Tested Up To: 5.8
7
  Requires PHP: 5.6
8
- Stable tag: 4.4.18
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -516,7 +516,11 @@ Using pro version:
516
 
517
  == Changelog ==
518
 
519
- = 4.4.18 (2021-08-5) =
 
 
 
 
520
  * Added: UTM parameter added for external product link.
521
  * Added: Automatic category suggestion for Google, Facebook, Pinterest, Bing, Snapchat.
522
  * Added: Automatic copy category added.
5
  Requires at least: 4.4
6
  Tested Up To: 5.8
7
  Requires PHP: 5.6
8
+ Stable tag: 4.4.19
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
516
 
517
  == Changelog ==
518
 
519
+ = 4.4.19 (2021-08-06) =
520
+ * Fixed: License key activation issue.
521
+ * Fixed: Auto generate attribute key.
522
+
523
+ = 4.4.18 (2021-08-05) =
524
  * Added: UTM parameter added for external product link.
525
  * Added: Automatic category suggestion for Google, Facebook, Pinterest, Bing, Snapchat.
526
  * Added: Automatic copy category added.
admin/css/woo-feed-admin.css CHANGED
@@ -1279,7 +1279,7 @@ table.wf-rate-table a.review-star:after {
1279
  #wf-tab-content-config td > textarea {
1280
  width: 100% !important; }
1281
 
1282
- .woo-feed-filters td > div:nth-child(2n):not(.clear):not(.selectize) {
1283
  width: 120px;
1284
  display: block; }
1285
 
1279
  #wf-tab-content-config td > textarea {
1280
  width: 100% !important; }
1281
 
1282
+ .woo-feed-filters td > div:nth-child(2n):not(.clear):not(.selectize):not(.counter) {
1283
  width: 120px;
1284
  display: block; }
1285
 
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)}}.webappick-info{color:#42a5fa}.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}.woo_feed_manage_list_table .wf_update_interval_btn{background:linear-gradient(125deg,#3cb0fd 0,#6c5ce7 140%);border:none}.woo_feed_manage_list_table .wf_update_interval_btn:hover{background:linear-gradient(125deg,#3cb0fd 0,#6c5ce7 140%)}.woo-feed-promotion{position:relative;display:none}.woo-feed-promotion .woo-feed-campaign-close-button{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);right:15px;width:24px;height:24px;border-radius:12px;background:#595d6b;line-height:24px;color:#fff;cursor:pointer;transition:.3s ease}.woo-feed-promotion .woo-feed-campaign-close-button:hover{background:#fff;color:#d61e48}.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}.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:28px;box-sizing:border-box;float:left;border-radius:100px;position:relative;cursor:pointer;transition:.3s ease;background:linear-gradient(125deg,#e2e2e2 0,#ccc 140%)}input[class=woo_feed_status_input]:checked+label{background:linear-gradient(125deg,#3cb0fd 0,#6c5ce7 140%)}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:4px;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:50px;box-shadow:inset 0 1px 3px rgba(0,0,0,.2)}.feed-progress-bar-fill{height:20px;display:block;background:linear-gradient(to right top,#10ac84,#13b389,#15ba8f,#18c194,#1ac89a,#13cba1,#0acfa9,#00d2b0,#00d2ba,#00d2c3,#00d2cb,#00d2d3);width:0;border-radius:50px;transition:width .8s ease}.feed-progress-status{float:left;font-weight:700;color:#00008b}.feed-progress-percentage{text-align:right;font-weight:bolder;color:#1dd1a1;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}.merchant-info-section.woo-feed-open-file{text-align:center}.merchant-info-section.woo-feed-open-file a{line-height:1.5;text-decoration:none}.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:135px}}@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:linear-gradient(125deg,#eb4d4b 0,#ff9671 130%);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}input[type=submit][data-id=wf_action_submit]{background:linear-gradient(125deg,#3cb0fd 0,#6c5ce7 140%);color:#fff;border:1px;padding:0 20px}input[type=submit][data-id=wf_action_submit]:hover{background:linear-gradient(125deg,#3cb0fd 0,#6c5ce7 140%);color:#fff}.woo-import-popup-body #TB_window{width:500px!important}.woo-import-popup-body #TB_window #TB_title{border:none;background:#fff;text-align:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:35px!important}.woo-import-popup-body #TB_window #TB_title #TB_ajaxWindowTitle{color:#30336b;font-weight:700}.woo-import-popup-body #TB_window #TB_closeWindowButton{top:-14.5px;right:-14.5px;border:none;outline:0}.woo-import-popup-body #TB_window #TB_closeWindowButton .tb-close-icon{background:#ff5e55;color:#fff;border-radius:50%}.woo-import-popup-body #TB_window #TB_closeWindowButton:focus{outline:0;border:0}.woo-import-popup-body #TB_window #TB_ajaxContent{position:relative;width:100%!important;height:auto!important;border:none;box-sizing:border-box;overflow:hidden;background:#f7fcff;padding:30px 20px}.woo-import-popup-body #TB_window #TB_ajaxContent:before{content:'';width:115%;display:block;background:#4bcffa;position:absolute;height:130%;z-index:0;left:-36%;top:-85px;-webkit-transform:rotate(115deg);transform:rotate(115deg)}.woo-import-popup-body #TB_window #TB_ajaxContent table{border:none;position:relative;z-index:1;border-radius:3px;text-align:center;padding:20px;box-shadow:0 12px 20px -17px #000}.woo-import-popup-body #TB_window #TB_ajaxContent table input{width:60%}.woo-import-popup-body #TB_window #TB_ajaxContent table input:focus{outline:2px solid #68b8f7}.woo-import-popup-body #TB_window #TB_ajaxContent table input[type=file]{padding:3px 0;cursor:pointer}.woo-import-popup-body #TB_window #TB_ajaxContent table input[type=text]{border-radius:25px;font-size:14px;padding:1px 20px;text-align:center}.woo-import-popup-body #TB_window #TB_ajaxContent table input[type=submit]{background:#17c0eb;border-radius:25px;border:0;box-shadow:1px 4px 7px -3px #45364a;font-weight:600;transition:.3s ease}.woo-import-popup-body #TB_window #TB_ajaxContent table input[type=submit]:hover{-webkit-transform:translateY(-2px);transform:translateY(-2px)}.woo-feed-notice .woo-feed-review-notice-logo{width:90px;height:90px;float:left;margin-right:5px;background:url(../images/woo-feed-logo.svg) no-repeat}.woo-feed-status-table-wrapper .woo-feed-status-table{width:100%;max-width:900px;border-collapse:collapse;border-spacing:.5rem;box-shadow:0 0 20px rgba(0,0,0,.1)}.woo-feed-status-table-wrapper .woo-feed-status-table tr:nth-child(even){background:#f1f1f1}.woo-feed-status-table-wrapper .woo-feed-status-table tr:nth-child(odd){background:#fafafc}.woo-feed-status-table-wrapper .woo-feed-status-table tr th{background:#353b48;color:#fff}.woo-feed-status-table-wrapper .woo-feed-status-table tr th.woo-feed-status-message-header{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}.woo-feed-status-table-wrapper .woo-feed-status-table tr th.woo-feed-status-message-header #woo-feed-copy-status-btn{background:linear-gradient(125deg,#3cb0fd 0,#6c5ce7 140%);border:none}.woo-feed-status-table-wrapper .woo-feed-status-table tr td,.woo-feed-status-table-wrapper .woo-feed-status-table tr th{padding:.5rem 20px;text-align:left}input[id^=woo_feed_identifier_]{display:block;width:100%!important}#taxonomy-woo-feed-brand #newwoo-feed-brand_parent,.taxonomy-woo-feed-brand .form-field.term-parent-wrap{display:none}.wapk-admin .switch{position:relative;display:inline-block;width:60px;height:34px}.wapk-admin .switch input{opacity:0;width:0;height:0}.wapk-admin .slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:.4s}.wapk-admin .slider:before{position:absolute;content:"";height:26px;width:26px;left:4px;bottom:4px;background-color:#fff;transition:.4s}.wapk-admin input:checked+.slider{background-color:#18c194}.wapk-admin input:focus+.slider{box-shadow:0 0 1px #2196f3}.wapk-admin input:checked+.slider:before{-webkit-transform:translateX(26px);transform:translateX(26px)}.wapk-admin .slider.round{border-radius:34px}.wapk-admin .slider.round:before{border-radius:50%}span[id*=cat-map-]{cursor:pointer;position:relative;top:5px}
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)}}.webappick-info{color:#42a5fa}.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}.woo_feed_manage_list_table .wf_update_interval_btn{background:linear-gradient(125deg,#3cb0fd 0,#6c5ce7 140%);border:none}.woo_feed_manage_list_table .wf_update_interval_btn:hover{background:linear-gradient(125deg,#3cb0fd 0,#6c5ce7 140%)}.woo-feed-promotion{position:relative;display:none}.woo-feed-promotion .woo-feed-campaign-close-button{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);right:15px;width:24px;height:24px;border-radius:12px;background:#595d6b;line-height:24px;color:#fff;cursor:pointer;transition:.3s ease}.woo-feed-promotion .woo-feed-campaign-close-button:hover{background:#fff;color:#d61e48}.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}.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:28px;box-sizing:border-box;float:left;border-radius:100px;position:relative;cursor:pointer;transition:.3s ease;background:linear-gradient(125deg,#e2e2e2 0,#ccc 140%)}input[class=woo_feed_status_input]:checked+label{background:linear-gradient(125deg,#3cb0fd 0,#6c5ce7 140%)}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:4px;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:50px;box-shadow:inset 0 1px 3px rgba(0,0,0,.2)}.feed-progress-bar-fill{height:20px;display:block;background:linear-gradient(to right top,#10ac84,#13b389,#15ba8f,#18c194,#1ac89a,#13cba1,#0acfa9,#00d2b0,#00d2ba,#00d2c3,#00d2cb,#00d2d3);width:0;border-radius:50px;transition:width .8s ease}.feed-progress-status{float:left;font-weight:700;color:#00008b}.feed-progress-percentage{text-align:right;font-weight:bolder;color:#1dd1a1;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}.merchant-info-section.woo-feed-open-file{text-align:center}.merchant-info-section.woo-feed-open-file a{line-height:1.5;text-decoration:none}.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:135px}}@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):not(.counter){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:linear-gradient(125deg,#eb4d4b 0,#ff9671 130%);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}input[type=submit][data-id=wf_action_submit]{background:linear-gradient(125deg,#3cb0fd 0,#6c5ce7 140%);color:#fff;border:1px;padding:0 20px}input[type=submit][data-id=wf_action_submit]:hover{background:linear-gradient(125deg,#3cb0fd 0,#6c5ce7 140%);color:#fff}.woo-import-popup-body #TB_window{width:500px!important}.woo-import-popup-body #TB_window #TB_title{border:none;background:#fff;text-align:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:35px!important}.woo-import-popup-body #TB_window #TB_title #TB_ajaxWindowTitle{color:#30336b;font-weight:700}.woo-import-popup-body #TB_window #TB_closeWindowButton{top:-14.5px;right:-14.5px;border:none;outline:0}.woo-import-popup-body #TB_window #TB_closeWindowButton .tb-close-icon{background:#ff5e55;color:#fff;border-radius:50%}.woo-import-popup-body #TB_window #TB_closeWindowButton:focus{outline:0;border:0}.woo-import-popup-body #TB_window #TB_ajaxContent{position:relative;width:100%!important;height:auto!important;border:none;box-sizing:border-box;overflow:hidden;background:#f7fcff;padding:30px 20px}.woo-import-popup-body #TB_window #TB_ajaxContent:before{content:'';width:115%;display:block;background:#4bcffa;position:absolute;height:130%;z-index:0;left:-36%;top:-85px;-webkit-transform:rotate(115deg);transform:rotate(115deg)}.woo-import-popup-body #TB_window #TB_ajaxContent table{border:none;position:relative;z-index:1;border-radius:3px;text-align:center;padding:20px;box-shadow:0 12px 20px -17px #000}.woo-import-popup-body #TB_window #TB_ajaxContent table input{width:60%}.woo-import-popup-body #TB_window #TB_ajaxContent table input:focus{outline:2px solid #68b8f7}.woo-import-popup-body #TB_window #TB_ajaxContent table input[type=file]{padding:3px 0;cursor:pointer}.woo-import-popup-body #TB_window #TB_ajaxContent table input[type=text]{border-radius:25px;font-size:14px;padding:1px 20px;text-align:center}.woo-import-popup-body #TB_window #TB_ajaxContent table input[type=submit]{background:#17c0eb;border-radius:25px;border:0;box-shadow:1px 4px 7px -3px #45364a;font-weight:600;transition:.3s ease}.woo-import-popup-body #TB_window #TB_ajaxContent table input[type=submit]:hover{-webkit-transform:translateY(-2px);transform:translateY(-2px)}.woo-feed-notice .woo-feed-review-notice-logo{width:90px;height:90px;float:left;margin-right:5px;background:url(../images/woo-feed-logo.svg) no-repeat}.woo-feed-status-table-wrapper .woo-feed-status-table{width:100%;max-width:900px;border-collapse:collapse;border-spacing:.5rem;box-shadow:0 0 20px rgba(0,0,0,.1)}.woo-feed-status-table-wrapper .woo-feed-status-table tr:nth-child(even){background:#f1f1f1}.woo-feed-status-table-wrapper .woo-feed-status-table tr:nth-child(odd){background:#fafafc}.woo-feed-status-table-wrapper .woo-feed-status-table tr th{background:#353b48;color:#fff}.woo-feed-status-table-wrapper .woo-feed-status-table tr th.woo-feed-status-message-header{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}.woo-feed-status-table-wrapper .woo-feed-status-table tr th.woo-feed-status-message-header #woo-feed-copy-status-btn{background:linear-gradient(125deg,#3cb0fd 0,#6c5ce7 140%);border:none}.woo-feed-status-table-wrapper .woo-feed-status-table tr td,.woo-feed-status-table-wrapper .woo-feed-status-table tr th{padding:.5rem 20px;text-align:left}input[id^=woo_feed_identifier_]{display:block;width:100%!important}#taxonomy-woo-feed-brand #newwoo-feed-brand_parent,.taxonomy-woo-feed-brand .form-field.term-parent-wrap{display:none}.wapk-admin .switch{position:relative;display:inline-block;width:60px;height:34px}.wapk-admin .switch input{opacity:0;width:0;height:0}.wapk-admin .slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:.4s}.wapk-admin .slider:before{position:absolute;content:"";height:26px;width:26px;left:4px;bottom:4px;background-color:#fff;transition:.4s}.wapk-admin input:checked+.slider{background-color:#18c194}.wapk-admin input:focus+.slider{box-shadow:0 0 1px #2196f3}.wapk-admin input:checked+.slider:before{-webkit-transform:translateX(26px);transform:translateX(26px)}.wapk-admin .slider.round{border-radius:34px}.wapk-admin .slider.round:before{border-radius:50%}span[id*=cat-map-]{cursor:pointer;position:relative;top:5px}
admin/css/woo-feed-admin.scss CHANGED
@@ -974,8 +974,6 @@ table {
974
  }
975
  }
976
  }
977
-
978
-
979
  }
980
  strong {
981
  font-weight: bold;
@@ -1781,7 +1779,7 @@ table {
1781
  .woo-feed-filters {
1782
  td {
1783
  > div {
1784
- &:nth-child(2n):not(.clear):not(.selectize) {
1785
  width: 120px;
1786
  display: block;
1787
  }
@@ -1870,6 +1868,7 @@ input {
1870
  }
1871
  }
1872
  }
 
1873
  //thickbox Style
1874
  .woo-import-popup-body {
1875
  #TB_window {
@@ -2013,7 +2012,7 @@ input {
2013
  border: none;
2014
  }
2015
  }
2016
-
2017
  }
2018
 
2019
  th,td {
974
  }
975
  }
976
  }
 
 
977
  }
978
  strong {
979
  font-weight: bold;
1779
  .woo-feed-filters {
1780
  td {
1781
  > div {
1782
+ &:nth-child(2n):not(.clear):not(.selectize):not(.counter) {
1783
  width: 120px;
1784
  display: block;
1785
  }
1868
  }
1869
  }
1870
  }
1871
+
1872
  //thickbox Style
1873
  .woo-import-popup-body {
1874
  #TB_window {
2012
  border: none;
2013
  }
2014
  }
2015
+
2016
  }
2017
 
2018
  th,td {
admin/js/woo-feed-admin.js CHANGED
@@ -9,1226 +9,1243 @@
9
  /* global ajaxurl, wpAjax, postboxes, pagenow, alert, deleteUserSetting, typenow, adminpage, thousandsSeparator, decimalPoint, isRtl */
10
  // noinspection JSUnresolvedVariable
11
  (function($, window, document, wpAjax, opts) {
12
- "use strict";
13
- /**
14
- * All of the code for your admin-facing JavaScript source
15
- * should reside in this file.
16
- *
17
- * Note: It has been assumed you will write jQuery code here, so the
18
- * $ function reference has been prepared for usage within the scope
19
- * of this function.
20
- *
21
- * This enables you to define handlers, for when the DOM is ready:
22
- */
23
-
24
- /**
25
- * disable element utility
26
- *
27
- * @since 3.1.9
28
- *
29
- * @param {*} status
30
- * @returns {jQuery|HTMLElement}
31
- */
32
- $.fn.disabled = function(status) {
33
- $(this).each(function() {
34
- let self = $(this),
35
- prop = 'disabled';
36
-
37
- if (typeof self.prop(prop) !== 'undefined') {
38
- self.prop(prop, status === void 0 || status === true);
39
- } else {
40
- !0 === status ? self.addClass(prop) : self.removeClass(prop);
41
- }
42
- });
43
- return self; // method chaining
44
- };
45
-
46
- /**
47
- * Check if a HTMLElement or jQuery is disabled
48
- */
49
- $.fn.isDisabled = function() {
50
- let self = $(this),
51
- prop = 'disabled';
52
- return typeof self.prop(prop) !== 'undefined' ? self.prop(prop) : self.hasClass(prop);
53
- };
54
-
55
- /**
56
- * Clear Tooltip for clip board js
57
- * @param {Object} event
58
- */
59
- const clearTooltip = (event) => {
60
- $(event.currentTarget).removeClass( (index, className) => (className.match(/\btooltipped-\S+/g) || []).join(' ') ).removeClass('tooltipped').removeAttr('aria-label');
61
- };
62
-
63
- const showTooltip = (elem, msg) => {
64
- $(elem).addClass('tooltipped tooltipped-s').attr('aria-label', msg);
65
- };
66
-
67
- const fallbackMessage = (action) =>{
68
- let actionMsg,
69
- actionKey = action === 'cut' ? 'X' : 'C';
70
-
71
- if (/iPhone|iPad/i.test(navigator.userAgent)) {
72
- actionMsg = 'No support :(';
73
- } else if (/Mac/i.test(navigator.userAgent)) {
74
- actionMsg = 'Press ⌘-' + actionKey + ' to ' + action;
75
- } else {
76
- actionMsg = 'Press Ctrl-' + actionKey + ' to ' + action;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  }
78
 
79
- return actionMsg;
80
- };
81
-
82
- /**
83
- * Alias of jQuery.extend()
84
- * @param {Object} _default
85
- * @param {Object} _args
86
- */
87
- const extend = (_default, _args) => $.extend(true, {}, _default, _args);
88
-
89
- let $copyBtn,
90
- clipboard,
91
- googleCategories,
92
- helper = {
93
- in_array: (needle, haystack) => {
94
- try {
95
- return haystack.indexOf(needle) !== -1;
96
- } catch (e) {
97
- return false;
98
- }
99
- },
100
- selectize_render_item: (data, escape) => `<div class="item wapk-selectize-item">${escape(data.value + ' ' + data.text)}</div>`, // phpcs:ignore WordPressVIPMinimum.JS.StringConcat.Found,
101
- ajax_fail: e => {
102
- console.warn(e);
103
- alert(e.hasOwnProperty('statusText') && e.hasOwnProperty('status') ? opts.ajax.error + '\n' + e.statusText + ' (' + e.status + ')' : e);
104
- },
105
- /**
106
- * Initialize Sortable
107
- * @param {jQuery|HTMLElement} el
108
- * @param {object} config
109
- * @param {int|boolean} column
110
- * @param {function} onDrop
111
- * @return {jQuery|HTMLElement}
112
- */
113
- sortable: (el, config, column, onDrop) => {
114
- return (el || $('.sorted_table')).each(function() {
115
- let self = $(this),
116
- column_count = self.find('tbody > tr:eq(0) > td').length || column || 9;
117
- self.wf_sortable(extend({
118
- containerSelector: 'table',
119
- itemPath: '> tbody',
120
- itemSelector: 'tr',
121
- handle: 'i.wf_sortedtable',
122
- placeholder: `<tr class="placeholder"><td colspan="${column_count}"></td></tr>`,
123
- onDrop: ($item, container, _super, event) => {
124
- $item.removeClass(container.group.options.draggedClass).removeAttr('style');
125
- $("body").removeClass(container.group.options.bodyClass);
126
- if ( onDrop && 'function' === typeof( onDrop ) ) {
127
- onDrop( $item, container, _super, event );
128
- }
129
- },
130
- }, config));
131
- });
132
- },
133
- selectize: (el, config) => {
134
- return (el || $('select.selectize')).not('.selectized').each(function() {
135
- let self = $(this);
136
- self.selectize(extend({
137
- create: self.data('create') || false,
138
- plugins: self.data('plugins') ? self.data('plugins').split(',').map(function(s) {
139
- return s.trim();
140
- }) : [],
141
- //['remove_button'],
142
- render: {
143
- item: helper.selectize_render_item
144
- }
145
- }, config));
146
- });
147
- },
148
- fancySelect: (el, config) => {
149
- return (el || $('select.fancySelect')).not('.FancySelectInit').each(function() {
150
- let self = $(this);
151
- self.fancySelect(extend({
152
- maxItemShow: 3
153
- }, config));
154
- });
155
- },
156
- reindex_config_table: () => {
157
- $('#table-1').find('tbody tr').each( ( x, el ) => {
158
- $(el).find('[name]').each( ( x1, el ) => {
159
- $(el).attr('name', $(el).attr('name').replace(/(\[\d\])/g, `[${x}]`));
160
- } );
161
- } );
162
- },
163
- common: () => {
164
- helper.sortable( $('.sorted_table'), {}, 9, helper.reindex_config_table );
165
- helper.selectize();
166
- helper.fancySelect($('.outputType'));
167
- }
168
- },
169
- // helper functions
170
- feedEditor = {
171
- /**
172
- * The Editor Form Elem.
173
- * @type {jQuery|HTMLElement}
174
- */
175
- form: null,
176
-
177
- /**
178
- * Initialize The Feed Editor {Tabs...}
179
- * @returns {void}
180
- */
181
- init: function () {
182
- let self = this;
183
- self.form = $('.generateFeed');
184
- if (!self.form.length) return;
185
- helper.common();
186
- // noinspection JSUnresolvedVariable
187
- $(document).trigger(new jQuery.Event('feedEditor.init', {
188
- target: this.form
189
- }));
190
- },
191
-
192
- /**
193
- * Render Merchant info ajax response and handle allowed feed type for selected merchant
194
- * @param {jQuery|HTMLElement} merchantInfo jQuery dom object
195
- * @param {jQuery|HTMLElement} feedType jQuery dom object
196
- * @param {Object} r ajax response object
197
- */
198
- renderMerchantInfo: function (merchantInfo, feedType, r) {
199
- for (let k in r) {
200
- if (r.hasOwnProperty(k)) {
201
- merchantInfo.find('.merchant-info-section.' + k + ' .data').html(r[k]); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html
202
-
203
- if ('feed_file_type' === k) {
204
- (function() {
205
- let types = r[k].split(",").map(function(t) {
206
- return t.trim().toLowerCase();
207
- }).filter(function(t) {
208
- // noinspection JSUnresolvedVariable
209
- return t !== '' && t !== opts.na.toLowerCase();
210
- });
211
-
212
- if (types.length) {
213
- feedType.find('option').removeAttr('selected').each(function() {
214
- let opt = $(this);
215
- opt.val() && !helper.in_array(opt.val(), types) ? opt.disabled(!0) : opt.disabled(!1);
216
- });
217
- if (types.length === 1) feedType.find('option[value="' + types[0] + '"]').attr('selected', 'selected');
218
- } else feedType.find('option').disabled(!1);
219
- })();
220
- }
221
- }
222
- }
223
-
224
- merchantInfo.find('.spinner').removeClass('is-active');
225
- feedType.disabled(!1);
226
- feedType.trigger('change');
227
-
228
- /**
229
- * Triggers after merchant configuration is fetched & loaded
230
- * */
231
- $(document).trigger('woo_feed_config_loaded');
232
-
233
- feedType.parent().find('.spinner').removeClass('is-active');
234
- },
235
-
236
- /**
237
- * Render Feed Template Tabs and settings while creating new feed.
238
- * @param {jQuery|HTMLElement} feedForm feed from query dom object
239
- * @param {object} r merchant template ajax response object
240
- */
241
- renderMerchantTemplate: function (feedForm, r) {
242
- let _loop = function _loop(k) {
243
- if (r.hasOwnProperty(k)) {
244
- if ('tabs' === k) {
245
- // noinspection JSUnresolvedFunction
246
- feedForm.html(r[k]); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html
247
- } else {
248
- let contentSettings = $('[name="' + k + '"]');
249
-
250
- if (contentSettings.length) {
251
- contentSettings.each(function() {
252
- let elem = $(this);
253
-
254
- if (elem.is('select')) {
255
- elem.find('[value="' + r[k] + '"]').prop('selected', true);
256
- } else if ((elem.is('[type=checkbox]') || elem.is('[type=radio]')) && elem.val() === r[k]) {
257
- elem.prop('checked', true);
258
- } else {
259
- elem.val(r[k]); // type=text
260
- }
261
- }).trigger('change');
262
- }
263
- }
264
- }
265
- };
266
-
267
- for (let k in r) {
268
- _loop(k);
269
- }
270
-
271
- feedEditor.init();
272
- }
273
- },
274
- // Feed Editor Table
275
- merchantInfoCache = [],
276
- merchantTemplateCache = [],
277
- tooltip = () => {
278
- // Tooltip only Text
279
- $('.wfmasterTooltip')
280
- .hover(function () {
281
- // Hover over code
282
- let self = $(this), title = self.attr('wftitle');
283
- self.data('tipText', title).removeAttr('wftitle');
284
- $('<p class="wftooltip"></p>').text(title).appendTo('body').fadeIn('slow');
285
- }, function () {
286
- // Hover out code
287
- let self = $(this);
288
- self.attr('wftitle', self.data('tipText'));
289
- $('.wftooltip').remove();
290
- })
291
- .mousemove(function (e) {
292
- $('.wftooltip').css({
293
- top: e.pageY + 10,
294
- left: e.pageX + 20
295
- });
296
- });
297
- },
298
- clip = () => {
299
- $copyBtn = $('.toClipboard');
300
- if (!ClipboardJS.isSupported() || /iPhone|iPad/i.test(navigator.userAgent)) {
301
- $copyBtn.find('img').hide(0);
302
- } else {
303
- $copyBtn.each(function() {
304
- $(this).on('mouseleave', clearTooltip).on('blur', clearTooltip);
305
- });
306
- clipboard = new ClipboardJS('.toClipboard');
307
- clipboard.on('error', function(event) {
308
- showTooltip(event.trigger, fallbackMessage(event.action));
309
- }).on('success', function(event) {
310
- showTooltip(event.trigger, 'Copied');
311
- });
312
- }
313
- };
314
-
315
- /**
316
- * Feed Generator Module
317
- */
318
- class feedGenerator {
319
-
320
- /**
321
- * Constructor
322
- * @constructor
323
- */
324
- constructor() {
325
- this._feed = opts.generator.feed; // wf_config+xxxx
326
- this._limit = opts.generator.limit;
327
- this._progress = 0;
328
- this._timer = null;
329
- this._color = false;
330
- // batch info
331
- this._total_batch = 0;
332
- this._current_batch = 0;
333
- this._product_ids = [];
334
- this._progress_per_batch = 0;
335
- this._refresh = true;
336
- // noinspection JSUnresolvedVariable
337
- this._regenerate = opts.generator.regenerate;
338
- window.isRegenerating = false;
339
- this._all_btn = $('.wpf_regenerate');
340
- this._current_btn = $(`#${this._feed.replace( 'wf_config', 'wf_feed_' )}`);
341
- this._current_btn_label = '';
342
- }
343
-
344
- /**
345
- * Init Hooks (Event)
346
- * @return {feedGenerator}
347
- */
348
- init() {
349
- let self = this;
350
- if ( '' !== this._feed && this._regenerate && false === window.isRegenerating ) {
351
- this.generate();
352
- }
353
-
354
- //thickbox body add feed plugin class to make it unique and custom style
355
- let current_page_query = window.location.search;
356
- let params = new URLSearchParams(current_page_query);
357
- let page_name = params.get("page");
358
- if( "webappick-manage-feeds" === page_name ) {
359
- $('body').addClass('woo-import-popup-body');
360
- }
361
-
362
- $(document).on('click', '.woo-feed-campaign-close-button', function(event) {
363
- event.preventDefault();
364
-
365
- $(this).parent('.woo-feed-promotion').hide();
366
- let condition = $(this).data('condition');
367
- if(1 === condition) {
368
- wpAjax.post( 'woo_feed_hide_promotion', {
369
- _ajax_nonce: opts.nonce,
370
- condition: condition,
371
- } ).then( response => {
372
- self._log( response );
373
- } ).fail( error => {
374
- self._log( error );
375
- self._updateProgressStatus( error.message );
376
- self._color = 'red';
377
- } );
378
- }
379
- });
380
- $(document).on('click', '.wpf_regenerate', function(event) {
381
- event.preventDefault();
382
- self._current_btn = $( this );
383
- if( self._current_btn.hasClass('disabled') || window.isRegenerating === true ) return;
384
- self._feed = self._current_btn.attr('id').replace( 'wf_feed_', 'wf_config' );
385
- if( '' !== self._feed ) {
386
- self.generate();
387
- }
388
  });
389
- return this;
390
- }
391
-
392
- _block_button() {
393
- if ( this._all_btn.length ) {
394
- this._all_btn.addClass('disabled');
395
- }
396
- if ( this._current_btn.length ) {
397
- this._current_btn.find('span').addClass('wpf_spin reverse_spin');
398
- this._current_btn_label = this._current_btn.attr('title');
399
- // noinspection JSUnresolvedVariable
400
- this._current_btn.attr( 'aria-label', opts.regenerate ).attr( 'title', opts.regenerate );
401
- }
402
- }
403
-
404
- _unblock_button() {
405
- if ( this._all_btn.length ) {
406
- this._all_btn.removeClass('disabled');
407
- }
408
- if ( this._current_btn.length ) {
409
- this._current_btn.find('span').removeClass('wpf_spin');
410
- this._current_btn.find('span').removeClass('reverse_spin');
411
- this._current_btn.attr( 'aria-label', this._current_btn_label ).attr( 'title', this._current_btn_label );
412
- }
413
- }
414
-
415
- /**
416
- * Generate Feed
417
- * @return void
418
- */
419
- generate() {
420
- let self = this;
421
- window.isRegenerating = true;
422
- this._block_button();
423
- this._resetProgressBar();
424
- this._progressBarActive();
425
- this._log( 'Counting Total Products' );
426
- this._updateProgressStatus( 'Fetching products.' );
427
- this._get_product_ids().then( response => {
428
- this._progress = 10;
429
- self._log( {response} );
430
- if(response.success) {
431
- self._log( `Total ${response.total} Products found.` );
432
- self._product_ids = response.product;
433
- self._total_batch = this._product_ids.length;
434
- self._current_batch = 0;
435
- self._progress_per_batch = ( 90 - this._progress ) / this._total_batch;
436
- self._process_batch();
437
- self._updateProgressStatus( 'Processing Products...' );
438
- } else {
439
- self._updateProgressStatus( response.data.message );
440
- }
441
- }).fail( error => {
442
- self._log( error );
443
- self._updateProgressStatus( error.message );
444
- self._color = 'red';
445
- setTimeout( function(){
446
- self._stopProgressBar();
447
- self._unblock_button();
448
- }, 1500 );
449
- } );
450
- }
451
-
452
- /**
453
- * Get Product Ids
454
- * @returns {$.promise}
455
- * @private
456
- */
457
- _get_product_ids() {
458
- this._progress = 5;
459
- return wpAjax.post( 'get_product_information', {
460
- _ajax_nonce: opts.nonce,
461
- feed: this._feed,
462
- limit: this._limit,
463
- } );
464
- }
465
-
466
- /**
467
- * Run the Batch
468
- * @private
469
- */
470
- _process_batch() {
471
- let self = this;
472
- let status = `Processing Batch ${this._current_batch+1} of ${this._total_batch}`;
473
- this._updateProgressStatus( status );
474
- this._log( status );
475
- wpAjax.post( 'make_batch_feed', {
476
- _ajax_nonce: opts.nonce,
477
- feed: this._feed,
478
- products: this._product_ids[this._current_batch],
479
- loop: this._current_batch,
480
- } ).then( response => {
481
- self._current_batch++;
482
- self._log( `Batch ${self._current_batch} Completed` );
483
- self._log( response );
484
- if ( self._current_batch < self._total_batch ) {
485
- self._process_batch();
486
- self._progress += self._progress_per_batch;
487
- }
488
- if ( self._current_batch === self._total_batch ) {
489
- self._save_feed_file();
490
- }
491
- } ).fail( error => {
492
- self._log( error );
493
- self._updateProgressStatus( error.message );
494
- self._color = 'red';
495
- setTimeout( function(){
496
- self._stopProgressBar();
497
- self._unblock_button();
498
- }, 1500 );
499
- } );
500
- }
501
-
502
- /**
503
- * Save Feed Data from temp to feed file
504
- * @private
505
- */
506
- _save_feed_file() {
507
- let self = this;
508
- this._log( 'Saving feed file' );
509
- this._updateProgressStatus( 'Saving feed file' );
510
- wpAjax.post( 'save_feed_file', {
511
- _ajax_nonce: opts.nonce,
512
- feed: this._feed,
513
- } ).then( response => {
514
- self._log( response );
515
- self._progress = 100;
516
- if ( self._refresh ) {
517
- window.location.href = `${opts.pages.list.feed}&link=${response.url}&cat=${response.cat}`;
518
- }
519
- setTimeout( function(){
520
- self._stopProgressBar();
521
- setTimeout( function(){
522
- self._resetProgressBar( true );
523
- self._unblock_button();
524
- }, 3000 );
525
- }, 2500 );
526
- } ).fail( error => {
527
- self._log( error );
528
- self._updateProgressStatus( error.message );
529
- self._color = 'red';
530
- setTimeout( function(){
531
- self._stopProgressBar();
532
- self._unblock_button();
533
- }, 1500 );
534
- } );
535
- }
536
-
537
- /**
538
- * Console log wrapper with debug settings.
539
- * @param data
540
- * @returns {feedGenerator}
541
- * @private
542
- */
543
- _log( data ) {
544
- // noinspection JSUnresolvedVariable
545
- if ( opts.wpf_debug ) {
546
- console.log( data );
547
- }
548
- return this;
549
- }
550
-
551
- /**
552
- * Run the progressbar refresh interval
553
- * @param {int} refreshInterval
554
- * @returns {feedGenerator}
555
- * @private
556
- */
557
- _progressBarActive( refreshInterval = 0 ) {
558
- let self = this;
559
- this._toggleProgressBar( true );
560
- this._timer = setInterval( function(){
561
- self._updateProgressBar();
562
- }, refreshInterval || 1000 );
563
- return this;
564
- }
565
-
566
- /**
567
- * Stop Progressbar
568
- * @returns {feedGenerator}
569
- * @private
570
- */
571
- _stopProgressBar() {
572
- clearInterval( this._timer );
573
- return this;
574
- }
575
-
576
- /**
577
- * Reset Progressbar
578
- * @returns {feedGenerator}
579
- * @private
580
- */
581
- _resetProgressBar( update ) {
582
- this._toggleProgressBar( false );
583
- this._updateProgressStatus( '' );
584
- clearInterval( this._timer );
585
- this._color = false;
586
- this._timer = null;
587
- this._progress = 0;
588
- if ( update ) {
589
- this._updateProgressBar();
590
- }
591
- return this;
592
- }
593
-
594
- /**
595
- * Show hide the progress bar el
596
- * @param status
597
- * @returns {feedGenerator}
598
- * @private
599
- */
600
- _toggleProgressBar( status ) {
601
- let table = $('#feed_progress_table');
602
- if ( status ) {
603
- table.show();
604
- } else {
605
- table.hide();
606
- }
607
- return this;
608
- }
609
-
610
- /**
611
- * Update Progress bar text status
612
- * @param {string} status
613
- * @returns {feedGenerator}
614
- * @private
615
- */
616
- _updateProgressStatus( status ) {
617
- $( '.feed-progress-status' ).text( status );
618
- return this;
619
- }
620
-
621
- /**
622
- * Update Progress Data
623
- * hooked with setInterval
624
- * @private
625
- */
626
- _updateProgressBar() {
627
- let percentage = $( '.feed-progress-percentage' ),
628
- bar = $( '.feed-progress-bar-fill' ),
629
- _progress = `${Math.round( this._progress )}%`;
630
- bar.css( {
631
- width: _progress,
632
- } );
633
- percentage.text( _progress );
634
- }
635
- }
636
- // expose to the global scope
637
- window.wf = {
638
- helper: helper,
639
- feedEditor: feedEditor,
640
- generator: feedGenerator,
641
- };
642
- $(window).on('load', function() {
643
- // Template loading ui conflict
644
- if ($(location).attr("href").match(/webappick.*feed/g) !== null) {
645
- $('#wpbody-content').addClass('woofeed-body-content');
646
  }
647
 
648
- // on edit page show item wrapper dropdown
649
- let current_page_url_query = window.location.search;
650
- let urlParams = new URLSearchParams(current_page_url_query);
651
- let page_action = urlParams.get('action');
652
-
653
- // ClipBoardJS
654
- clip();
655
- // postbox toggle
656
- postboxes.add_postbox_toggles(pagenow);
657
- // initialize generator
658
- let generator = new feedGenerator();
659
- generator.init();
660
- // noinspection JSUnresolvedVariable
661
- if( '' !== opts.generator.feed && opts.generator.regenerate ) {
662
-
663
- }
664
- // initialize editor
665
- feedEditor.init();
666
- helper.common(); // Generate Feed Add Table Row
667
- tooltip();
668
- // validate feed editor
669
- $(".generateFeed").validate();
670
- // document events
671
- $(document)
672
- .on('click', '[data-toggle_slide]', function(e) {
673
- e.preventDefault();
674
- $($(this).data('toggle_slide')).slideToggle('fast');
675
- })
676
- // XML Feed Wrapper
677
- .on('click', '#wf_newRow', function () {
678
- let tbody = $('#table-1 tbody'),
679
- template = $('#feed_config_template').text().trim().replace(/__idx__/g, tbody.find('tr').length);
680
- tbody.append(template);
681
- helper.fancySelect($('.outputType'));
682
- })
683
- // feed delete alert.
684
- .on('click', '.single-feed-delete', function (event) {
685
- event.preventDefault();
686
- // noinspection JSUnresolvedVariable
687
- if (confirm(opts.form.del_confirm)) {
688
- window.location.href = $(this).attr('val');
689
- }
690
- })
691
- // clear cache data.
692
- .on('click', '.wf_clean_cache_wrapper', function(event) {
693
- event.preventDefault();
694
- var nonce = $('.woo-feed-clean-cache-nonce').val();
695
- var loader = $('.woo-feed-cache-loader');
696
-
697
- //show loader
698
- loader.show();
699
-
700
- // passed cache nonce
701
- wpAjax.post('clear_cache_data', {
702
- _ajax_clean_nonce: nonce
703
- }).then(function (response) {
704
  if( response.success ) {
705
- loader.hide(); //hide loader
706
- location.reload();
707
- }
708
- }).fail(function (e) {
709
- console.log('something wrong');
710
- });
711
-
712
- })// Copy Status
713
- .on('click', '#woo-feed-copy-status-btn', function(event) {
714
- event.preventDefault();
715
- let button = $('#woo-feed-copy-status-btn');
716
- let status_area = $('#woo-feed-status-area');
717
- button.val('Copied');
718
- status_area.css('visibility','visible');
719
- status_area.select();
720
-
721
- document.execCommand('copy');
722
- })
723
- // feed value dropdown change.
724
- .on('change', '.wf_attr.wf_attributes', function(event) {
725
- event.preventDefault();
726
-
727
- $('.fancy-picker-picked').trigger("click"); // trigger fancy select box clicked
728
-
729
- // price attributes
730
- var price_attributes = ['price', 'current_price', 'sale_price', 'price_with_tax', 'current_price_with_tax', 'sale_price_with_tax', 'shipping_cost'];
731
- // current value
732
- var current_attribute_value = $(this).val();
733
- var outputSelect = $(this).parents('tr').find('.outputType');
734
- var fancyOption = $(this).parents('tr').find('.fancy-picker-content .fancy-picker-option');
735
- var fancyDataPicker = $(this).parents('tr').find('.fancy-picker-data span');
736
- var selectIf, selectKey;
737
-
738
- // when any attribute is selected, pick the key
739
- if( price_attributes.includes(current_attribute_value) ) {
740
- // when select any price attribute
741
- selectIf = 'for_price';
742
- selectKey = "Price";
743
- } else if ( "" !== current_attribute_value && -1 !== current_attribute_value.indexOf('wf_taxo') ) {
744
-
745
- // when select any custom taxonomy
746
- selectIf = 'for_custom_taxo';
747
- selectKey = "parent_if_empty";
748
- } else {
749
-
750
- selectIf = 'for_all';
751
- selectKey = 'Default';
752
- }
753
-
754
- // remove selected class from old selected option
755
- fancyOption.removeClass('selected');
756
-
757
- // when value dropdown is selected as price or any custom taxonomy
758
- if( selectIf === 'for_custom_taxo' || selectIf === 'for_price' ) {
759
-
760
- // update "Option Type" when select key matches
761
- fancyOption.each(function(item) {
762
- if( selectKey === $(this).text() ) {
763
- $(this).addClass('selected');
764
- fancyDataPicker.text(selectKey);
765
- outputSelect.find("option").text(selectKey);
766
- outputSelect.find("option").val( $(this).data('value') );
767
- }
768
- });
769
- } else {
770
-
771
- // update "Option Type" when select key matches
772
- // fancyOption.each(function(item) {
773
- // if( "parent_if_empty" !== $(this).text() && "for_all" === selectIf ) {
774
- // $(this).addClass('selected');
775
- // fancyDataPicker.text(selectKey);
776
- // outputSelect.find("option").text(selectKey);
777
- // outputSelect.find("option").val( $(this).data('value') );
778
- // }
779
- // });
780
- }
781
-
782
- })
783
- // bulk delete alert.
784
- .on('click', '#doaction, #doaction2', function () {
785
- // noinspection JSUnresolvedVariable
786
- return confirm(opts.form.del_confirm_multi);
787
- })
788
- // Generate Feed Table Row Delete
789
- .on('change', '.dType', function () {
790
- let self = $(this),
791
- type = self.val(),
792
- row = self.closest('tr');
793
-
794
- if (type === 'pattern') {
795
- row.find('.value_attribute').hide();
796
- row.find('.value_pattern').show();
797
- } else if (type === 'attribute') {
798
- row.find('.value_attribute').show();
799
- row.find('.value_pattern').hide();
800
- } else if (type === 'remove') {
801
- row.find('.value_attribute').hide();
802
- row.find('.value_pattern').hide();
803
- }
804
- })
805
- // Generate Feed Form Submit
806
- .on('click', '.delRow', function (e) {
807
- e.preventDefault();
808
- $(this).closest('tr').remove();
809
- helper.reindex_config_table();
810
- })
811
- .on('submit', '#generateFeed', function () {
812
- // Feed Generating form validation
813
- $(this).validate();
814
-
815
- if ($(this).valid()) {
816
- $(".makeFeedResponse")
817
- .show()
818
- .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
819
- }
820
- })
821
- // Generate Update Feed Form Submit
822
- .on('submit', '#updatefeed', function (e, data) {
823
- // Feed Generating form validation
824
- $(this).validate();
825
-
826
- if ($(this).valid()) {
827
- $(".makeFeedResponse")
828
- .show()
829
- .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
830
- }
831
- })
832
- .on( 'ready woo_feed_config_loaded', function(){
833
- console.log("Ready Provided");
834
- if( $('#ftpenabled').val() === 0 ){
835
- $('.google-merchant-message').hide('slow');
836
- $('.woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) input, .woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) select').attr('disabled','disabled');
837
- } else {
838
- if( $('#provider').val() === 'google' ) {
839
- $('.google-merchant-message').show('slow');
840
- } else {
841
- $('.google-merchant-message').hide('slow');
842
- }
843
- $('.woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) input, .woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) select').removeAttr('disabled');
844
- }
845
-
846
- $('#ftpenabled').on('change', function(){
847
- if( $('#ftpenabled').val() === 0 ){
848
- $('.google-merchant-message').hide('slow');
849
- $('.woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) input, .woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) select').attr('disabled','disabled');
850
  } else {
851
-
852
- $('.woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) input, .woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) select').removeAttr('disabled');
853
-
854
- // Google merchant specific message
855
- if( $('#provider').val() === 'google' ){
856
- $('.google-merchant-message').show('slow');
857
- } else {
858
- $('.google-merchant-message').hide('slow');
859
- }
860
-
861
  }
862
- });
863
- })
864
- .on('change', '.ftporsftp', function () {
865
- let server = $(this).val(),
866
- status = $('.ssh2_status');
867
-
868
- if (server === 'sftp') {
869
- // noinspection JSUnresolvedVariable
870
- status.show().css('color', 'dodgerblue').text(opts.form.sftp_checking);
871
- wpAjax.post('get_ssh2_status', {
872
- _ajax_nonce: opts.nonce,
873
- server: server
874
- }).then(function (response) {
875
- if (response === 'exists') {
876
- // noinspection JSUnresolvedVariable
877
- status.css('color', '#2CC185').text(opts.form.sftp_available);
878
- setTimeout(function () {
879
- status.hide();
880
- }, 1500);
881
- } else {
882
- // noinspection JSUnresolvedVariable
883
- status.show().css('color', 'red').text(opts.form.sftp_warning);
884
- }
885
- }).fail(function (e) {
886
- status.hide();
887
- helper.ajax_fail(e);
888
- });
889
- } else {
890
- status.hide();
891
  }
892
- })
893
- .on('click', '[name="save_feed_config"]', function (e) {
894
- e.preventDefault();
895
- $('#updatefeed').trigger('submit', {
896
- save: true
897
- });
898
- })
899
- .on('change', '#provider', function (event) {
900
- event.preventDefault();
901
- //if (!$(this).closest('.generateFeed').hasClass('add-new')) return; // only for new feed.
902
-
903
- let merchant = $(this).val(),
904
- templateName = $(this).find(':selected').text(),
905
- name = $('#filename').val(),
906
- feedType = $("#feedType"),
907
- feedForm = $("#providerPage"),
908
- merchantInfo = $('#feed_merchant_info'); // set loading..
909
-
910
- // noinspection JSUnresolvedVariable
911
- feedForm.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
912
-
913
- merchantInfo.find('.spinner').addClass('is-active');
914
- feedType.disabled(!0); // disable dropdown
915
-
916
- feedType.parent().find('.spinner').addClass('is-active');
917
- merchantInfo.find('.merchant-info-section .data').html(''); // remove previous data
918
- // Get Merchant info for selected Provider/Merchant
919
-
920
- if (merchantInfoCache.hasOwnProperty(merchant)) {
921
- feedEditor.renderMerchantInfo(merchantInfo, feedType, merchantInfoCache[merchant]);
922
-
923
- /**
924
- * Triggers after merchant configuration is fetched & loaded
925
- * */
926
- $(document).trigger('woo_feed_config_loaded');
927
-
928
- } else {
929
- wpAjax.send('woo_feed_get_merchant_info', {
930
- type: 'GET',
931
- data: {
932
- nonce: opts.nonce,
933
- provider: merchant,
934
- templateName: templateName
935
- }
936
- }).then(function (r) {
937
- merchantInfoCache[merchant] = r;
938
- feedEditor.renderMerchantInfo(merchantInfo, feedType, r);
939
- // console.log('filter load')
940
- // $('#utm_source').val(templateName)
941
- }).then(function(){
942
-
943
- /**
944
- * Triggers after merchant configuration is fetched & loaded
945
- * */
946
- $(document).trigger('woo_feed_config_loaded');
947
-
948
- }).fail(helper.ajax_fail);
949
- } // Get FeedForm For Selected Provider/Merchant
950
-
951
-
952
- if (merchantTemplateCache.hasOwnProperty(merchant)) {
953
- feedEditor.renderMerchantTemplate(feedForm, merchantTemplateCache[merchant]);
954
-
955
- /**
956
- * Triggers after merchant configuration is fetched & loaded
957
- * */
958
- $(document).trigger('woo_feed_config_loaded');
959
-
960
- } else {
961
- wpAjax.post('get_feed_merchant', {
962
- _ajax_nonce: opts.nonce,
963
- merchant: merchant
964
- }).then(function (r) {
965
- merchantTemplateCache[merchant] = r;
966
- feedEditor.renderMerchantTemplate(feedForm, r);
967
- $('#utm_source').val(templateName);
968
- $('#utm_campaign').val(name);
969
- //when merchant is bing, change delimiter and enclosure
970
- if( 'bing' === merchant ) {
971
- //delimiter value
972
- $("#delimiter option").removeAttr('selected');
973
- $("#delimiter option[value=\"tab\"]").attr('selected', 'selected');
974
-
975
- //enclosure value
976
- $("#enclosure option").removeAttr('selected');
977
- $("#enclosure option[value=\" \"]").attr('selected', 'selected');
978
- }
979
-
980
- //reviewer options hide
981
- if( 'google_product_review' !== merchant) {
982
- $('.wf_attributes option[value="reviewer_name"]').hide();
983
- }
984
- }).then(function(){
985
-
986
- /**
987
- * Triggers after merchant configuration is fetched & loaded
988
- * */
989
- $(document).trigger('woo_feed_config_loaded');
990
-
991
- }).fail(helper.ajax_fail);
992
- }
993
- })
994
- // Feed Active and Inactive status change via ajax
995
- .on('change', '.woo_feed_status_input', function () {
996
- let self = $(this);
997
- wpAjax.post('update_feed_status', {
998
- _ajax_nonce: opts.nonce,
999
- feedName: self.val(),
1000
- status: self[0].checked ? 1 : 0
1001
- });
1002
  });
1003
- // event with trigger
1004
- $(document)
1005
- .on('change', '[name="is_outOfStock"], [name="product_visibility"]', function () {
1006
- let outOfStockVisibilityRow = $('.out-of-stock-visibility');
1007
- if ($('[name="is_outOfStock"]:checked').val() === 'n' && $('[name="product_visibility"]:checked').val() === '1') {
1008
- outOfStockVisibilityRow.show();
1009
- } else {
1010
- outOfStockVisibilityRow.hide();
1011
- }
1012
- })
1013
- .on('change', '.attr_type', function () {
1014
- // Attribute type selection
1015
- let self = $(this),
1016
- type = self.val(),
1017
- row = self.closest('tr');
1018
-
1019
- if (type === 'pattern') {
1020
- row.find('.wf_attr').hide();
1021
- row.find('.wf_attr').val('');
1022
- row.find('.wf_default').show();
1023
- } else {
1024
- row.find('.wf_attr').show();
1025
- row.find('.wf_default').hide();
1026
- row.find('.wf_default').val('');
1027
- }
1028
- })
1029
- .on('change', '.wf_mattributes, .attr_type', function () {
1030
- let row = $(this).closest('tr'),
1031
- attribute = row.find('.wf_mattributes'),
1032
- type = row.find('.attr_type'),
1033
- valueColumn = row.find('td:eq(4)'),
1034
- provider = $('#provider').val();
1035
-
1036
- // noinspection JSUnresolvedVariable
1037
- if (opts.form.google_category.hasOwnProperty(attribute.val()) && type.val() === 'pattern' && helper.in_array(provider, opts.form.google_category[attribute.val()])) {
1038
- if (valueColumn.find('select.selectize').length === 0) {
1039
- valueColumn.find('input.wf_default').remove();
1040
- valueColumn.append('<span class="wf_default wf_attributes"><select name="default[]" class="selectize"></select></span>');
1041
- // noinspection JSUnresolvedVariable
1042
- valueColumn.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>`);
1043
-
1044
- if (!googleCategories) {
1045
- valueColumn.append('<span class="spinner is-active" style="margin: 0;"></span>');
1046
- }
1047
-
1048
- let select = valueColumn.find('.wf_attributes select');
1049
- // noinspection JSUnresolvedVariable
1050
- helper.selectize(select, {
1051
- preload: true,
1052
- placeholder: opts.form.select_category,
1053
- load: function load(query, cb) {
1054
- if (!googleCategories) {
1055
- wpAjax.send('get_google_categories', {
1056
- type: 'GET',
1057
- data: {
1058
- _ajax_nonce: opts.nonce,
1059
- action: "get_google_categories",
1060
- provider: provider
1061
- }
1062
- }).then(function (r) {
1063
- googleCategories = r;
1064
- cb(googleCategories);
1065
- valueColumn.find('.spinner').remove();
1066
- }).fail(helper.ajax_fail);
1067
- } else {
1068
- cb(googleCategories);
1069
- }
1070
- }
1071
- });
1072
- }
1073
- } else {
1074
- if (attribute.val() !== 'current_category' && valueColumn.find('input.wf_default').length === 0) {
1075
- valueColumn.find('span').remove();
1076
- valueColumn.append('<input autocomplete="off" class="wf_default wf_attributes" type="text" name="default[]" value="">');
1077
-
1078
- if (type.val() !== 'pattern') {
1079
- valueColumn.find('input.wf_default').hide();
1080
- }
1081
- }
1082
- }
1083
- })
1084
- .on('change', '#feedType,#provider', function (e) {
1085
- let type = $('#feedType').val(),
1086
- provider = $('#provider').val(),
1087
- itemWrapper = $('.itemWrapper'),
1088
- wf_csv_txt = $('.wf_csvtxt');
1089
-
1090
- // noinspection JSUnresolvedVariable
1091
- if (type !== '' && helper.in_array(provider, opts.form.item_wrapper_hidden)) {
1092
- itemWrapper.hide();
1093
- }
1094
 
1095
- //when feed type is changed
1096
- if( 'feedType' === e.target.id ) {
1097
- if (type === 'csv' || type === 'txt' || type === 'tsv') {
1098
- itemWrapper.hide();
1099
- wf_csv_txt.show();
1100
-
1101
- if( 'tsv' === type ) {
1102
- $('#delimiter option:last').prop("selected", "selected");
1103
- } else if( 'csv' === type ) {
1104
- $('#delimiter option:first').prop("selected", "selected");
1105
- }
1106
- } else if( type === 'xml' ) {
1107
- itemWrapper.show();
1108
- wf_csv_txt.hide();
1109
- }
1110
- }
1111
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1112
  })
1113
- .trigger('change');
1114
 
1115
-
1116
- // product Attribute class
1117
- class WooFeedCustomFields {
1118
-
1119
- constructor( field, status, isTaxonomy ) {
1120
- this.productCustomFields( field, status, isTaxonomy );
1121
- }
1122
-
1123
- cacheClear() {
1124
- let data = {
1125
- action: 'woo_feed_product_attribute_cache_remove',
1126
- nonce: wpf_ajax_obj.ajax.nonce,
1127
- };
1128
- $.ajax({
1129
- method: 'POST',
1130
- url: wpf_ajax_obj.wpf_ajax_url,
1131
- data
1132
- });
1133
- }
1134
-
1135
- productCustomFields( field, status = false, isTaxonomy ) {
1136
- let data = {
1137
- action: 'woo_feed_custom_fields_status_change',
1138
- nonce: wpf_ajax_obj.ajax.nonce,
1139
- field,
1140
- status,
1141
- isTaxonomy
1142
- };
1143
- $.ajax({
1144
- method: 'POST',
1145
- url: wpf_ajax_obj.wpf_ajax_url,
1146
- data,
1147
- success: ( response ) => {
1148
- if( response.success ) {
1149
- this.cacheClear();
1150
- } else {
1151
- console.log( response );
1152
- }
1153
  }
1154
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1155
  }
1156
- }
1157
-
1158
- $(document).on('click', '.woofeed-custom-fields [id*="-switcher"]', function () {
1159
- let field = $(this).attr( 'id' ).split( '-' )[0],
1160
- isTaxonomy = $(this).data( 'taxonomy' ),
1161
- status = $(this).prop( 'checked' );
1162
- new WooFeedCustomFields( field, status, isTaxonomy );
1163
- });
1164
-
1165
- // Remove sticky cart on feature page
1166
- $(document).ready(function() {
1167
- var s = $(".wapk-feed-buy-now-container");
1168
- var pos = s.position();
1169
- $(window).scroll(function() {
1170
- var windowpos = $(window).scrollTop();
1171
- if ( windowpos <= 5000 ) {
1172
- s.addClass("fixed");
1173
- } else {
1174
- s.removeClass("fixed");
1175
  }
1176
- });
1177
- });
1178
- });
1179
-
1180
- $(document).on('click', '#woo-feed-debug-log-download', function (e) {
1181
- e.preventDefault();
1182
- $("<a />", {
1183
- download: new Date() + ".log",
1184
- href: URL.createObjectURL(
1185
- new Blob([$("#woo-feed-debug-log").val()], {
1186
- type: "text/plain"
1187
- })),
1188
- }).appendTo("body")[0].click();
1189
- });
1190
-
1191
- $(document).on('keyup', '#filename', function(e) {
1192
- var name = $('#filename').val();
1193
- $('#utm_campaign').val(name);
1194
- });
1195
- // var providerVal = $('#category-mapping-form #providers').val();
1196
- // console.log(providerVal)
1197
- $(document).on('change', '#category-mapping-form #providers', function(e) {
1198
- var provider = $(this).find(':selected').val(),
1199
- googleMap = ['google', 'facebook', 'pinterest', 'bing', 'bing_local_inventory', 'snapchat'];
1200
- if( googleMap.indexOf(provider) !== -1 ) {
1201
- $('input[id*="cat_mapping_"]').css('display', 'none');
1202
- $('.wf_default.wf_attributes').css('display', 'block').css('width', '100%');
1203
- // $('#category-mapping-form .dashicons').css('display', 'block');
1204
- } else {
1205
- $('input[id*="cat_mapping_"]').css('display', 'block');
1206
- $('.wf_default.wf_attributes').css('display', 'none').css('width', '100%');
1207
- // $('#category-mapping-form .dashicons').css('display', 'none');
1208
- }
1209
- });
1210
-
1211
- $(document).on('click', 'span[id*="cat-map-"]', function(e) {
1212
- e.preventDefault();
1213
- var providerName = $('#category-mapping-form #providers').val(),
1214
- googleMap = ['google', 'facebook', 'pinterest', 'bing', 'bing_local_inventory', 'snapchat'],
1215
- catId = $(this).attr('id').replace(/[^\d.]/g, ''),
1216
- groupId = 'group-child-' + catId;
1217
 
1218
- if( googleMap.indexOf(providerName) !== -1) {
1219
- var catField = $(this).parents('tr').find('.selectized').val();
1220
-
1221
- if (catField) {
1222
- $('.' + groupId).parents('tr').find('select').each(function (i, v) {
1223
- $(v).data('selectize').setValue(catField);
1224
- });
1225
  }
1226
 
1227
- } else {
1228
- var value = $('#cat_mapping_'+catId).val();
1229
- $('.'+groupId).parents('tr').find('input').val(value);
1230
- }
1231
-
1232
- });
1233
 
1234
  })(jQuery, window, document, wp.ajax, wpf_ajax_obj);
9
  /* global ajaxurl, wpAjax, postboxes, pagenow, alert, deleteUserSetting, typenow, adminpage, thousandsSeparator, decimalPoint, isRtl */
10
  // noinspection JSUnresolvedVariable
11
  (function($, window, document, wpAjax, opts) {
12
+ "use strict";
13
+ /**
14
+ * All of the code for your admin-facing JavaScript source
15
+ * should reside in this file.
16
+ *
17
+ * Note: It has been assumed you will write jQuery code here, so the
18
+ * $ function reference has been prepared for usage within the scope
19
+ * of this function.
20
+ *
21
+ * This enables you to define handlers, for when the DOM is ready:
22
+ */
23
+
24
+ /**
25
+ * disable element utility
26
+ *
27
+ * @since 3.1.9
28
+ *
29
+ * @param {*} status
30
+ * @returns {jQuery|HTMLElement}
31
+ */
32
+ $.fn.disabled = function(status) {
33
+ $(this).each(function() {
34
+ let self = $(this),
35
+ prop = 'disabled';
36
+
37
+ if (typeof self.prop(prop) !== 'undefined') {
38
+ self.prop(prop, status === void 0 || status === true);
39
+ } else {
40
+ !0 === status ? self.addClass(prop) : self.removeClass(prop);
41
+ }
42
+ });
43
+ return self; // method chaining
44
+ };
45
+
46
+ /**
47
+ * Check if a HTMLElement or jQuery is disabled
48
+ */
49
+ $.fn.isDisabled = function() {
50
+ let self = $(this),
51
+ prop = 'disabled';
52
+ return typeof self.prop(prop) !== 'undefined' ? self.prop(prop) : self.hasClass(prop);
53
+ };
54
+
55
+ /**
56
+ * Clear Tooltip for clip board js
57
+ * @param {Object} event
58
+ */
59
+ const clearTooltip = (event) => {
60
+ $(event.currentTarget).removeClass( (index, className) => (className.match(/\btooltipped-\S+/g) || []).join(' ') ).removeClass('tooltipped').removeAttr('aria-label');
61
+ };
62
+
63
+ const showTooltip = (elem, msg) => {
64
+ $(elem).addClass('tooltipped tooltipped-s').attr('aria-label', msg);
65
+ };
66
+
67
+ const fallbackMessage = (action) =>{
68
+ let actionMsg,
69
+ actionKey = action === 'cut' ? 'X' : 'C';
70
+
71
+ if (/iPhone|iPad/i.test(navigator.userAgent)) {
72
+ actionMsg = 'No support :(';
73
+ } else if (/Mac/i.test(navigator.userAgent)) {
74
+ actionMsg = 'Press ⌘-' + actionKey + ' to ' + action;
75
+ } else {
76
+ actionMsg = 'Press Ctrl-' + actionKey + ' to ' + action;
77
+ }
78
+
79
+ return actionMsg;
80
+ };
81
+
82
+ /**
83
+ * Alias of jQuery.extend()
84
+ * @param {Object} _default
85
+ * @param {Object} _args
86
+ */
87
+ const extend = (_default, _args) => $.extend(true, {}, _default, _args);
88
+
89
+ /*
90
+ * Handles product attributes
91
+ *
92
+ * @since 4.4.18
93
+ * */
94
+ class WooFeedCustomFields {
95
+
96
+ constructor( field, status, isTaxonomy ) {
97
+ this.productCustomFields( field, status, isTaxonomy );
98
  }
99
 
100
+ cacheClear() {
101
+ let data = {
102
+ action: 'woo_feed_product_attribute_cache_remove',
103
+ nonce: wpf_ajax_obj.ajax.nonce,
104
+ };
105
+ $.ajax({
106
+ method: 'POST',
107
+ url: wpf_ajax_obj.wpf_ajax_url,
108
+ data
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
  }
111
 
112
+ productCustomFields( field, status = false, isTaxonomy ) {
113
+ let data = {
114
+ action: 'woo_feed_custom_fields_status_change',
115
+ nonce: wpf_ajax_obj.ajax.nonce,
116
+ field,
117
+ status,
118
+ isTaxonomy
119
+ };
120
+ $.ajax({
121
+ method: 'POST',
122
+ url: wpf_ajax_obj.wpf_ajax_url,
123
+ data,
124
+ success: ( response ) => {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  if( response.success ) {
126
+ this.cacheClear();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
  } else {
128
+ console.log( response );
 
 
 
 
 
 
 
 
 
129
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
  });
132
+ }
133
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
 
135
+ let $copyBtn,
136
+ clipboard,
137
+ googleCategories,
138
+ helper = {
139
+ in_array: (needle, haystack) => {
140
+ try {
141
+ return haystack.indexOf(needle) !== -1;
142
+ } catch (e) {
143
+ return false;
144
+ }
145
+ },
146
+ selectize_render_item: (data, escape) => `<div class="item wapk-selectize-item">${escape(data.value + ' ' + data.text)}</div>`, // phpcs:ignore WordPressVIPMinimum.JS.StringConcat.Found,
147
+ ajax_fail: e => {
148
+ console.warn(e);
149
+ alert(e.hasOwnProperty('statusText') && e.hasOwnProperty('status') ? opts.ajax.error + '\n' + e.statusText + ' (' + e.status + ')' : e);
150
+ },
151
+ /**
152
+ * Initialize Sortable
153
+ * @param {jQuery|HTMLElement} el
154
+ * @param {object} config
155
+ * @param {int|boolean} column
156
+ * @param {function} onDrop
157
+ * @return {jQuery|HTMLElement}
158
+ */
159
+ sortable: (el, config, column, onDrop) => {
160
+ return (el || $('.sorted_table')).each(function() {
161
+ let self = $(this),
162
+ column_count = self.find('tbody > tr:eq(0) > td').length || column || 9;
163
+ self.wf_sortable(extend({
164
+ containerSelector: 'table',
165
+ itemPath: '> tbody',
166
+ itemSelector: 'tr',
167
+ handle: 'i.wf_sortedtable',
168
+ placeholder: `<tr class="placeholder"><td colspan="${column_count}"></td></tr>`,
169
+ onDrop: ($item, container, _super, event) => {
170
+ $item.removeClass(container.group.options.draggedClass).removeAttr('style');
171
+ $("body").removeClass(container.group.options.bodyClass);
172
+ if ( onDrop && 'function' === typeof( onDrop ) ) {
173
+ onDrop( $item, container, _super, event );
174
+ }
175
+ },
176
+ }, config));
177
+ });
178
+ },
179
+ selectize: (el, config) => {
180
+ return (el || $('select.selectize')).not('.selectized').each(function() {
181
+ let self = $(this);
182
+ self.selectize(extend({
183
+ create: self.data('create') || false,
184
+ plugins: self.data('plugins') ? self.data('plugins').split(',').map(function(s) {
185
+ return s.trim();
186
+ }) : [],
187
+ //['remove_button'],
188
+ render: {
189
+ item: helper.selectize_render_item
190
+ }
191
+ }, config));
192
+ });
193
+ },
194
+ fancySelect: (el, config) => {
195
+ return (el || $('select.fancySelect')).not('.FancySelectInit').each(function() {
196
+ let self = $(this);
197
+ self.fancySelect(extend({
198
+ maxItemShow: 3
199
+ }, config));
200
+ });
201
+ },
202
+ reindex_config_table: () => {
203
+ $('#table-1').find('tbody tr').each( ( x, el ) => {
204
+ $(el).find('[name]').each( ( x1, el ) => {
205
+ $(el).attr('name', $(el).attr('name').replace(/(\[\d\])/g, `[${x}]`));
206
+ } );
207
+ } );
208
+ },
209
+ common: () => {
210
+ helper.sortable( $('.sorted_table'), {}, 9, helper.reindex_config_table );
211
+ helper.selectize();
212
+ helper.fancySelect($('.outputType'));
213
+ }
214
+ },
215
+ // helper functions
216
+ feedEditor = {
217
+ /**
218
+ * The Editor Form Elem.
219
+ * @type {jQuery|HTMLElement}
220
+ */
221
+ form: null,
222
+
223
+ /**
224
+ * Initialize The Feed Editor {Tabs...}
225
+ * @returns {void}
226
+ */
227
+ init: function () {
228
+ let self = this;
229
+ self.form = $('.generateFeed');
230
+ if (!self.form.length) return;
231
+ helper.common();
232
+ // noinspection JSUnresolvedVariable
233
+ $(document).trigger(new jQuery.Event('feedEditor.init', {
234
+ target: this.form
235
+ }));
236
+ },
237
+
238
+ /**
239
+ * Render Merchant info ajax response and handle allowed feed type for selected merchant
240
+ * @param {jQuery|HTMLElement} merchantInfo jQuery dom object
241
+ * @param {jQuery|HTMLElement} feedType jQuery dom object
242
+ * @param {Object} r ajax response object
243
+ */
244
+ renderMerchantInfo: function (merchantInfo, feedType, r) {
245
+ for (let k in r) {
246
+ if (r.hasOwnProperty(k)) {
247
+ merchantInfo.find('.merchant-info-section.' + k + ' .data').html(r[k]); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html
248
+
249
+ if ('feed_file_type' === k) {
250
+ (function() {
251
+ let types = r[k].split(",").map(function(t) {
252
+ return t.trim().toLowerCase();
253
+ }).filter(function(t) {
254
+ // noinspection JSUnresolvedVariable
255
+ return t !== '' && t !== opts.na.toLowerCase();
256
+ });
257
+
258
+ if (types.length) {
259
+ feedType.find('option').removeAttr('selected').each(function() {
260
+ let opt = $(this);
261
+ opt.val() && !helper.in_array(opt.val(), types) ? opt.disabled(!0) : opt.disabled(!1);
262
+ });
263
+ if (types.length === 1) feedType.find('option[value="' + types[0] + '"]').attr('selected', 'selected');
264
+ } else feedType.find('option').disabled(!1);
265
+ })();
266
+ }
267
+ }
268
+ }
269
+
270
+ merchantInfo.find('.spinner').removeClass('is-active');
271
+ feedType.disabled(!1);
272
+ feedType.trigger('change');
273
+
274
+ /**
275
+ * Triggers after merchant configuration is fetched & loaded
276
+ * */
277
+ $(document).trigger('woo_feed_config_loaded');
278
+
279
+ feedType.parent().find('.spinner').removeClass('is-active');
280
+ },
281
+
282
+ /**
283
+ * Render Feed Template Tabs and settings while creating new feed.
284
+ * @param {jQuery|HTMLElement} feedForm feed from query dom object
285
+ * @param {object} r merchant template ajax response object
286
+ */
287
+ renderMerchantTemplate: function (feedForm, r) {
288
+ let _loop = function _loop(k) {
289
+ if (r.hasOwnProperty(k)) {
290
+ if ('tabs' === k) {
291
+ // noinspection JSUnresolvedFunction
292
+ feedForm.html(r[k]); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html
293
+ } else {
294
+ let contentSettings = $('[name="' + k + '"]');
295
+
296
+ if (contentSettings.length) {
297
+ contentSettings.each(function() {
298
+ let elem = $(this);
299
+
300
+ if (elem.is('select')) {
301
+ elem.find('[value="' + r[k] + '"]').prop('selected', true);
302
+ } else if ((elem.is('[type=checkbox]') || elem.is('[type=radio]')) && elem.val() === r[k]) {
303
+ elem.prop('checked', true);
304
+ } else {
305
+ elem.val(r[k]); // type=text
306
+ }
307
+ }).trigger('change');
308
+ }
309
+ }
310
+ }
311
+ };
312
+
313
+ for (let k in r) {
314
+ _loop(k);
315
+ }
316
+
317
+ feedEditor.init();
318
+ }
319
+ },
320
+ // Feed Editor Table
321
+ merchantInfoCache = [],
322
+ merchantTemplateCache = [],
323
+ tooltip = () => {
324
+ // Tooltip only Text
325
+ $('.wfmasterTooltip')
326
+ .hover(function () {
327
+ // Hover over code
328
+ let self = $(this), title = self.attr('wftitle');
329
+ self.data('tipText', title).removeAttr('wftitle');
330
+ $('<p class="wftooltip"></p>').text(title).appendTo('body').fadeIn('slow');
331
+ }, function () {
332
+ // Hover out code
333
+ let self = $(this);
334
+ self.attr('wftitle', self.data('tipText'));
335
+ $('.wftooltip').remove();
336
+ })
337
+ .mousemove(function (e) {
338
+ $('.wftooltip').css({
339
+ top: e.pageY + 10,
340
+ left: e.pageX + 20
341
+ });
342
+ });
343
+ },
344
+ clip = () => {
345
+ $copyBtn = $('.toClipboard');
346
+ if (!ClipboardJS.isSupported() || /iPhone|iPad/i.test(navigator.userAgent)) {
347
+ $copyBtn.find('img').hide(0);
348
+ } else {
349
+ $copyBtn.each(function() {
350
+ $(this).on('mouseleave', clearTooltip).on('blur', clearTooltip);
351
+ });
352
+ clipboard = new ClipboardJS('.toClipboard');
353
+ clipboard.on('error', function(event) {
354
+ showTooltip(event.trigger, fallbackMessage(event.action));
355
+ }).on('success', function(event) {
356
+ showTooltip(event.trigger, 'Copied');
357
+ });
358
+ }
359
+ };
360
+
361
+ /**
362
+ * Feed Generator Module
363
+ */
364
+ class feedGenerator {
365
+
366
+ /**
367
+ * Constructor
368
+ * @constructor
369
+ */
370
+ constructor() {
371
+ this._feed = opts.generator.feed; // wf_config+xxxx
372
+ this._limit = opts.generator.limit;
373
+ this._progress = 0;
374
+ this._timer = null;
375
+ this._color = false;
376
+ // batch info
377
+ this._total_batch = 0;
378
+ this._current_batch = 0;
379
+ this._product_ids = [];
380
+ this._progress_per_batch = 0;
381
+ this._refresh = true;
382
+ // noinspection JSUnresolvedVariable
383
+ this._regenerate = opts.generator.regenerate;
384
+ window.isRegenerating = false;
385
+ this._all_btn = $('.wpf_regenerate');
386
+ this._current_btn = $(`#${this._feed.replace( 'wf_config', 'wf_feed_' )}`);
387
+ this._current_btn_label = '';
388
+ }
389
+
390
+ /**
391
+ * Init Hooks (Event)
392
+ * @return {feedGenerator}
393
+ */
394
+ init() {
395
+ let self = this;
396
+ if ( '' !== this._feed && this._regenerate && false === window.isRegenerating ) {
397
+ this.generate();
398
+ }
399
+
400
+ //thickbox body add feed plugin class to make it unique and custom style
401
+ let current_page_query = window.location.search;
402
+ let params = new URLSearchParams(current_page_query);
403
+ let page_name = params.get("page");
404
+ if( "webappick-manage-feeds" === page_name ) {
405
+ $('body').addClass('woo-import-popup-body');
406
+ }
407
+
408
+ $(document).on('click', '.woo-feed-campaign-close-button', function(event) {
409
+ event.preventDefault();
410
+
411
+ $(this).parent('.woo-feed-promotion').hide();
412
+ let condition = $(this).data('condition');
413
+ if(1 === condition) {
414
+ wpAjax.post( 'woo_feed_hide_promotion', {
415
+ _ajax_nonce: opts.nonce,
416
+ condition: condition,
417
+ } ).then( response => {
418
+ self._log( response );
419
+ } ).fail( error => {
420
+ self._log( error );
421
+ self._updateProgressStatus( error.message );
422
+ self._color = 'red';
423
+ } );
424
+ }
425
+ });
426
+
427
+ $(document).on('click', '.wpf_regenerate', function(event) {
428
+ event.preventDefault();
429
+ self._current_btn = $( this );
430
+ if( self._current_btn.hasClass('disabled') || window.isRegenerating === true ) return;
431
+ self._feed = self._current_btn.attr('id').replace( 'wf_feed_', 'wf_config' );
432
+ if( '' !== self._feed ) {
433
+ self.generate();
434
+ }
435
+ });
436
+ return this;
437
+ }
438
+
439
+ _block_button() {
440
+ if ( this._all_btn.length ) {
441
+ this._all_btn.addClass('disabled');
442
+ }
443
+ if ( this._current_btn.length ) {
444
+ this._current_btn.find('span').addClass('wpf_spin reverse_spin');
445
+ this._current_btn_label = this._current_btn.attr('title');
446
+ // noinspection JSUnresolvedVariable
447
+ this._current_btn.attr( 'aria-label', opts.regenerate ).attr( 'title', opts.regenerate );
448
+ }
449
+ }
450
+
451
+ _unblock_button() {
452
+ if ( this._all_btn.length ) {
453
+ this._all_btn.removeClass('disabled');
454
+ }
455
+ if ( this._current_btn.length ) {
456
+ this._current_btn.find('span').removeClass('wpf_spin');
457
+ this._current_btn.find('span').removeClass('reverse_spin');
458
+ this._current_btn.attr( 'aria-label', this._current_btn_label ).attr( 'title', this._current_btn_label );
459
+ }
460
+ }
461
+
462
+ /**
463
+ * Generate Feed
464
+ * @return void
465
+ */
466
+ generate() {
467
+ let self = this;
468
+ window.isRegenerating = true;
469
+ this._block_button();
470
+ this._resetProgressBar();
471
+ this._progressBarActive();
472
+ this._log( 'Counting Total Products' );
473
+ this._updateProgressStatus( 'Fetching products.' );
474
+ this._get_product_ids().then( response => {
475
+ this._progress = 10;
476
+ self._log( {response} );
477
+ if(response.success) {
478
+ self._log( `Total ${response.total} Products found.` );
479
+ self._product_ids = response.product;
480
+ self._total_batch = this._product_ids.length;
481
+ self._current_batch = 0;
482
+ self._progress_per_batch = ( 90 - this._progress ) / this._total_batch;
483
+ self._process_batch();
484
+ self._updateProgressStatus( 'Processing Products...' );
485
+ } else {
486
+ self._updateProgressStatus( response.data.message );
487
+ }
488
+ }).fail( error => {
489
+ self._log( error );
490
+ self._updateProgressStatus( error.message );
491
+ self._color = 'red';
492
+ setTimeout( function(){
493
+ self._stopProgressBar();
494
+ self._unblock_button();
495
+ }, 1500 );
496
+ } );
497
+ }
498
+
499
+ /**
500
+ * Get Product Ids
501
+ * @returns {$.promise}
502
+ * @private
503
+ */
504
+ _get_product_ids() {
505
+ this._progress = 5;
506
+ return wpAjax.post( 'get_product_information', {
507
+ _ajax_nonce: opts.nonce,
508
+ feed: this._feed,
509
+ limit: this._limit,
510
+ } );
511
+ }
512
+
513
+ /**
514
+ * Run the Batch
515
+ * @private
516
+ */
517
+ _process_batch() {
518
+ let self = this;
519
+ let status = `Processing Batch ${this._current_batch+1} of ${this._total_batch}`;
520
+ this._updateProgressStatus( status );
521
+ this._log( status );
522
+ wpAjax.post( 'make_batch_feed', {
523
+ _ajax_nonce: opts.nonce,
524
+ feed: this._feed,
525
+ products: this._product_ids[this._current_batch],
526
+ loop: this._current_batch,
527
+ } ).then( response => {
528
+ self._current_batch++;
529
+ self._log( `Batch ${self._current_batch} Completed` );
530
+ self._log( response );
531
+ if ( self._current_batch < self._total_batch ) {
532
+ self._process_batch();
533
+ self._progress += self._progress_per_batch;
534
+ }
535
+ if ( self._current_batch === self._total_batch ) {
536
+ self._save_feed_file();
537
+ }
538
+ } ).fail( error => {
539
+ self._log( error );
540
+ self._updateProgressStatus( error.message );
541
+ self._color = 'red';
542
+ setTimeout( function(){
543
+ self._stopProgressBar();
544
+ self._unblock_button();
545
+ }, 1500 );
546
+ } );
547
+ }
548
+
549
+ /**
550
+ * Save Feed Data from temp to feed file
551
+ * @private
552
+ */
553
+ _save_feed_file() {
554
+ let self = this;
555
+ this._log( 'Saving feed file' );
556
+ this._updateProgressStatus( 'Saving feed file' );
557
+ wpAjax.post( 'save_feed_file', {
558
+ _ajax_nonce: opts.nonce,
559
+ feed: this._feed,
560
+ } ).then( response => {
561
+ self._log( response );
562
+ self._progress = 100;
563
+ if ( self._refresh ) {
564
+ window.location.href = `${opts.pages.list.feed}&link=${response.url}&cat=${response.cat}`;
565
+ }
566
+ setTimeout( function(){
567
+ self._stopProgressBar();
568
+ setTimeout( function(){
569
+ self._resetProgressBar( true );
570
+ self._unblock_button();
571
+ }, 3000 );
572
+ }, 2500 );
573
+ } ).fail( error => {
574
+ self._log( error );
575
+ self._updateProgressStatus( error.message );
576
+ self._color = 'red';
577
+ setTimeout( function(){
578
+ self._stopProgressBar();
579
+ self._unblock_button();
580
+ }, 1500 );
581
+ } );
582
+ }
583
+
584
+ /**
585
+ * Console log wrapper with debug settings.
586
+ * @param data
587
+ * @returns {feedGenerator}
588
+ * @private
589
+ */
590
+ _log( data ) {
591
+ // noinspection JSUnresolvedVariable
592
+ if ( opts.wpf_debug ) {
593
+ console.log( data );
594
+ }
595
+ return this;
596
+ }
597
+
598
+ /**
599
+ * Run the progressbar refresh interval
600
+ * @param {int} refreshInterval
601
+ * @returns {feedGenerator}
602
+ * @private
603
+ */
604
+ _progressBarActive( refreshInterval = 0 ) {
605
+ let self = this;
606
+ this._toggleProgressBar( true );
607
+ this._timer = setInterval( function(){
608
+ self._updateProgressBar();
609
+ }, refreshInterval || 1000 );
610
+ return this;
611
+ }
612
+
613
+ /**
614
+ * Stop Progressbar
615
+ * @returns {feedGenerator}
616
+ * @private
617
+ */
618
+ _stopProgressBar() {
619
+ clearInterval( this._timer );
620
+ return this;
621
+ }
622
+
623
+ /**
624
+ * Reset Progressbar
625
+ * @returns {feedGenerator}
626
+ * @private
627
+ */
628
+ _resetProgressBar( update ) {
629
+ this._toggleProgressBar( false );
630
+ this._updateProgressStatus( '' );
631
+ clearInterval( this._timer );
632
+ this._color = false;
633
+ this._timer = null;
634
+ this._progress = 0;
635
+ if ( update ) {
636
+ this._updateProgressBar();
637
+ }
638
+ return this;
639
+ }
640
+
641
+ /**
642
+ * Show hide the progress bar el
643
+ * @param status
644
+ * @returns {feedGenerator}
645
+ * @private
646
+ */
647
+ _toggleProgressBar( status ) {
648
+ let table = $('#feed_progress_table');
649
+ if ( status ) {
650
+ table.show();
651
+ } else {
652
+ table.hide();
653
+ }
654
+ return this;
655
+ }
656
+
657
+ /**
658
+ * Update Progress bar text status
659
+ * @param {string} status
660
+ * @returns {feedGenerator}
661
+ * @private
662
+ */
663
+ _updateProgressStatus( status ) {
664
+ $( '.feed-progress-status' ).text( status );
665
+ return this;
666
+ }
667
+
668
+ _getErrorMessageByCode( error ){
669
+ let progress_message = $( '.feed-progress-status' );
670
+ progress_message.css( {'color':this._color});
671
+ $( '.feed-progress-percentage' ).css( {'color':this._color});
672
+ $( '.wpf_spin' ).css( {'color':this._color});
673
+
674
+ let message=error.status +' : '+ error.statusText+'. ';
675
+ if(500===error.status){
676
+ message+= "Please increase your PHP max_execution_time. Please <a target='_blank' href='https://webappick.com/docs/woo-feed/faq-for-woocommerce-product-feed/how-to-solve-processing-10-feed-generation-stuck-error/'>read this doc</a>.";
677
+ }
678
+
679
+ this._updateProgressStatus(message);
680
+
681
+ }
682
+
683
+ /**
684
+ * Update Progress Data
685
+ * hooked with setInterval
686
+ * @private
687
+ */
688
+ _updateProgressBar() {
689
+ let percentage = $( '.feed-progress-percentage' ),
690
+ bar = $( '.feed-progress-bar-fill' ),
691
+ _progress = `${Math.round( this._progress )}%`;
692
+ bar.css( {
693
+ width: _progress,
694
+ } );
695
+ percentage.text( _progress );
696
+ }
697
+ }
698
+ // expose to the global scope
699
+ window.wf = {
700
+ helper: helper,
701
+ feedEditor: feedEditor,
702
+ generator: feedGenerator,
703
+ };
704
+
705
+ $(window).on('load', function() {
706
+ // Template loading ui conflict
707
+ if ($(location).attr("href").match(/webappick.*feed/g) !== null) {
708
+ $('#wpbody-content').addClass('woofeed-body-content');
709
+ }
710
+
711
+ // on edit page show item wrapper dropdown
712
+ let current_page_url_query = window.location.search;
713
+ let urlParams = new URLSearchParams(current_page_url_query);
714
+ let page_action = urlParams.get('action');
715
+
716
+ // ClipBoardJS
717
+ clip();
718
+ // postbox toggle
719
+ postboxes.add_postbox_toggles(pagenow);
720
+ // initialize generator
721
+ let generator = new feedGenerator();
722
+ generator.init();
723
+ // noinspection JSUnresolvedVariable
724
+ if( '' !== opts.generator.feed && opts.generator.regenerate ) {
725
+
726
+ }
727
+ // initialize editor
728
+ feedEditor.init();
729
+ helper.common(); // Generate Feed Add Table Row
730
+ tooltip();
731
+ // validate feed editor
732
+ $(".generateFeed").validate();
733
+
734
+ // document events
735
+ $(document)
736
+ .on('blur', 'input[name="wfDAttributeName"]', function(e) {
737
+ e.preventDefault();
738
+ let attr_name = $(this).val();
739
+ attr_name = attr_name.toLowerCase();
740
+ attr_name = attr_name.split(' ').join('_');
741
+
742
+ $('#wfDAttributeCode').val(attr_name);
743
+
744
+ })
745
+ .on('click', '[data-toggle_slide]', function(e) {
746
+ e.preventDefault();
747
+ $($(this).data('toggle_slide')).slideToggle('fast');
748
+ })
749
+ // XML Feed Wrapper
750
+ .on('click', '#wf_newRow', function () {
751
+ let tbody = $('#table-1 tbody'),
752
+ template = $('#feed_config_template').text().trim().replace(/__idx__/g, tbody.find('tr').length);
753
+ tbody.append(template);
754
+ helper.fancySelect($('.outputType'));
755
+ })
756
+ // feed delete alert.
757
+ .on('click', '.single-feed-delete', function (event) {
758
+ event.preventDefault();
759
+ // noinspection JSUnresolvedVariable
760
+ if (confirm(opts.form.del_confirm)) {
761
+ window.location.href = $(this).attr('val');
762
+ }
763
+ })
764
+ // clear cache data.
765
+ .on('click', '.wf_clean_cache_wrapper', function(event) {
766
+ event.preventDefault();
767
+ var nonce = $('.woo-feed-clean-cache-nonce').val();
768
+ var loader = $('.woo-feed-cache-loader');
769
+
770
+ //show loader
771
+ loader.show();
772
+
773
+ // passed cache nonce
774
+ wpAjax.post('clear_cache_data', {
775
+ _ajax_clean_nonce: nonce
776
+ }).then(function (response) {
777
+ if( response.success ) {
778
+ loader.hide(); //hide loader
779
+ location.reload();
780
+ }
781
+ }).fail(function (e) {
782
+ console.log('something wrong');
783
+ });
784
+
785
+ })// Copy Status
786
+ .on('click', '#woo-feed-copy-status-btn', function(event) {
787
+ event.preventDefault();
788
+ let button = $('#woo-feed-copy-status-btn');
789
+ let status_area = $('#woo-feed-status-area');
790
+ button.val('Copied');
791
+ status_area.css('visibility','visible');
792
+ status_area.select();
793
+
794
+ document.execCommand('copy');
795
+ })
796
+ // feed value dropdown change.
797
+ .on('change', '.wf_attr.wf_attributes', function(event) {
798
+ event.preventDefault();
799
+
800
+ $('.fancy-picker-picked').trigger("click"); // trigger fancy select box clicked
801
+
802
+ // price attributes
803
+ var price_attributes = ['price', 'current_price', 'sale_price', 'price_with_tax', 'current_price_with_tax', 'sale_price_with_tax', 'shipping_cost'];
804
+ // current value
805
+ var current_attribute_value = $(this).val();
806
+ var outputSelect = $(this).parents('tr').find('.outputType');
807
+ var fancyOption = $(this).parents('tr').find('.fancy-picker-content .fancy-picker-option');
808
+ var fancyDataPicker = $(this).parents('tr').find('.fancy-picker-data span');
809
+ var selectIf, selectKey;
810
+
811
+ // when any attribute is selected, pick the key
812
+ if( price_attributes.includes(current_attribute_value) ) {
813
+ // when select any price attribute
814
+ selectIf = 'for_price';
815
+ selectKey = "Price";
816
+ } else if ( "" !== current_attribute_value && -1 !== current_attribute_value.indexOf('wf_taxo') ) {
817
+
818
+ // when select any custom taxonomy
819
+ selectIf = 'for_custom_taxo';
820
+ selectKey = "parent_if_empty";
821
+ } else {
822
+
823
+ selectIf = 'for_all';
824
+ selectKey = 'Default';
825
+ }
826
+
827
+ // remove selected class from old selected option
828
+ fancyOption.removeClass('selected');
829
+
830
+ // when value dropdown is selected as price or any custom taxonomy
831
+ if( selectIf === 'for_custom_taxo' || selectIf === 'for_price' ) {
832
+
833
+ // update "Option Type" when select key matches
834
+ fancyOption.each(function(item) {
835
+ if( selectKey === $(this).text() ) {
836
+ $(this).addClass('selected');
837
+ fancyDataPicker.text(selectKey);
838
+ outputSelect.find("option").text(selectKey);
839
+ outputSelect.find("option").val( $(this).data('value') );
840
+ }
841
+ });
842
+ }
843
+
844
+ })
845
+ // bulk delete alert.
846
+ .on('click', '#doaction, #doaction2', function () {
847
+ // noinspection JSUnresolvedVariable
848
+ return confirm(opts.form.del_confirm_multi);
849
+ })
850
+ // Generate Feed Table Row Delete
851
+ .on('change', '.dType', function () {
852
+ let self = $(this),
853
+ type = self.val(),
854
+ row = self.closest('tr');
855
+
856
+ if (type === 'pattern') {
857
+ row.find('.value_attribute').hide();
858
+ row.find('.value_pattern').show();
859
+ } else if (type === 'attribute') {
860
+ row.find('.value_attribute').show();
861
+ row.find('.value_pattern').hide();
862
+ } else if (type === 'remove') {
863
+ row.find('.value_attribute').hide();
864
+ row.find('.value_pattern').hide();
865
+ }
866
+ })
867
+ // Generate Feed Form Submit
868
+ .on('click', '.delRow', function (e) {
869
+ e.preventDefault();
870
+ $(this).closest('tr').remove();
871
+ helper.reindex_config_table();
872
+ })
873
+ .on('submit', '#generateFeed', function () {
874
+ // Feed Generating form validation
875
+ $(this).validate();
876
+
877
+ if ($(this).valid()) {
878
+ $(".makeFeedResponse")
879
+ .show()
880
+ .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
881
+ }
882
+ })
883
+ // Generate Update Feed Form Submit
884
+ .on('submit', '#updatefeed', function (e, data) {
885
+ // Feed Generating form validation
886
+ $(this).validate();
887
+
888
+ if ($(this).valid()) {
889
+ $(".makeFeedResponse")
890
+ .show()
891
+ .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
892
+ }
893
+ })
894
+ .on( 'ready woo_feed_config_loaded', function(){
895
+
896
+ if( $('#ftpenabled').val() == 0 ){
897
+ $('.google-merchant-message').hide('slow');
898
+ $('.woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) input, .woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) select').attr('disabled','disabled');
899
+ } else {
900
+ if( $('#provider').val() === 'google' ) {
901
+ $('.google-merchant-message').show('slow');
902
+ } else {
903
+ $('.google-merchant-message').hide('slow');
904
+ }
905
+ $('.woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) input, .woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) select').removeAttr('disabled');
906
+ }
907
+
908
+ $('#ftpenabled').on('change', function(){
909
+ if( $('#ftpenabled').val() == 0 ){
910
+ $('.google-merchant-message').hide('slow');
911
+ $('.woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) input, .woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) select').attr('disabled','disabled');
912
+ } else {
913
+
914
+ $('.woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) input, .woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) select').removeAttr('disabled');
915
+
916
+ // Google merchant specific message
917
+ if( $('#provider').val() === 'google' ){
918
+ $('.google-merchant-message').show('slow');
919
+ } else {
920
+ $('.google-merchant-message').hide('slow');
921
+ }
922
+
923
+ }
924
+ });
925
+ })
926
+ .on('change', '.ftporsftp', function () {
927
+ let server = $(this).val(),
928
+ status = $('.ssh2_status');
929
+
930
+ if (server === 'sftp') {
931
+ // noinspection JSUnresolvedVariable
932
+ status.show().css('color', 'dodgerblue').text(opts.form.sftp_checking);
933
+ wpAjax.post('get_ssh2_status', {
934
+ _ajax_nonce: opts.nonce,
935
+ server: server
936
+ }).then(function (response) {
937
+ if (response === 'exists') {
938
+ // noinspection JSUnresolvedVariable
939
+ status.css('color', '#2CC185').text(opts.form.sftp_available);
940
+ setTimeout(function () {
941
+ status.hide();
942
+ }, 1500);
943
+ } else {
944
+ // noinspection JSUnresolvedVariable
945
+ status.show().css('color', 'red').text(opts.form.sftp_warning);
946
+ }
947
+ }).fail(function (e) {
948
+ status.hide();
949
+ helper.ajax_fail(e);
950
+ });
951
+ } else {
952
+ status.hide();
953
+ }
954
+ })
955
+ .on('click', '[name="save_feed_config"]', function (e) {
956
+ e.preventDefault();
957
+ $('#updatefeed').trigger('submit', {
958
+ save: true
959
+ });
960
+ })
961
+ .on('change', '#provider', function (event) {
962
+ event.preventDefault();
963
+
964
+ let merchant = $(this).val(),
965
+ templateName = $(this).find(':selected').text(),
966
+ name = $('#filename').val(),
967
+ feedType = $("#feedType"),
968
+ feedForm = $("#providerPage"),
969
+ merchantInfo = $('#feed_merchant_info'); // set loading..
970
+
971
+ // noinspection JSUnresolvedVariable
972
+ feedForm.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
973
+
974
+ merchantInfo.find('.spinner').addClass('is-active');
975
+ feedType.disabled(!0); // disable dropdown
976
+
977
+ feedType.parent().find('.spinner').addClass('is-active');
978
+ merchantInfo.find('.merchant-info-section .data').html(''); // remove previous data
979
+ // Get Merchant info for selected Provider/Merchant
980
+
981
+ if (merchantInfoCache.hasOwnProperty(merchant)) {
982
+ feedEditor.renderMerchantInfo(merchantInfo, feedType, merchantInfoCache[merchant]);
983
+
984
+ /**
985
+ * Triggers after merchant configuration is fetched & loaded
986
+ * */
987
+ $(document).trigger('woo_feed_config_loaded');
988
+
989
+ } else {
990
+ wpAjax.send('woo_feed_get_merchant_info', {
991
+ type: 'GET',
992
+ data: {
993
+ nonce: opts.nonce,
994
+ provider: merchant,
995
+ templateName: templateName
996
+ }
997
+ }).then(function (r) {
998
+ merchantInfoCache[merchant] = r;
999
+ feedEditor.renderMerchantInfo(merchantInfo, feedType, r);
1000
+ }).then(function(){
1001
+
1002
+ /**
1003
+ * Triggers after merchant configuration is fetched & loaded
1004
+ * */
1005
+ $(document).trigger('woo_feed_config_loaded');
1006
+
1007
+ }).fail(helper.ajax_fail);
1008
+ } // Get FeedForm For Selected Provider/Merchant
1009
+
1010
+
1011
+ if (merchantTemplateCache.hasOwnProperty(merchant)) {
1012
+ feedEditor.renderMerchantTemplate(feedForm, merchantTemplateCache[merchant]);
1013
+
1014
+ /**
1015
+ * Triggers after merchant configuration is fetched & loaded
1016
+ * */
1017
+ $(document).trigger('woo_feed_config_loaded');
1018
+
1019
+ } else {
1020
+ wpAjax.post('get_feed_merchant', {
1021
+ _ajax_nonce: opts.nonce,
1022
+ merchant: merchant
1023
+ }).then(function (r) {
1024
+ merchantTemplateCache[merchant] = r;
1025
+ feedEditor.renderMerchantTemplate(feedForm, r);
1026
+ $('#utm_source').val(templateName);
1027
+ $('#utm_campaign').val(name);
1028
+ //when merchant is bing, change delimiter and enclosure
1029
+ if( 'bing' === merchant ) {
1030
+ //delimiter value
1031
+ $("#delimiter option").removeAttr('selected');
1032
+ $("#delimiter option[value=\"tab\"]").attr('selected', 'selected');
1033
+
1034
+ //enclosure value
1035
+ $("#enclosure option").removeAttr('selected');
1036
+ $("#enclosure option[value=\" \"]").attr('selected', 'selected');
1037
+ }
1038
+
1039
+ //reviewer options hide
1040
+ if( 'google_product_review' !== merchant) {
1041
+ $('.wf_attributes option[value="reviewer_name"]').hide();
1042
+ }
1043
+ }).then(function(){
1044
+
1045
+ /**
1046
+ * Triggers after merchant configuration is fetched & loaded
1047
+ * */
1048
+ $(document).trigger('woo_feed_config_loaded');
1049
+
1050
+ }).fail(helper.ajax_fail);
1051
+ }
1052
+ })
1053
+ // Feed Active and Inactive status change via ajax
1054
+ .on('change', '.woo_feed_status_input', function () {
1055
+ let self = $(this);
1056
+ wpAjax.post('update_feed_status', {
1057
+ _ajax_nonce: opts.nonce,
1058
+ feedName: self.val(),
1059
+ status: self[0].checked ? 1 : 0
1060
+ });
1061
+ });
1062
+ // event with trigger
1063
+ $(document)
1064
+ .on('change', '[name="is_outOfStock"], [name="product_visibility"]', function () {
1065
+ let outOfStockVisibilityRow = $('.out-of-stock-visibility');
1066
+ if ($('[name="is_outOfStock"]:checked').val() === 'n' && $('[name="product_visibility"]:checked').val() === '1') {
1067
+ outOfStockVisibilityRow.show();
1068
+ } else {
1069
+ outOfStockVisibilityRow.hide();
1070
+ }
1071
+ })
1072
+ .on('change', '.attr_type', function () {
1073
+ // Attribute type selection
1074
+ let self = $(this),
1075
+ type = self.val(),
1076
+ row = self.closest('tr');
1077
+
1078
+ if (type === 'pattern') {
1079
+ row.find('.wf_attr').hide();
1080
+ row.find('.wf_attr').val('');
1081
+ row.find('.wf_default').show();
1082
+ } else {
1083
+ row.find('.wf_attr').show();
1084
+ row.find('.wf_default').hide();
1085
+ row.find('.wf_default').val('');
1086
+ }
1087
+ })
1088
+ .on('change', '.wf_mattributes, .attr_type', function () {
1089
+ let row = $(this).closest('tr'),
1090
+ attribute = row.find('.wf_mattributes'),
1091
+ type = row.find('.attr_type'),
1092
+ valueColumn = row.find('td:eq(4)'),
1093
+ provider = $('#provider').val();
1094
+
1095
+ // noinspection JSUnresolvedVariable
1096
+ if (opts.form.google_category.hasOwnProperty(attribute.val()) && type.val() === 'pattern' && helper.in_array(provider, opts.form.google_category[attribute.val()])) {
1097
+ if (valueColumn.find('select.selectize').length === 0) {
1098
+ valueColumn.find('input.wf_default').remove();
1099
+ valueColumn.append('<span class="wf_default wf_attributes"><select name="default[]" class="selectize"></select></span>');
1100
+ // noinspection JSUnresolvedVariable
1101
+ valueColumn.append(`<span style="font-size:x-small;"><a style="color: red" href="https://webappick.com/docs/woo-feed/feed-configuration/how-to-map-store-category-with-merchant-category/" target="_blank">${opts.learn_more}</a></span>`);
1102
+
1103
+ if (!googleCategories) {
1104
+ valueColumn.append('<span class="spinner is-active" style="margin: 0;"></span>');
1105
+ }
1106
+
1107
+ let select = valueColumn.find('.wf_attributes select');
1108
+ // noinspection JSUnresolvedVariable
1109
+ helper.selectize(select, {
1110
+ preload: true,
1111
+ placeholder: opts.form.select_category,
1112
+ load: function load(query, cb) {
1113
+ if (!googleCategories) {
1114
+ wpAjax.send('get_google_categories', {
1115
+ type: 'GET',
1116
+ data: {
1117
+ _ajax_nonce: opts.nonce,
1118
+ action: "get_google_categories",
1119
+ provider: provider
1120
+ }
1121
+ }).then(function (r) {
1122
+ googleCategories = r;
1123
+ cb(googleCategories);
1124
+ valueColumn.find('.spinner').remove();
1125
+ }).fail(helper.ajax_fail);
1126
+ } else {
1127
+ cb(googleCategories);
1128
+ }
1129
+ }
1130
+ });
1131
+ }
1132
+ } else {
1133
+ if (attribute.val() !== 'current_category' && valueColumn.find('input.wf_default').length === 0) {
1134
+ valueColumn.find('span').remove();
1135
+ valueColumn.append('<input autocomplete="off" class="wf_default wf_attributes" type="text" name="default[]" value="">');
1136
+
1137
+ if (type.val() !== 'pattern') {
1138
+ valueColumn.find('input.wf_default').hide();
1139
+ }
1140
+ }
1141
+ }
1142
+ })
1143
+ .on('change', '#feedType,#provider', function (e) {
1144
+ let type = $('#feedType').val(),
1145
+ provider = $('#provider').val(),
1146
+ itemWrapper = $('.itemWrapper'),
1147
+ wf_csv_txt = $('.wf_csvtxt');
1148
+
1149
+ // noinspection JSUnresolvedVariable
1150
+ if (type !== '' && helper.in_array(provider, opts.form.item_wrapper_hidden)) {
1151
+ itemWrapper.hide();
1152
+ }
1153
+
1154
+ //when feed type is changed
1155
+ if( 'feedType' === e.target.id ) {
1156
+ if (type === 'csv' || type === 'txt' || type === 'tsv') {
1157
+ itemWrapper.hide();
1158
+ wf_csv_txt.show();
1159
+
1160
+ if( 'tsv' === type ) {
1161
+ $('#delimiter option:last').prop("selected", "selected");
1162
+ } else if( 'csv' === type ) {
1163
+ $('#delimiter option:first').prop("selected", "selected");
1164
+ }
1165
+ } else if( type === 'xml' ) {
1166
+ itemWrapper.show();
1167
+ wf_csv_txt.hide();
1168
+ }
1169
+ }
1170
+
1171
+ })
1172
+ .trigger('change');
1173
+
1174
+
1175
+ $(document)
1176
+ .on('click', '.woofeed-custom-fields [id*="-switcher"]', function () {
1177
+ let field = $(this).attr( 'id' ).split( '-' )[0],
1178
+ isTaxonomy = $(this).data( 'taxonomy' ),
1179
+ status = $(this).prop( 'checked' );
1180
+ new WooFeedCustomFields( field, status, isTaxonomy );
1181
  })
 
1182
 
1183
+ // Remove sticky cart on feature page
1184
+ .ready(function() {
1185
+ var s = $(".wapk-feed-buy-now-container");
1186
+ var pos = s.position();
1187
+ $(window).scroll(function() {
1188
+ var windowpos = $(window).scrollTop();
1189
+ if ( windowpos <= 5000 ) {
1190
+ s.addClass("fixed");
1191
+ } else {
1192
+ s.removeClass("fixed");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1193
  }
1194
  });
1195
+ });
1196
+ });
1197
+
1198
+ $(document)
1199
+ .on('click', '#woo-feed-debug-log-download', function (e) {
1200
+ e.preventDefault();
1201
+ $("<a />", {
1202
+ download: new Date() + ".log",
1203
+ href: URL.createObjectURL(
1204
+ new Blob([$("#woo-feed-debug-log").val()], {
1205
+ type: "text/plain"
1206
+ })),
1207
+ }).appendTo("body")[0].click();
1208
+ })
1209
+ .on('keyup', '#filename', function(e) {
1210
+ var name = $('#filename').val();
1211
+ $('#utm_campaign').val(name);
1212
+ })
1213
+ // var providerVal = $('#category-mapping-form #providers').val();
1214
+ // console.log(providerVal)
1215
+ .on('change', '#category-mapping-form #providers', function(e) {
1216
+ var provider = $(this).find(':selected').val(),
1217
+ googleMap = ['google', 'facebook', 'pinterest', 'bing', 'bing_local_inventory', 'snapchat'];
1218
+ if( googleMap.indexOf(provider) !== -1 ) {
1219
+ $('input[id*="cat_mapping_"]').css('display', 'none');
1220
+ $('.wf_default.wf_attributes').css('display', 'block').css('width', '100%');
1221
+ // $('#category-mapping-form .dashicons').css('display', 'block');
1222
+ } else {
1223
+ $('input[id*="cat_mapping_"]').css('display', 'block');
1224
+ $('.wf_default.wf_attributes').css('display', 'none').css('width', '100%');
1225
+ // $('#category-mapping-form .dashicons').css('display', 'none');
1226
  }
1227
+ })
1228
+ .on('click', 'span[id*="cat-map-"]', function(e) {
1229
+ e.preventDefault();
1230
+ var providerName = $('#category-mapping-form #providers').val(),
1231
+ googleMap = ['google', 'facebook', 'pinterest', 'bing', 'bing_local_inventory', 'snapchat'],
1232
+ catId = $(this).attr('id').replace(/[^\d.]/g, ''),
1233
+ groupId = 'group-child-' + catId;
1234
+
1235
+ if( googleMap.indexOf(providerName) !== -1) {
1236
+ var catField = $(this).parents('tr').find('.selectized').val();
1237
+
1238
+ if (catField) {
1239
+ $('.' + groupId).parents('tr').find('select').each(function (i, v) {
1240
+ $(v).data('selectize').setValue(catField);
1241
+ });
 
 
 
 
1242
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1243
 
1244
+ } else {
1245
+ var value = $('#cat_mapping_'+catId).val();
1246
+ $('.'+groupId).parents('tr').find('input').val(value);
 
 
 
 
1247
  }
1248
 
1249
+ });
 
 
 
 
 
1250
 
1251
  })(jQuery, window, document, wp.ajax, wpf_ajax_obj);
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 o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}!function(s,a,c,l,d){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 o(e,t){s(e).addClass("tooltipped tooltipped-s").attr("aria-label",t)}function r(e,t){return s.extend(!0,{},e,t)}function t(){n=s(".toClipboard"),!ClipboardJS.isSupported()||/iPhone|iPad/i.test(navigator.userAgent)?n.find("img").hide(0):(n.each(function(){s(this).on("mouseleave",e).on("blur",e)}),new ClipboardJS(".toClipboard").on("error",function(e){var t,n;o(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){o(e.trigger,"Copied")}))}var n,i,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.value+" "+e.text),"</div>")},ajax_fail:function(e){console.warn(e),alert(e.hasOwnProperty("statusText")&&e.hasOwnProperty("status")?d.ajax.error+"\n"+e.statusText+" ("+e.status+")":e)},sortable:function(e,n,o,a){return(e||s(".sorted_table")).each(function(){var e=s(this),t=e.find("tbody > tr:eq(0) > td").length||o||9;e.wf_sortable(r({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,o){e.removeClass(t.group.options.draggedClass).removeAttr("style"),s("body").removeClass(t.group.options.bodyClass),a&&"function"==typeof a&&a(e,t,n,o)}},n))})},selectize:function(e,t){return(e||s("select.selectize")).not(".selectized").each(function(){var e=s(this);e.selectize(r({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(r({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"))}},_={form:null,init:function(){this.form=s(".generateFeed"),this.form.length&&(f.common(),s(c).trigger(new jQuery.Event("feedEditor.init",{target:this.form})))},renderMerchantInfo:function(n,o,a){function e(e){var t;a.hasOwnProperty(e)&&(n.find(".merchant-info-section."+e+" .data").html(a[e]),"feed_file_type"===e&&((t=a[e].split(",").map(function(e){return e.trim().toLowerCase()}).filter(function(e){return""!==e&&e!==d.na.toLowerCase()})).length?(o.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&&o.find('option[value="'+t[0]+'"]').attr("selected","selected")):o.find("option").disabled(!1)))}for(var t in a)e(t);n.find(".spinner").removeClass("is-active"),o.disabled(!1),o.trigger("change"),s(c).trigger("woo_feed_config_loaded"),o.parent().find(".spinner").removeClass("is-active")},renderMerchantTemplate:function(n,o){function e(t){if(o.hasOwnProperty(t))if("tabs"===t)n.html(o[t]);else{var e=s('[name="'+t+'"]');e.length&&e.each(function(){var e=s(this);e.is("select")?e.find('[value="'+o[t]+'"]').prop("selected",!0):(e.is("[type=checkbox]")||e.is("[type=radio]"))&&e.val()===o[t]?e.prop("checked",!0):e.val(o[t])}).trigger("change")}}for(var t in o)e(t);_.init()}},p=[],u=[],h=function(){function e(){_classCallCheck(this,e),this._feed=d.generator.feed,this._limit=d.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=d.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 n=this;""!==this._feed&&this._regenerate&&!1===a.isRegenerating&&this.generate();var e=a.location.search;return"webappick-manage-feeds"===new URLSearchParams(e).get("page")&&s("body").addClass("woo-import-popup-body"),s(c).on("click",".woo-feed-campaign-close-button",function(e){e.preventDefault(),s(this).parent(".woo-feed-promotion").hide();var t=s(this).data("condition");1===t&&l.post("woo_feed_hide_promotion",{_ajax_nonce:d.nonce,condition:t}).then(function(e){n._log(e)}).fail(function(e){n._log(e),n._updateProgressStatus(e.message),n._color="red"})}),s(c).on("click",".wpf_regenerate",function(e){e.preventDefault(),n._current_btn=s(this),n._current_btn.hasClass("disabled")||!0===a.isRegenerating||(n._feed=n._current_btn.attr("id").replace("wf_feed_","wf_config"),""!==n._feed&&n.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",d.regenerate).attr("title",d.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,l.post("get_product_information",{_ajax_nonce:d.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),l.post("make_batch_feed",{_ajax_nonce:d.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"),l.post("save_feed_file",{_ajax_nonce:d.nonce,feed:this._feed}).then(function(e){t._log(e),t._progress=100,t._refresh&&(a.location.href="".concat(d.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 d.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}),e.text(n)}}]),e}();a.wf={helper:f,feedEditor:_,generator:h},s(a).on("load",function(){null!==s(location).attr("href").match(/webappick.*feed/g)&&s("#wpbody-content").addClass("woofeed-body-content");var e=a.location.search;new URLSearchParams(e).get("action");t(),postboxes.add_postbox_toggles(pagenow),(new h).init(),""!==d.generator.feed&&d.generator.regenerate,_.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(c).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(d.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(),l.post("clear_cache_data",{_ajax_clean_nonce:t}).then(function(e){e.success&&(n.hide(),location.reload())}).fail(function(e){console.log("something wrong")})}).on("click","#woo-feed-copy-status-btn",function(e){e.preventDefault();var t=s("#woo-feed-copy-status-btn"),n=s("#woo-feed-status-area");t.val("Copied"),n.css("visibility","visible"),n.select(),c.execCommand("copy")}).on("change",".wf_attr.wf_attributes",function(e){e.preventDefault(),s(".fancy-picker-picked").trigger("click");var t,n,o=s(this).val(),a=s(this).parents("tr").find(".outputType"),r=s(this).parents("tr").find(".fancy-picker-content .fancy-picker-option"),i=s(this).parents("tr").find(".fancy-picker-data span");n=["price","current_price","sale_price","price_with_tax","current_price_with_tax","sale_price_with_tax","shipping_cost"].includes(o)?(t="for_price","Price"):""!==o&&-1!==o.indexOf("wf_taxo")?(t="for_custom_taxo","parent_if_empty"):(t="for_all","Default"),r.removeClass("selected"),"for_custom_taxo"!==t&&"for_price"!==t||r.each(function(e){n===s(this).text()&&(s(this).addClass("selected"),i.text(n),a.find("option").text(n),a.find("option").val(s(this).data("value")))})}).on("click","#doaction, #doaction2",function(){return confirm(d.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(d.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?d.form.save:d.form.generate,"</b>"))}).on("ready woo_feed_config_loaded",function(){console.log("Ready Provided"),0===s("#ftpenabled").val()?(s(".google-merchant-message").hide("slow"),s(".woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) input, .woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) select").attr("disabled","disabled")):("google"===s("#provider").val()?s(".google-merchant-message").show("slow"):s(".google-merchant-message").hide("slow"),s(".woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) input, .woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) select").removeAttr("disabled")),s("#ftpenabled").on("change",function(){0===s("#ftpenabled").val()?(s(".google-merchant-message").hide("slow"),s(".woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) input, .woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) select").attr("disabled","disabled")):(s(".woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) input, .woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) select").removeAttr("disabled"),"google"===s("#provider").val()?s(".google-merchant-message").show("slow"):s(".google-merchant-message").hide("slow"))})}).on("change",".ftporsftp",function(){var e=s(this).val(),t=s(".ssh2_status");"sftp"===e?(t.show().css("color","dodgerblue").text(d.form.sftp_checking),l.post("get_ssh2_status",{_ajax_nonce:d.nonce,server:e}).then(function(e){"exists"===e?(t.css("color","#2CC185").text(d.form.sftp_available),setTimeout(function(){t.hide()},1500)):t.show().css("color","red").text(d.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){e.preventDefault();var t=s(this).val(),n=s(this).find(":selected").text(),o=s("#filename").val(),a=s("#feedType"),r=s("#providerPage"),i=s("#feed_merchant_info");r.html('<h3><span style="float:none;margin: -3px 0 0;" class="spinner is-active"></span> '+d.form.loading_tmpl+"</h3>"),i.find(".spinner").addClass("is-active"),a.disabled(!0),a.parent().find(".spinner").addClass("is-active"),i.find(".merchant-info-section .data").html(""),p.hasOwnProperty(t)?(_.renderMerchantInfo(i,a,p[t]),s(c).trigger("woo_feed_config_loaded")):l.send("woo_feed_get_merchant_info",{type:"GET",data:{nonce:d.nonce,provider:t,templateName:n}}).then(function(e){p[t]=e,_.renderMerchantInfo(i,a,e)}).then(function(){s(c).trigger("woo_feed_config_loaded")}).fail(f.ajax_fail),u.hasOwnProperty(t)?(_.renderMerchantTemplate(r,u[t]),s(c).trigger("woo_feed_config_loaded")):l.post("get_feed_merchant",{_ajax_nonce:d.nonce,merchant:t}).then(function(e){u[t]=e,_.renderMerchantTemplate(r,e),s("#utm_source").val(n),s("#utm_campaign").val(o),"bing"===t&&(s("#delimiter option").removeAttr("selected"),s('#delimiter option[value="tab"]').attr("selected","selected"),s("#enclosure option").removeAttr("selected"),s('#enclosure option[value=" "]').attr("selected","selected")),"google_product_review"!==t&&s('.wf_attributes option[value="reviewer_name"]').hide()}).then(function(){s(c).trigger("woo_feed_config_loaded")}).fail(f.ajax_fail)}).on("change",".woo_feed_status_input",function(){var e=s(this);l.post("update_feed_status",{_ajax_nonce:d.nonce,feedName:e.val(),status:e[0].checked?1:0})}),s(c).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"),o=e.find("td:eq(4)"),a=s("#provider").val();if(d.form.google_category.hasOwnProperty(t.val())&&"pattern"===n.val()&&f.in_array(a,d.form.google_category[t.val()])){if(0===o.find("select.selectize").length){o.find("input.wf_default").remove(),o.append('<span class="wf_default wf_attributes"><select name="default[]" class="selectize"></select></span>'),o.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(d.learn_more,"</a></span>")),i||o.append('<span class="spinner is-active" style="margin: 0;"></span>');var r=o.find(".wf_attributes select");f.selectize(r,{preload:!0,placeholder:d.form.select_category,load:function(e,t){i?t(i):l.send("get_google_categories",{type:"GET",data:{_ajax_nonce:d.nonce,action:"get_google_categories",provider:a}}).then(function(e){t(i=e),o.find(".spinner").remove()}).fail(f.ajax_fail)}})}}else"current_category"!==t.val()&&0===o.find("input.wf_default").length&&(o.find("span").remove(),o.append('<input autocomplete="off" class="wf_default wf_attributes" type="text" name="default[]" value="">'),"pattern"!==n.val()&&o.find("input.wf_default").hide())}).on("change","#feedType,#provider",function(e){var t=s("#feedType").val(),n=s("#provider").val(),o=s(".itemWrapper"),a=s(".wf_csvtxt");""!==t&&f.in_array(n,d.form.item_wrapper_hidden)&&o.hide(),"feedType"===e.target.id&&("csv"===t||"txt"===t||"tsv"===t?(o.hide(),a.show(),"tsv"===t?s("#delimiter option:last").prop("selected","selected"):"csv"===t&&s("#delimiter option:first").prop("selected","selected")):"xml"===t&&(o.show(),a.hide()))}).trigger("change");var o=function(){function o(e,t,n){_classCallCheck(this,o),this.productCustomFields(e,t,n)}return _createClass(o,[{key:"cacheClear",value:function(){var e={action:"woo_feed_product_attribute_cache_remove",nonce:wpf_ajax_obj.ajax.nonce};s.ajax({method:"POST",url:wpf_ajax_obj.wpf_ajax_url,data:e})}},{key:"productCustomFields",value:function(e,t,n){var o=this,a=1<arguments.length&&void 0!==t&&t,r=2<arguments.length?n:void 0,i={action:"woo_feed_custom_fields_status_change",nonce:wpf_ajax_obj.ajax.nonce,field:e,status:a,isTaxonomy:r};s.ajax({method:"POST",url:wpf_ajax_obj.wpf_ajax_url,data:i,success:function(e){e.success?o.cacheClear():console.log(e)}})}}]),o}();s(c).on("click",'.woofeed-custom-fields [id*="-switcher"]',function(){var e=s(this).attr("id").split("-")[0],t=s(this).data("taxonomy"),n=s(this).prop("checked");new o(e,n,t)}),s(c).ready(function(){var e=s(".wapk-feed-buy-now-container");e.position();s(a).scroll(function(){s(a).scrollTop()<=5e3?e.addClass("fixed"):e.removeClass("fixed")})})}),s(c).on("click","#woo-feed-debug-log-download",function(e){e.preventDefault(),s("<a />",{download:new Date+".log",href:URL.createObjectURL(new Blob([s("#woo-feed-debug-log").val()],{type:"text/plain"}))}).appendTo("body")[0].click()}),s(c).on("keyup","#filename",function(e){var t=s("#filename").val();s("#utm_campaign").val(t)}),s(c).on("change","#category-mapping-form #providers",function(e){var t=s(this).find(":selected").val();-1!==["google","facebook","pinterest","bing","bing_local_inventory","snapchat"].indexOf(t)?(s('input[id*="cat_mapping_"]').css("display","none"),s(".wf_default.wf_attributes").css("display","block").css("width","100%")):(s('input[id*="cat_mapping_"]').css("display","block"),s(".wf_default.wf_attributes").css("display","none").css("width","100%"))}),s(c).on("click",'span[id*="cat-map-"]',function(e){e.preventDefault();var t=s("#category-mapping-form #providers").val(),n=s(this).attr("id").replace(/[^\d.]/g,""),o="group-child-"+n;if(-1!==["google","facebook","pinterest","bing","bing_local_inventory","snapchat"].indexOf(t)){var a=s(this).parents("tr").find(".selectized").val();a&&s("."+o).parents("tr").find("select").each(function(e,t){s(t).data("selectize").setValue(a)})}else{var r=s("#cat_mapping_"+n).val();s("."+o).parents("tr").find("input").val(r)}})}(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 o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}!function(s,o,c,l,f){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 a(e,t){s(e).addClass("tooltipped tooltipped-s").attr("aria-label",t)}function r(e,t){return s.extend(!0,{},e,t)}function t(){n=s(".toClipboard"),!ClipboardJS.isSupported()||/iPhone|iPad/i.test(navigator.userAgent)?n.find("img").hide(0):(n.each(function(){s(this).on("mouseleave",e).on("blur",e)}),new ClipboardJS(".toClipboard").on("error",function(e){var t,n;a(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){a(e.trigger,"Copied")}))}var n,i,d=function(){function o(e,t,n){_classCallCheck(this,o),this.productCustomFields(e,t,n)}return _createClass(o,[{key:"cacheClear",value:function(){var e={action:"woo_feed_product_attribute_cache_remove",nonce:wpf_ajax_obj.ajax.nonce};s.ajax({method:"POST",url:wpf_ajax_obj.wpf_ajax_url,data:e})}},{key:"productCustomFields",value:function(e,t,n){var o=this,a=1<arguments.length&&void 0!==t&&t,r=2<arguments.length?n:void 0,i={action:"woo_feed_custom_fields_status_change",nonce:wpf_ajax_obj.ajax.nonce,field:e,status:a,isTaxonomy:r};s.ajax({method:"POST",url:wpf_ajax_obj.wpf_ajax_url,data:i,success:function(e){e.success?o.cacheClear():console.log(e)}})}}]),o}(),_={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.value+" "+e.text),"</div>")},ajax_fail:function(e){console.warn(e),alert(e.hasOwnProperty("statusText")&&e.hasOwnProperty("status")?f.ajax.error+"\n"+e.statusText+" ("+e.status+")":e)},sortable:function(e,n,o,a){return(e||s(".sorted_table")).each(function(){var e=s(this),t=e.find("tbody > tr:eq(0) > td").length||o||9;e.wf_sortable(r({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,o){e.removeClass(t.group.options.draggedClass).removeAttr("style"),s("body").removeClass(t.group.options.bodyClass),a&&"function"==typeof a&&a(e,t,n,o)}},n))})},selectize:function(e,t){return(e||s("select.selectize")).not(".selectized").each(function(){var e=s(this);e.selectize(r({create:e.data("create")||!1,plugins:e.data("plugins")?e.data("plugins").split(",").map(function(e){return e.trim()}):[],render:{item:_.selectize_render_item}},t))})},fancySelect:function(e,t){return(e||s("select.fancySelect")).not(".FancySelectInit").each(function(){s(this).fancySelect(r({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(){_.sortable(s(".sorted_table"),{},9,_.reindex_config_table),_.selectize(),_.fancySelect(s(".outputType"))}},u={form:null,init:function(){this.form=s(".generateFeed"),this.form.length&&(_.common(),s(c).trigger(new jQuery.Event("feedEditor.init",{target:this.form})))},renderMerchantInfo:function(n,o,a){function e(e){var t;a.hasOwnProperty(e)&&(n.find(".merchant-info-section."+e+" .data").html(a[e]),"feed_file_type"===e&&((t=a[e].split(",").map(function(e){return e.trim().toLowerCase()}).filter(function(e){return""!==e&&e!==f.na.toLowerCase()})).length?(o.find("option").removeAttr("selected").each(function(){var e=s(this);e.val()&&!_.in_array(e.val(),t)?e.disabled(!0):e.disabled(!1)}),1===t.length&&o.find('option[value="'+t[0]+'"]').attr("selected","selected")):o.find("option").disabled(!1)))}for(var t in a)e(t);n.find(".spinner").removeClass("is-active"),o.disabled(!1),o.trigger("change"),s(c).trigger("woo_feed_config_loaded"),o.parent().find(".spinner").removeClass("is-active")},renderMerchantTemplate:function(n,o){function e(t){if(o.hasOwnProperty(t))if("tabs"===t)n.html(o[t]);else{var e=s('[name="'+t+'"]');e.length&&e.each(function(){var e=s(this);e.is("select")?e.find('[value="'+o[t]+'"]').prop("selected",!0):(e.is("[type=checkbox]")||e.is("[type=radio]"))&&e.val()===o[t]?e.prop("checked",!0):e.val(o[t])}).trigger("change")}}for(var t in o)e(t);u.init()}},p=[],h=[],g=function(){function e(){_classCallCheck(this,e),this._feed=f.generator.feed,this._limit=f.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=f.generator.regenerate,o.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 n=this;""!==this._feed&&this._regenerate&&!1===o.isRegenerating&&this.generate();var e=o.location.search;return"webappick-manage-feeds"===new URLSearchParams(e).get("page")&&s("body").addClass("woo-import-popup-body"),s(c).on("click",".woo-feed-campaign-close-button",function(e){e.preventDefault(),s(this).parent(".woo-feed-promotion").hide();var t=s(this).data("condition");1===t&&l.post("woo_feed_hide_promotion",{_ajax_nonce:f.nonce,condition:t}).then(function(e){n._log(e)}).fail(function(e){n._log(e),n._updateProgressStatus(e.message),n._color="red"})}),s(c).on("click",".wpf_regenerate",function(e){e.preventDefault(),n._current_btn=s(this),n._current_btn.hasClass("disabled")||!0===o.isRegenerating||(n._feed=n._current_btn.attr("id").replace("wf_feed_","wf_config"),""!==n._feed&&n.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",f.regenerate).attr("title",f.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;o.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,l.post("get_product_information",{_ajax_nonce:f.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),l.post("make_batch_feed",{_ajax_nonce:f.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"),l.post("save_feed_file",{_ajax_nonce:f.nonce,feed:this._feed}).then(function(e){t._log(e),t._progress=100,t._refresh&&(o.location.href="".concat(f.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 f.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:"_getErrorMessageByCode",value:function(e){s(".feed-progress-status").css({color:this._color}),s(".feed-progress-percentage").css({color:this._color}),s(".wpf_spin").css({color:this._color});var t=e.status+" : "+e.statusText+". ";500===e.status&&(t+="Please increase your PHP max_execution_time. Please <a target='_blank' href='https://webappick.com/docs/woo-feed/faq-for-woocommerce-product-feed/how-to-solve-processing-10-feed-generation-stuck-error/'>read this doc</a>."),this._updateProgressStatus(t)}},{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}),e.text(n)}}]),e}();o.wf={helper:_,feedEditor:u,generator:g},s(o).on("load",function(){null!==s(location).attr("href").match(/webappick.*feed/g)&&s("#wpbody-content").addClass("woofeed-body-content");var e=o.location.search;new URLSearchParams(e).get("action");t(),postboxes.add_postbox_toggles(pagenow),(new g).init(),""!==f.generator.feed&&f.generator.regenerate,u.init(),_.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(c).on("blur",'input[name="wfDAttributeName"]',function(e){e.preventDefault();var t=s(this).val();t=(t=t.toLowerCase()).split(" ").join("_"),s("#wfDAttributeCode").val(t)}).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),_.fancySelect(s(".outputType"))}).on("click",".single-feed-delete",function(e){e.preventDefault(),confirm(f.form.del_confirm)&&(o.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(),l.post("clear_cache_data",{_ajax_clean_nonce:t}).then(function(e){e.success&&(n.hide(),location.reload())}).fail(function(e){console.log("something wrong")})}).on("click","#woo-feed-copy-status-btn",function(e){e.preventDefault();var t=s("#woo-feed-copy-status-btn"),n=s("#woo-feed-status-area");t.val("Copied"),n.css("visibility","visible"),n.select(),c.execCommand("copy")}).on("change",".wf_attr.wf_attributes",function(e){e.preventDefault(),s(".fancy-picker-picked").trigger("click");var t,n,o=s(this).val(),a=s(this).parents("tr").find(".outputType"),r=s(this).parents("tr").find(".fancy-picker-content .fancy-picker-option"),i=s(this).parents("tr").find(".fancy-picker-data span");n=["price","current_price","sale_price","price_with_tax","current_price_with_tax","sale_price_with_tax","shipping_cost"].includes(o)?(t="for_price","Price"):""!==o&&-1!==o.indexOf("wf_taxo")?(t="for_custom_taxo","parent_if_empty"):(t="for_all","Default"),r.removeClass("selected"),"for_custom_taxo"!==t&&"for_price"!==t||r.each(function(e){n===s(this).text()&&(s(this).addClass("selected"),i.text(n),a.find("option").text(n),a.find("option").val(s(this).data("value")))})}).on("click","#doaction, #doaction2",function(){return confirm(f.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(),_.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(f.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?f.form.save:f.form.generate,"</b>"))}).on("ready woo_feed_config_loaded",function(){0==s("#ftpenabled").val()?(s(".google-merchant-message").hide("slow"),s(".woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) input, .woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) select").attr("disabled","disabled")):("google"===s("#provider").val()?s(".google-merchant-message").show("slow"):s(".google-merchant-message").hide("slow"),s(".woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) input, .woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) select").removeAttr("disabled")),s("#ftpenabled").on("change",function(){0==s("#ftpenabled").val()?(s(".google-merchant-message").hide("slow"),s(".woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) input, .woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) select").attr("disabled","disabled")):(s(".woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) input, .woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) select").removeAttr("disabled"),"google"===s("#provider").val()?s(".google-merchant-message").show("slow"):s(".google-merchant-message").hide("slow"))})}).on("change",".ftporsftp",function(){var e=s(this).val(),t=s(".ssh2_status");"sftp"===e?(t.show().css("color","dodgerblue").text(f.form.sftp_checking),l.post("get_ssh2_status",{_ajax_nonce:f.nonce,server:e}).then(function(e){"exists"===e?(t.css("color","#2CC185").text(f.form.sftp_available),setTimeout(function(){t.hide()},1500)):t.show().css("color","red").text(f.form.sftp_warning)}).fail(function(e){t.hide(),_.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){e.preventDefault();var t=s(this).val(),n=s(this).find(":selected").text(),o=s("#filename").val(),a=s("#feedType"),r=s("#providerPage"),i=s("#feed_merchant_info");r.html('<h3><span style="float:none;margin: -3px 0 0;" class="spinner is-active"></span> '+f.form.loading_tmpl+"</h3>"),i.find(".spinner").addClass("is-active"),a.disabled(!0),a.parent().find(".spinner").addClass("is-active"),i.find(".merchant-info-section .data").html(""),p.hasOwnProperty(t)?(u.renderMerchantInfo(i,a,p[t]),s(c).trigger("woo_feed_config_loaded")):l.send("woo_feed_get_merchant_info",{type:"GET",data:{nonce:f.nonce,provider:t,templateName:n}}).then(function(e){p[t]=e,u.renderMerchantInfo(i,a,e)}).then(function(){s(c).trigger("woo_feed_config_loaded")}).fail(_.ajax_fail),h.hasOwnProperty(t)?(u.renderMerchantTemplate(r,h[t]),s(c).trigger("woo_feed_config_loaded")):l.post("get_feed_merchant",{_ajax_nonce:f.nonce,merchant:t}).then(function(e){h[t]=e,u.renderMerchantTemplate(r,e),s("#utm_source").val(n),s("#utm_campaign").val(o),"bing"===t&&(s("#delimiter option").removeAttr("selected"),s('#delimiter option[value="tab"]').attr("selected","selected"),s("#enclosure option").removeAttr("selected"),s('#enclosure option[value=" "]').attr("selected","selected")),"google_product_review"!==t&&s('.wf_attributes option[value="reviewer_name"]').hide()}).then(function(){s(c).trigger("woo_feed_config_loaded")}).fail(_.ajax_fail)}).on("change",".woo_feed_status_input",function(){var e=s(this);l.post("update_feed_status",{_ajax_nonce:f.nonce,feedName:e.val(),status:e[0].checked?1:0})}),s(c).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"),o=e.find("td:eq(4)"),a=s("#provider").val();if(f.form.google_category.hasOwnProperty(t.val())&&"pattern"===n.val()&&_.in_array(a,f.form.google_category[t.val()])){if(0===o.find("select.selectize").length){o.find("input.wf_default").remove(),o.append('<span class="wf_default wf_attributes"><select name="default[]" class="selectize"></select></span>'),o.append('<span style="font-size:x-small;"><a style="color: red" href="https://webappick.com/docs/woo-feed/feed-configuration/how-to-map-store-category-with-merchant-category/" target="_blank">'.concat(f.learn_more,"</a></span>")),i||o.append('<span class="spinner is-active" style="margin: 0;"></span>');var r=o.find(".wf_attributes select");_.selectize(r,{preload:!0,placeholder:f.form.select_category,load:function(e,t){i?t(i):l.send("get_google_categories",{type:"GET",data:{_ajax_nonce:f.nonce,action:"get_google_categories",provider:a}}).then(function(e){t(i=e),o.find(".spinner").remove()}).fail(_.ajax_fail)}})}}else"current_category"!==t.val()&&0===o.find("input.wf_default").length&&(o.find("span").remove(),o.append('<input autocomplete="off" class="wf_default wf_attributes" type="text" name="default[]" value="">'),"pattern"!==n.val()&&o.find("input.wf_default").hide())}).on("change","#feedType,#provider",function(e){var t=s("#feedType").val(),n=s("#provider").val(),o=s(".itemWrapper"),a=s(".wf_csvtxt");""!==t&&_.in_array(n,f.form.item_wrapper_hidden)&&o.hide(),"feedType"===e.target.id&&("csv"===t||"txt"===t||"tsv"===t?(o.hide(),a.show(),"tsv"===t?s("#delimiter option:last").prop("selected","selected"):"csv"===t&&s("#delimiter option:first").prop("selected","selected")):"xml"===t&&(o.show(),a.hide()))}).trigger("change"),s(c).on("click",'.woofeed-custom-fields [id*="-switcher"]',function(){var e=s(this).attr("id").split("-")[0],t=s(this).data("taxonomy"),n=s(this).prop("checked");new d(e,n,t)}).ready(function(){var e=s(".wapk-feed-buy-now-container");e.position();s(o).scroll(function(){s(o).scrollTop()<=5e3?e.addClass("fixed"):e.removeClass("fixed")})})}),s(c).on("click","#woo-feed-debug-log-download",function(e){e.preventDefault(),s("<a />",{download:new Date+".log",href:URL.createObjectURL(new Blob([s("#woo-feed-debug-log").val()],{type:"text/plain"}))}).appendTo("body")[0].click()}).on("keyup","#filename",function(e){var t=s("#filename").val();s("#utm_campaign").val(t)}).on("change","#category-mapping-form #providers",function(e){var t=s(this).find(":selected").val();-1!==["google","facebook","pinterest","bing","bing_local_inventory","snapchat"].indexOf(t)?(s('input[id*="cat_mapping_"]').css("display","none"),s(".wf_default.wf_attributes").css("display","block").css("width","100%")):(s('input[id*="cat_mapping_"]').css("display","block"),s(".wf_default.wf_attributes").css("display","none").css("width","100%"))}).on("click",'span[id*="cat-map-"]',function(e){e.preventDefault();var t=s("#category-mapping-form #providers").val(),n=s(this).attr("id").replace(/[^\d.]/g,""),o="group-child-"+n;if(-1!==["google","facebook","pinterest","bing","bing_local_inventory","snapchat"].indexOf(t)){var a=s(this).parents("tr").find(".selectized").val();a&&s("."+o).parents("tr").find("select").each(function(e,t){s(t).data("selectize").setValue(a)})}else{var r=s("#cat_mapping_"+n).val();s("."+o).parents("tr").find("input").val(r)}})}(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","top","this","on","event","test","navigator","console","googleCategories","in_array","needle","haystack","sortable","escape","data","value","text","ajax_fail","column_count","find","warn","wf_sortable","selectize_render_item","e","hasOwnProperty","opts","ajax","error","statusText","status","el","config","column","_onDrop","each","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","trigger","jQuery","k","init","renderMerchantInfo","opt","feedType","r","types","html","t","toLowerCase","na","disabled","val","renderMerchantTemplate","_loop","contentSettings","feedForm","feedEditor","merchantInfoCache","css","clipboard","_regenerate","isRegenerating","_feed","_current_btn","feed","_limit","generator","limit","_progress","_product_ids","_progress_per_batch","_refresh","_all_btn","generate","feedGenerator","condition","_current_btn_label","then","URLSearchParams","response","_color","preventDefault","parent","hide","_ajax_nonce","_log","_updateProgressStatus","message","key","_block_button","_this","product","setTimeout","_stopProgressBar","_process_batch","_current_batch","_total_batch","post","loop","_resetProgressBar","_unblock_button","refreshInterval","arguments","undefined","_timer","clearInterval","update","table","show","width","bar","wf","current_page_url_query","postboxes","regenerate","_updateProgressBar","pagenow","template","common","hover","title","appendTo","userAgent","remove","ClipboardJS","pageX","location","slideToggle","loader","tbody","reload","nonce","button","status_area","select","execCommand","fail","current_attribute_value","fancyOption","fancyDataPicker","selectIf","price_attributes","selectKey","outputSelect","parents","includes","confirm","del_confirm_multi","closest","reindex_config_table","type","_ajax_clean_nonce","row","valid","validate","save","log","server","sftp_available","templateName","name","merchant","loading_tmpl","provider","merchantTemplateCache","outOfStockVisibilityRow","feedName","checked","valueColumn","append","load","google_category","attribute","learn_more","preload","cb","query","itemWrapper","wf_csv_txt","item_wrapper_hidden","WooFeedCustomFields","productCustomFields","placeholder","url","field","isTaxonomy","success","_this2","wpf_ajax_obj","wpf_ajax_url","download","URL","position","scroll","scrollTop","googleMap","Date","method","click","providerName","wp"],"mappings":"yHAAA,SAAAA,kBAAAC,EAAAC,+BACA,IAAAC,EAAAD,EAAAE,kHADA,SAAAC,aAAAC,EAAAC,EAAAC,GAWC,OAFDD,GAAAP,kBAAAM,EAAAG,UAAAF,GARAC,GAAAE,kBAAAC,EAAAH,GAUCF,gFA0BGM,IAAAA,EAAAA,EAAAA,MACAC,EAAAD,gBAEA,IAAAA,EAAAA,KAAAC,GAHAD,EAAAA,KAAAA,OAAAA,IAAAA,IAAAA,IAAAA,4EAYF,IAAAE,EAAAA,EAAAA,MAEAC,EAAA,WACA,YAHA,IAAAH,EAAAC,KAAAA,GAAAD,EAAAC,KAAAA,GAAAD,EAAAI,SAAAH,IAUQI,SAWRC,EAXuBC,GAAaC,EAAAA,EAAAA,eAAuBC,YAAUC,SAAMC,EAAhBC,GAAvB,OAA+EL,EAAAA,MAAAA,sBAAAA,IAAAA,KAAAA,OADpHC,YAAA,cAAAK,WAAAC,cAKGC,SAAFZ,EAAAA,EAAAA,GACAA,EAEDY,GAAAC,SAAA,2BAAAC,KAAA,aAAAC,GAiCyB,SAAAC,EAAAC,EAAAC,GAAA,OAvBvBlB,EAAAgB,QAAA,EAAA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,EAAAmF,GAEvD1E,GAAAA,SAAMK,oCAFiD,SAAA6B,GAAA,IAAAuK,EAGvDhC,EAAAA,MAAAA,KAAAA,aAHuDhF,OAMvDsI,+EAAAA,QAAAA,yDAEDxO,EAAAA,6BAAOyG,IAAA,UAAA,SAAAA,IAAA,QAAA,UAEN6H,EAAAA,6BAAKK,IAAAA,UAAaC,SAClB1M,EAAAA,6BAFAkN,IAAAA,UAAAA,QAAAA,IAAAA,QAAAA,WAMEpP,EAAAmF,GAAAhD,GAAA,QAFD,uBAAA,SAECQ,GACAhB,EAAAA,iBACA,IAAA2N,EAAAtP,EAAA,qCAAAkG,MA9f0Bb,EAAA1F,EAAAA,MAAAwF,KAAAA,MAAAoK,QAAAZ,UAAAA,+BAyjBhC,CAAA,SAAA,WAAA,YAAA,OAAA,uBAAA","file":"woo-feed-admin.min.js","sourcesContent":["// noinspection JSUnresolvedletiable\n/**!\n * WooFeed Scripts\n * @version 3.3.6\n * @package WooFeed\n * @copyright 2020 WebAppick\n *\n */\n/* global ajaxurl, wpAjax, postboxes, pagenow, alert, deleteUserSetting, typenow, adminpage, thousandsSeparator, decimalPoint, isRtl */\n// noinspection JSUnresolvedVariable\n(function($, window, document, wpAjax, opts) {\n\t\"use strict\";\n\t/**\n\t * All of the code for your admin-facing JavaScript source\n\t * should reside in this file.\n\t *\n\t * Note: It has been assumed you will write jQuery code here, so the\n\t * $ function reference has been prepared for usage within the scope\n\t * of this function.\n\t *\n\t * This enables you to define handlers, for when the DOM is ready:\n\t */\n\n\t/**\n\t * disable element utility\n\t *\n\t * @since 3.1.9\n\t *\n\t * @param {*} status\n\t * @returns {jQuery|HTMLElement}\n\t */\n\t$.fn.disabled = function(status) {\n\t\t$(this).each(function() {\n\t\t\tlet self = $(this),\n\t\t\t\tprop = 'disabled';\n\n\t\t\tif (typeof self.prop(prop) !== 'undefined') {\n\t\t\t\tself.prop(prop, status === void 0 || status === true);\n\t\t\t} else {\n\t\t\t\t!0 === status ? self.addClass(prop) : self.removeClass(prop);\n\t\t\t}\n\t\t});\n\t\treturn self; // method chaining\n\t};\n\t\n\t/**\n\t * Check if a HTMLElement or jQuery is disabled\n\t */\n\t$.fn.isDisabled = function() {\n\t\tlet self = $(this),\n\t\t\tprop = 'disabled';\n\t\treturn typeof self.prop(prop) !== 'undefined' ? self.prop(prop) : self.hasClass(prop);\n\t};\n\t\n\t/**\n\t * Clear Tooltip for clip board js\n\t * @param {Object} event\n\t */\n\tconst clearTooltip = (event) => {\n\t\t$(event.currentTarget).removeClass( (index, className) => (className.match(/\\btooltipped-\\S+/g) || []).join(' ') ).removeClass('tooltipped').removeAttr('aria-label');\n\t};\n\n\tconst showTooltip = (elem, msg) => {\n\t\t$(elem).addClass('tooltipped tooltipped-s').attr('aria-label', msg);\n\t};\n\n\tconst fallbackMessage = (action) =>{\n\t\tlet actionMsg,\n\t\t\tactionKey = action === 'cut' ? 'X' : 'C';\n\n\t\tif (/iPhone|iPad/i.test(navigator.userAgent)) {\n\t\t\tactionMsg = 'No support :(';\n\t\t} else if (/Mac/i.test(navigator.userAgent)) {\n\t\t\tactionMsg = 'Press ⌘-' + actionKey + ' to ' + action;\n\t\t} else {\n\t\t\tactionMsg = 'Press Ctrl-' + actionKey + ' to ' + action;\n\t\t}\n\n\t\treturn actionMsg;\n\t};\n\t\n\t/**\n\t * Alias of jQuery.extend()\n\t * @param {Object} _default\n\t * @param {Object} _args\n\t */\n\tconst extend = (_default, _args) => $.extend(true, {}, _default, _args);\n\t\n\tlet $copyBtn,\n\t\tclipboard,\n\t\tgoogleCategories,\n\t\thelper = {\n\t\t\tin_array: (needle, haystack) => {\n\t\t\t\ttry {\n\t\t\t\t\treturn haystack.indexOf(needle) !== -1;\n\t\t\t\t} catch (e) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tselectize_render_item: (data, escape) => `<div class=\"item wapk-selectize-item\">${escape(data.value + ' ' + data.text)}</div>`, // phpcs:ignore WordPressVIPMinimum.JS.StringConcat.Found,\n\t\t\tajax_fail: e => {\n\t\t\t\tconsole.warn(e);\n\t\t\t\talert(e.hasOwnProperty('statusText') && e.hasOwnProperty('status') ? opts.ajax.error + '\\n' + e.statusText + ' (' + e.status + ')' : e);\n\t\t\t},\n\t\t\t/**\n\t\t\t * Initialize Sortable\n\t\t\t * @param {jQuery|HTMLElement} el\n\t\t\t * @param {object} config\n\t\t\t * @param {int|boolean} column\n\t\t\t * @param {function} onDrop\n\t\t\t * @return {jQuery|HTMLElement}\n\t\t\t */\n\t\t\tsortable: (el, config, column, onDrop) => {\n\t\t\t\treturn (el || $('.sorted_table')).each(function() {\n\t\t\t\t\tlet self = $(this),\n\t\t\t\t\t\tcolumn_count = self.find('tbody > tr:eq(0) > td').length || column || 9;\n\t\t\t\t\tself.wf_sortable(extend({\n\t\t\t\t\t\tcontainerSelector: 'table',\n\t\t\t\t\t\titemPath: '> tbody',\n\t\t\t\t\t\titemSelector: 'tr',\n\t\t\t\t\t\thandle: 'i.wf_sortedtable',\n\t\t\t\t\t\tplaceholder: `<tr class=\"placeholder\"><td colspan=\"${column_count}\"></td></tr>`,\n\t\t\t\t\t\tonDrop: ($item, container, _super, event) => {\n\t\t\t\t\t\t\t$item.removeClass(container.group.options.draggedClass).removeAttr('style');\n\t\t\t\t\t\t\t$(\"body\").removeClass(container.group.options.bodyClass);\n\t\t\t\t\t\t\tif ( onDrop && 'function' === typeof( onDrop ) ) {\n\t\t\t\t\t\t\t\tonDrop( $item, container, _super, event );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t}, config));\n\t\t\t\t});\n\t\t\t},\n\t\t\tselectize: (el, config) => {\n\t\t\t\treturn (el || $('select.selectize')).not('.selectized').each(function() {\n\t\t\t\t\tlet self = $(this);\n\t\t\t\t\tself.selectize(extend({\n\t\t\t\t\t\tcreate: self.data('create') || false,\n\t\t\t\t\t\tplugins: self.data('plugins') ? self.data('plugins').split(',').map(function(s) {\n\t\t\t\t\t\t\treturn s.trim();\n\t\t\t\t\t\t}) : [],\n\t\t\t\t\t\t//['remove_button'],\n\t\t\t\t\t\trender: {\n\t\t\t\t\t\t\titem: helper.selectize_render_item\n\t\t\t\t\t\t}\n\t\t\t\t\t}, config));\n\t\t\t\t});\n\t\t\t},\n\t\t\tfancySelect: (el, config) => {\n\t\t\t\treturn (el || $('select.fancySelect')).not('.FancySelectInit').each(function() {\n\t\t\t\t\tlet self = $(this);\n\t\t\t\t\tself.fancySelect(extend({\n\t\t\t\t\t\tmaxItemShow: 3\n\t\t\t\t\t}, config));\n\t\t\t\t});\n\t\t\t},\n\t\t\treindex_config_table: () => {\n\t\t\t\t$('#table-1').find('tbody tr').each( ( x, el ) => {\n\t\t\t\t\t$(el).find('[name]').each( ( x1, el ) => {\n\t\t\t\t\t\t$(el).attr('name', $(el).attr('name').replace(/(\\[\\d\\])/g, `[${x}]`));\n\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t\t},\n\t\t\tcommon: () => {\n\t\t\t\thelper.sortable( $('.sorted_table'), {}, 9, helper.reindex_config_table );\n\t\t\t\thelper.selectize();\n\t\t\t\thelper.fancySelect($('.outputType'));\n\t\t\t}\n\t\t},\n\t\t// helper functions\n\t\tfeedEditor = {\n\t\t\t/**\n\t\t\t * The Editor Form Elem.\n\t\t\t * @type {jQuery|HTMLElement}\n\t\t\t */\n\t\t\tform: null,\n\n\t\t\t/**\n\t\t\t * Initialize The Feed Editor {Tabs...}\n\t\t\t * @returns {void}\n\t\t\t */\n\t\t\tinit: function () {\n\t\t\t\tlet self = this;\n\t\t\t\tself.form = $('.generateFeed');\n\t\t\t\tif (!self.form.length) return;\n\t\t\t\thelper.common();\n\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\t$(document).trigger(new jQuery.Event('feedEditor.init', {\n\t\t\t\t\ttarget: this.form\n\t\t\t\t}));\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Render Merchant info ajax response and handle allowed feed type for selected merchant\n\t\t\t * @param {jQuery|HTMLElement} merchantInfo jQuery dom object\n\t\t\t * @param {jQuery|HTMLElement} feedType jQuery dom object\n\t\t\t * @param {Object} r ajax response object\n\t\t\t */\n\t\t\trenderMerchantInfo: function (merchantInfo, feedType, r) {\n\t\t\t\tfor (let k in r) {\n\t\t\t\t\tif (r.hasOwnProperty(k)) {\n\t\t\t\t\t\tmerchantInfo.find('.merchant-info-section.' + k + ' .data').html(r[k]); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html\n\n\t\t\t\t\t\tif ('feed_file_type' === k) {\n\t\t\t\t\t\t\t(function() {\n\t\t\t\t\t\t\t\tlet types = r[k].split(\",\").map(function(t) {\n\t\t\t\t\t\t\t\t\treturn t.trim().toLowerCase();\n\t\t\t\t\t\t\t\t}).filter(function(t) {\n\t\t\t\t\t\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\t\t\t\t\t\treturn t !== '' && t !== opts.na.toLowerCase();\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\tif (types.length) {\n\t\t\t\t\t\t\t\t\tfeedType.find('option').removeAttr('selected').each(function() {\n\t\t\t\t\t\t\t\t\t\tlet opt = $(this);\n\t\t\t\t\t\t\t\t\t\topt.val() && !helper.in_array(opt.val(), types) ? opt.disabled(!0) : opt.disabled(!1);\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\tif (types.length === 1) feedType.find('option[value=\"' + types[0] + '\"]').attr('selected', 'selected');\n\t\t\t\t\t\t\t\t} else feedType.find('option').disabled(!1);\n\t\t\t\t\t\t\t})();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tmerchantInfo.find('.spinner').removeClass('is-active');\n\t\t\t\tfeedType.disabled(!1);\n\t\t\t\tfeedType.trigger('change');\n\n\t\t\t\t/**\n\t\t\t\t * Triggers after merchant configuration is fetched & loaded\n\t\t\t\t * */\n\t\t\t\t$(document).trigger('woo_feed_config_loaded');\n\n\t\t\t\tfeedType.parent().find('.spinner').removeClass('is-active');\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Render Feed Template Tabs and settings while creating new feed.\n\t\t\t * @param {jQuery|HTMLElement} feedForm feed from query dom object\n\t\t\t * @param {object} r merchant template ajax response object\n\t\t\t */\n\t\t\trenderMerchantTemplate: function (feedForm, r) {\n\t\t\t\tlet _loop = function _loop(k) {\n\t\t\t\t\tif (r.hasOwnProperty(k)) {\n\t\t\t\t\t\tif ('tabs' === k) {\n\t\t\t\t\t\t\t// noinspection JSUnresolvedFunction\n\t\t\t\t\t\t\tfeedForm.html(r[k]); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlet contentSettings = $('[name=\"' + k + '\"]');\n\n\t\t\t\t\t\t\tif (contentSettings.length) {\n\t\t\t\t\t\t\t\tcontentSettings.each(function() {\n\t\t\t\t\t\t\t\t\tlet elem = $(this);\n\n\t\t\t\t\t\t\t\t\tif (elem.is('select')) {\n\t\t\t\t\t\t\t\t\t\telem.find('[value=\"' + r[k] + '\"]').prop('selected', true);\n\t\t\t\t\t\t\t\t\t} else if ((elem.is('[type=checkbox]') || elem.is('[type=radio]')) && elem.val() === r[k]) {\n\t\t\t\t\t\t\t\t\t\telem.prop('checked', true);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\telem.val(r[k]); // type=text\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}).trigger('change');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tfor (let k in r) {\n\t\t\t\t\t_loop(k);\n\t\t\t\t}\n\n\t\t\t\tfeedEditor.init();\n\t\t\t}\n\t\t},\n\t\t// Feed Editor Table\n\t\tmerchantInfoCache = [],\n\t\tmerchantTemplateCache = [],\n\t\ttooltip = () => {\n\t\t\t// Tooltip only Text\n\t\t\t$('.wfmasterTooltip')\n\t\t\t\t.hover(function () {\n\t\t\t\t\t// Hover over code\n\t\t\t\t\tlet self = $(this), title = self.attr('wftitle');\n\t\t\t\t\tself.data('tipText', title).removeAttr('wftitle');\n\t\t\t\t\t$('<p class=\"wftooltip\"></p>').text(title).appendTo('body').fadeIn('slow');\n\t\t\t\t}, function () {\n\t\t\t\t\t// Hover out code\n\t\t\t\t\tlet self = $(this);\n\t\t\t\t\tself.attr('wftitle', self.data('tipText'));\n\t\t\t\t\t$('.wftooltip').remove();\n\t\t\t\t})\n\t\t\t\t.mousemove(function (e) {\n\t\t\t\t\t$('.wftooltip').css({\n\t\t\t\t\t\ttop: e.pageY + 10,\n\t\t\t\t\t\tleft: e.pageX + 20\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t},\n\t\tclip = () => {\n\t\t\t$copyBtn = $('.toClipboard');\n\t\t\tif (!ClipboardJS.isSupported() || /iPhone|iPad/i.test(navigator.userAgent)) {\n\t\t\t\t$copyBtn.find('img').hide(0);\n\t\t\t} else {\n\t\t\t\t$copyBtn.each(function() {\n\t\t\t\t\t$(this).on('mouseleave', clearTooltip).on('blur', clearTooltip);\n\t\t\t\t});\n\t\t\t\tclipboard = new ClipboardJS('.toClipboard');\n\t\t\t\tclipboard.on('error', function(event) {\n\t\t\t\t\tshowTooltip(event.trigger, fallbackMessage(event.action));\n\t\t\t\t}).on('success', function(event) {\n\t\t\t\t\tshowTooltip(event.trigger, 'Copied');\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t\n\t/**\n\t * Feed Generator Module\n\t */\n\tclass feedGenerator {\n\t\t\n\t\t/**\n\t\t * Constructor\n\t\t * @constructor\n\t\t */\n\t\tconstructor() {\n\t\t\tthis._feed = opts.generator.feed; // wf_config+xxxx\n\t\t\tthis._limit = opts.generator.limit;\n\t\t\tthis._progress = 0;\n\t\t\tthis._timer = null;\n\t\t\tthis._color = false;\n\t\t\t// batch info\n\t\t\tthis._total_batch = 0;\n\t\t\tthis._current_batch = 0;\n\t\t\tthis._product_ids = [];\n\t\t\tthis._progress_per_batch = 0;\n\t\t\tthis._refresh = true;\n\t\t\t// noinspection JSUnresolvedVariable\n\t\t\tthis._regenerate = opts.generator.regenerate;\n\t\t\twindow.isRegenerating = false;\n\t\t\tthis._all_btn = $('.wpf_regenerate');\n\t\t\tthis._current_btn = $(`#${this._feed.replace( 'wf_config', 'wf_feed_' )}`);\n\t\t\tthis._current_btn_label = '';\n\t\t}\n\t\t\n\t\t/**\n\t\t * Init Hooks (Event)\n\t\t * @return {feedGenerator}\n\t\t */\n\t\tinit() {\n\t\t\tlet self = this;\n\t\t\tif ( '' !== this._feed && this._regenerate && false === window.isRegenerating ) {\n\t\t\t\tthis.generate();\n\t\t\t}\n\n\t\t\t//thickbox body add feed plugin class to make it unique and custom style\n\t\t\tlet current_page_query = window.location.search;\n\t\t\tlet params = new URLSearchParams(current_page_query);\n\t\t\tlet page_name = params.get(\"page\");\n\t\t\tif( \"webappick-manage-feeds\" === page_name ) {\n\t\t\t\t$('body').addClass('woo-import-popup-body');\n\t\t\t}\n\n\t\t\t$(document).on('click', '.woo-feed-campaign-close-button', function(event) {\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\t$(this).parent('.woo-feed-promotion').hide();\n\t\t\t\tlet condition = $(this).data('condition');\n\t\t\t\tif(1 === condition) {\n\t\t\t\t\twpAjax.post( 'woo_feed_hide_promotion', {\n\t\t\t\t\t\t_ajax_nonce: opts.nonce,\n\t\t\t\t\t\tcondition: condition,\n\t\t\t\t\t} ).then( response => {\n\t\t\t\t\t\tself._log( response );\n\t\t\t\t\t} ).fail( error => {\n\t\t\t\t\t\tself._log( error );\n\t\t\t\t\t\tself._updateProgressStatus( error.message );\n\t\t\t\t\t\tself._color = 'red';\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t});\n\t\t\t$(document).on('click', '.wpf_regenerate', function(event) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tself._current_btn = $( this );\n\t\t\t\tif( self._current_btn.hasClass('disabled') || window.isRegenerating === true ) return;\n\t\t\t\tself._feed = self._current_btn.attr('id').replace( 'wf_feed_', 'wf_config' );\n\t\t\t\tif( '' !== self._feed ) {\n\t\t\t\t\tself.generate();\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\t_block_button() {\n\t\t\tif ( this._all_btn.length ) {\n\t\t\t\tthis._all_btn.addClass('disabled');\n\t\t\t}\n\t\t\tif ( this._current_btn.length ) {\n\t\t\t\tthis._current_btn.find('span').addClass('wpf_spin reverse_spin');\n\t\t\t\tthis._current_btn_label = this._current_btn.attr('title');\n\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\tthis._current_btn.attr( 'aria-label', opts.regenerate ).attr( 'title', opts.regenerate );\n\t\t\t}\n\t\t}\n\t\t\n\t\t_unblock_button() {\n\t\t\tif ( this._all_btn.length ) {\n\t\t\t\tthis._all_btn.removeClass('disabled');\n\t\t\t}\n\t\t\tif ( this._current_btn.length ) {\n\t\t\t\tthis._current_btn.find('span').removeClass('wpf_spin');\n\t\t\t\tthis._current_btn.find('span').removeClass('reverse_spin');\n\t\t\t\tthis._current_btn.attr( 'aria-label', this._current_btn_label ).attr( 'title', this._current_btn_label );\n\t\t\t}\n\t\t}\n\t\t\n\t\t/**\n\t\t * Generate Feed\n\t\t * @return void\n\t\t */\n\t\tgenerate() {\n\t\t\tlet self = this;\n\t\t\twindow.isRegenerating = true;\n\t\t\tthis._block_button();\n\t\t\tthis._resetProgressBar();\n\t\t\tthis._progressBarActive();\n\t\t\tthis._log( 'Counting Total Products' );\n\t\t\tthis._updateProgressStatus( 'Fetching products.' );\n\t\t\tthis._get_product_ids().then( response => {\n\t\t\t\tthis._progress = 10;\n\t\t\t\tself._log( {response} );\n\t\t\t\tif(response.success) {\n\t\t\t\t\tself._log( `Total ${response.total} Products found.` );\n\t\t\t\t\tself._product_ids = response.product;\n\t\t\t\t\tself._total_batch = this._product_ids.length;\n\t\t\t\t\tself._current_batch = 0;\n\t\t\t\t\tself._progress_per_batch = ( 90 - this._progress ) / this._total_batch;\n\t\t\t\t\tself._process_batch();\n\t\t\t\t\tself._updateProgressStatus( 'Processing Products...' );\n\t\t\t\t} else {\n\t\t\t\t\tself._updateProgressStatus( response.data.message );\n\t\t\t\t}\n\t\t\t}).fail( error => {\n\t\t\t\tself._log( error );\n\t\t\t\tself._updateProgressStatus( error.message );\n\t\t\t\tself._color = 'red';\n\t\t\t\tsetTimeout( function(){\n\t\t\t\t\tself._stopProgressBar();\n\t\t\t\t\tself._unblock_button();\n\t\t\t\t}, 1500 );\n\t\t\t} );\n\t\t}\n\t\t\n\t\t/**\n\t\t * Get Product Ids\n\t\t * @returns {$.promise}\n\t\t * @private\n\t\t */\n\t\t_get_product_ids() {\n\t\t\tthis._progress = 5;\n\t\t\treturn wpAjax.post( 'get_product_information', {\n\t\t\t\t_ajax_nonce: opts.nonce,\n\t\t\t\tfeed: this._feed,\n\t\t\t\tlimit: this._limit,\n\t\t\t} );\n\t\t}\n\t\t\n\t\t/**\n\t\t * Run the Batch\n\t\t * @private\n\t\t */\n\t\t_process_batch() {\n\t\t\tlet self = this;\n\t\t\tlet status = `Processing Batch ${this._current_batch+1} of ${this._total_batch}`;\n\t\t\tthis._updateProgressStatus( status );\n\t\t\tthis._log( status );\n\t\t\twpAjax.post( 'make_batch_feed', {\n\t\t\t\t_ajax_nonce: opts.nonce,\n\t\t\t\tfeed: this._feed,\n\t\t\t\tproducts: this._product_ids[this._current_batch],\n\t\t\t\tloop: this._current_batch,\n\t\t\t} ).then( response => {\n\t\t\t\tself._current_batch++;\n\t\t\t\tself._log( `Batch ${self._current_batch} Completed` );\n\t\t\t\tself._log( response );\n\t\t\t\tif ( self._current_batch < self._total_batch ) {\n\t\t\t\t\tself._process_batch();\n\t\t\t\t\tself._progress += self._progress_per_batch;\n\t\t\t\t}\n\t\t\t\tif ( self._current_batch === self._total_batch ) {\n\t\t\t\t\tself._save_feed_file();\n\t\t\t\t}\n\t\t\t} ).fail( error => {\n\t\t\t\tself._log( error );\n\t\t\t\tself._updateProgressStatus( error.message );\n\t\t\t\tself._color = 'red';\n\t\t\t\tsetTimeout( function(){\n\t\t\t\t\tself._stopProgressBar();\n\t\t\t\t\tself._unblock_button();\n\t\t\t\t}, 1500 );\n\t\t\t} );\n\t\t}\n\t\t\n\t\t/**\n\t\t * Save Feed Data from temp to feed file\n\t\t * @private\n\t\t */\n\t\t_save_feed_file() {\n\t\t\tlet self = this;\n\t\t\tthis._log( 'Saving feed file' );\n\t\t\tthis._updateProgressStatus( 'Saving feed file' );\n\t\t\twpAjax.post( 'save_feed_file', {\n\t\t\t\t_ajax_nonce: opts.nonce,\n\t\t\t\tfeed: this._feed,\n\t\t\t} ).then( response => {\n\t\t\t\tself._log( response );\n\t\t\t\tself._progress = 100;\n\t\t\t\tif ( self._refresh ) {\n\t\t\t\t\twindow.location.href = `${opts.pages.list.feed}&link=${response.url}&cat=${response.cat}`;\n\t\t\t\t}\n\t\t\t\tsetTimeout( function(){\n\t\t\t\t\tself._stopProgressBar();\n\t\t\t\t\tsetTimeout( function(){\n\t\t\t\t\t\tself._resetProgressBar( true );\n\t\t\t\t\t\tself._unblock_button();\n\t\t\t\t\t}, 3000 );\n\t\t\t\t}, 2500 );\n\t\t\t} ).fail( error => {\n\t\t\t\tself._log( error );\n\t\t\t\tself._updateProgressStatus( error.message );\n\t\t\t\tself._color = 'red';\n\t\t\t\tsetTimeout( function(){\n\t\t\t\t\tself._stopProgressBar();\n\t\t\t\t\tself._unblock_button();\n\t\t\t\t}, 1500 );\n\t\t\t} );\n\t\t}\n\t\t\n\t\t/**\n\t\t * Console log wrapper with debug settings.\n\t\t * @param data\n\t\t * @returns {feedGenerator}\n\t\t * @private\n\t\t */\n\t\t_log( data ) {\n\t\t\t// noinspection JSUnresolvedVariable\n\t\t\tif ( opts.wpf_debug ) {\n\t\t\t\tconsole.log( data );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\t/**\n\t\t * Run the progressbar refresh interval\n\t\t * @param {int} refreshInterval\n\t\t * @returns {feedGenerator}\n\t\t * @private\n\t\t */\n\t\t_progressBarActive( refreshInterval = 0 ) {\n\t\t\tlet self = this;\n\t\t\tthis._toggleProgressBar( true );\n\t\t\tthis._timer = setInterval( function(){\n\t\t\t\tself._updateProgressBar();\n\t\t\t}, refreshInterval || 1000 );\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\t/**\n\t\t * Stop Progressbar\n\t\t * @returns {feedGenerator}\n\t\t * @private\n\t\t */\n\t\t_stopProgressBar() {\n\t\t\tclearInterval( this._timer );\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\t/**\n\t\t * Reset Progressbar\n\t\t * @returns {feedGenerator}\n\t\t * @private\n\t\t */\n\t\t_resetProgressBar( update ) {\n\t\t\tthis._toggleProgressBar( false );\n\t\t\tthis._updateProgressStatus( '' );\n\t\t\tclearInterval( this._timer );\n\t\t\tthis._color = false;\n\t\t\tthis._timer = null;\n\t\t\tthis._progress = 0;\n\t\t\tif ( update ) {\n\t\t\t\tthis._updateProgressBar();\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\t/**\n\t\t * Show hide the progress bar el\n\t\t * @param status\n\t\t * @returns {feedGenerator}\n\t\t * @private\n\t\t */\n\t\t_toggleProgressBar( status ) {\n\t\t\tlet table = $('#feed_progress_table');\n\t\t\tif ( status ) {\n\t\t\t\ttable.show();\n\t\t\t} else {\n\t\t\t\ttable.hide();\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\t/**\n\t\t * Update Progress bar text status\n\t\t * @param {string} status\n\t\t * @returns {feedGenerator}\n\t\t * @private\n\t\t */\n\t\t_updateProgressStatus( status ) {\n\t\t\t$( '.feed-progress-status' ).text( status );\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\t/**\n\t\t * Update Progress Data\n\t\t * hooked with setInterval\n\t\t * @private\n\t\t */\n\t\t_updateProgressBar() {\n\t\t\tlet percentage = $( '.feed-progress-percentage' ),\n\t\t\t\tbar = $( '.feed-progress-bar-fill' ),\n\t\t\t\t_progress = `${Math.round( this._progress )}%`;\n\t\t\tbar.css( {\n\t\t\t\twidth: _progress,\n\t\t\t} );\n\t\t\tpercentage.text( _progress );\n\t\t}\n\t}\n\t// expose to the global scope\n\twindow.wf = {\n\t\thelper: helper,\n\t\tfeedEditor: feedEditor,\n\t\tgenerator: feedGenerator,\n\t};\n\t$(window).on('load', function() {\n\t\t// Template loading ui conflict\n\t\tif ($(location).attr(\"href\").match(/webappick.*feed/g) !== null) {\n\t\t\t$('#wpbody-content').addClass('woofeed-body-content');\n\t\t}\n\n\t\t// on edit page show item wrapper dropdown\n\t\tlet current_page_url_query = window.location.search;\n\t\tlet urlParams = new URLSearchParams(current_page_url_query);\n\t\tlet page_action = urlParams.get('action');\n\n\t\t// ClipBoardJS\n\t\tclip();\n\t\t// postbox toggle\n\t\tpostboxes.add_postbox_toggles(pagenow);\n\t\t// initialize generator\n\t\tlet generator = new feedGenerator();\n\t\tgenerator.init();\n\t\t// noinspection JSUnresolvedVariable\n\t\tif( '' !== opts.generator.feed && opts.generator.regenerate ) {\n\t\t\n\t\t}\n\t\t// initialize editor\n\t\tfeedEditor.init();\n\t\thelper.common(); // Generate Feed Add Table Row\n\t\ttooltip();\n\t\t// validate feed editor\n\t\t$(\".generateFeed\").validate();\n\t\t// document events\n\t\t$(document)\n\t\t\t.on('click', '[data-toggle_slide]', function(e) {\n\t\t\t\te.preventDefault();\n\t\t\t\t$($(this).data('toggle_slide')).slideToggle('fast');\n\t\t\t})\n\t\t\t// XML Feed Wrapper\n\t\t\t.on('click', '#wf_newRow', function () {\n\t\t\t\tlet tbody = $('#table-1 tbody'),\n\t\t\t\t\ttemplate = $('#feed_config_template').text().trim().replace(/__idx__/g, tbody.find('tr').length);\n\t\t\t\ttbody.append(template);\n\t\t\t\thelper.fancySelect($('.outputType'));\n\t\t\t})\n\t\t\t// feed delete alert.\n\t\t\t.on('click', '.single-feed-delete', function (event) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\tif (confirm(opts.form.del_confirm)) {\n\t\t\t\t\twindow.location.href = $(this).attr('val');\n\t\t\t\t}\n\t\t\t})\n\t\t\t// clear cache data.\n\t\t\t.on('click', '.wf_clean_cache_wrapper', function(event) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tvar nonce = $('.woo-feed-clean-cache-nonce').val();\n\t\t\t\tvar loader = $('.woo-feed-cache-loader');\n\n\t\t\t\t//show loader\n\t\t\t\tloader.show();\n\n\t\t\t\t// passed cache nonce\n\t\t\t\twpAjax.post('clear_cache_data', {\n\t\t\t\t\t_ajax_clean_nonce: nonce\n\t\t\t\t}).then(function (response) {\n\t\t\t\t\tif( response.success ) {\n\t\t\t\t\t\tloader.hide(); //hide loader\n\t\t\t\t\t\tlocation.reload();\n\t\t\t\t\t}\n\t\t\t\t}).fail(function (e) {\n\t\t\t\t\tconsole.log('something wrong');\n\t\t\t\t});\n\n\t\t\t})// Copy Status\n\t\t\t.on('click', '#woo-feed-copy-status-btn', function(event) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tlet button = $('#woo-feed-copy-status-btn');\n\t\t\t\tlet status_area = $('#woo-feed-status-area');\n\t\t\t\tbutton.val('Copied');\n\t\t\t\tstatus_area.css('visibility','visible');\n\t\t\t\tstatus_area.select();\n\n\t\t\t\tdocument.execCommand('copy');\n\t\t\t})\n\t\t\t// feed value dropdown change.\n\t\t\t.on('change', '.wf_attr.wf_attributes', function(event) {\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\t$('.fancy-picker-picked').trigger(\"click\"); // trigger fancy select box clicked\n\n\t\t\t\t// price attributes\n\t\t\t\tvar price_attributes = ['price', 'current_price', 'sale_price', 'price_with_tax', 'current_price_with_tax', 'sale_price_with_tax', 'shipping_cost'];\n\t\t\t\t// current value\n\t\t\t\tvar current_attribute_value = $(this).val();\n\t\t\t\tvar outputSelect = $(this).parents('tr').find('.outputType');\n\t\t\t\tvar fancyOption = $(this).parents('tr').find('.fancy-picker-content .fancy-picker-option');\n\t\t\t\tvar fancyDataPicker = $(this).parents('tr').find('.fancy-picker-data span');\n\t\t\t\tvar selectIf, selectKey;\n\n\t\t\t\t// when any attribute is selected, pick the key\n\t\t\t\tif( price_attributes.includes(current_attribute_value) ) {\n\t\t\t\t\t// when select any price attribute\n\t\t\t\t\tselectIf = 'for_price';\n\t\t\t\t\tselectKey = \"Price\";\n\t\t\t\t} else if ( \"\" !== current_attribute_value && -1 !== current_attribute_value.indexOf('wf_taxo') ) {\n\n\t\t\t\t\t// when select any custom taxonomy\n\t\t\t\t\tselectIf = 'for_custom_taxo';\n\t\t\t\t\tselectKey = \"parent_if_empty\";\n\t\t\t\t} else {\n\n\t\t\t\t\tselectIf = 'for_all';\n\t\t\t\t\tselectKey = 'Default';\n\t\t\t\t}\n\n\t\t\t\t// remove selected class from old selected option\n\t\t\t\tfancyOption.removeClass('selected');\n\n\t\t\t\t// when value dropdown is selected as price or any custom taxonomy\n\t\t\t\tif( selectIf === 'for_custom_taxo' || selectIf === 'for_price' ) {\n\n\t\t\t\t\t// update \"Option Type\" when select key matches\n\t\t\t\t\tfancyOption.each(function(item) {\n\t\t\t\t\t\tif( selectKey === $(this).text() ) {\n\t\t\t\t\t\t\t$(this).addClass('selected');\n\t\t\t\t\t\t\tfancyDataPicker.text(selectKey);\n\t\t\t\t\t\t\toutputSelect.find(\"option\").text(selectKey);\n\t\t\t\t\t\t\toutputSelect.find(\"option\").val( $(this).data('value') );\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} else {\n\n\t\t\t\t\t// update \"Option Type\" when select key matches\n\t\t\t\t\t// fancyOption.each(function(item) {\n\t\t\t\t\t// \tif( \"parent_if_empty\" !== $(this).text() && \"for_all\" === selectIf ) {\n\t\t\t\t\t// \t\t$(this).addClass('selected');\n\t\t\t\t\t// \t\tfancyDataPicker.text(selectKey);\n\t\t\t\t\t// \t\toutputSelect.find(\"option\").text(selectKey);\n\t\t\t\t\t// \t\toutputSelect.find(\"option\").val( $(this).data('value') );\n\t\t\t\t\t// \t}\n\t\t\t\t\t// });\n\t\t\t\t}\n\n\t\t\t})\n\t\t\t// bulk delete alert.\n\t\t\t.on('click', '#doaction, #doaction2', function () {\n\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\treturn confirm(opts.form.del_confirm_multi);\n\t\t\t})\n\t\t\t// Generate Feed Table Row Delete\n\t\t\t.on('change', '.dType', function () {\n\t\t\t\tlet self = $(this),\n\t\t\t\t\ttype = self.val(),\n\t\t\t\t\trow = self.closest('tr');\n\t\t\t\t\n\t\t\t\tif (type === 'pattern') {\n\t\t\t\t\trow.find('.value_attribute').hide();\n\t\t\t\t\trow.find('.value_pattern').show();\n\t\t\t\t} else if (type === 'attribute') {\n\t\t\t\t\trow.find('.value_attribute').show();\n\t\t\t\t\trow.find('.value_pattern').hide();\n\t\t\t\t} else if (type === 'remove') {\n\t\t\t\t\trow.find('.value_attribute').hide();\n\t\t\t\t\trow.find('.value_pattern').hide();\n\t\t\t\t}\n\t\t\t})\n\t\t\t// Generate Feed Form Submit\n\t\t\t.on('click', '.delRow', function (e) {\n\t\t\t\te.preventDefault();\n\t\t\t\t$(this).closest('tr').remove();\n\t\t\t\thelper.reindex_config_table();\n\t\t\t})\n\t\t\t.on('submit', '#generateFeed', function () {\n\t\t\t\t// Feed Generating form validation\n\t\t\t\t$(this).validate();\n\t\t\t\t\n\t\t\t\tif ($(this).valid()) {\n\t\t\t\t\t$(\".makeFeedResponse\")\n\t\t\t\t\t\t.show()\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\n\t\t\t\t}\n\t\t\t})\n\t\t\t// Generate Update Feed Form Submit\n\t\t\t.on('submit', '#updatefeed', function (e, data) {\n\t\t\t\t// Feed Generating form validation\n\t\t\t\t$(this).validate();\n\t\t\t\t\n\t\t\t\tif ($(this).valid()) {\n\t\t\t\t\t$(\".makeFeedResponse\")\n\t\t\t\t\t\t.show()\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\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on( 'ready woo_feed_config_loaded', function(){\n\t\t\t\tconsole.log(\"Ready Provided\");\n\t\t\t\tif( $('#ftpenabled').val() === 0 ){\n\t\t\t\t\t$('.google-merchant-message').hide('slow');\n\t\t\t\t\t$('.woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) input, .woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) select').attr('disabled','disabled');\n\t\t\t\t} else {\n\t\t\t\t\tif( $('#provider').val() === 'google' ) {\n\t\t\t\t\t\t$('.google-merchant-message').show('slow');\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$('.google-merchant-message').hide('slow');\n\t\t\t\t\t}\n\t\t\t\t\t$('.woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) input, .woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) select').removeAttr('disabled');\n\t\t\t\t}\n\n\t\t\t\t$('#ftpenabled').on('change', function(){\n\t\t\t\t\tif( $('#ftpenabled').val() === 0 ){\n\t\t\t\t\t\t$('.google-merchant-message').hide('slow');\n\t\t\t\t\t\t$('.woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) input, .woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) select').attr('disabled','disabled');\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t$('.woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) input, .woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) select').removeAttr('disabled');\n\n\t\t\t\t\t\t// Google merchant specific message\n\t\t\t\t\t\tif( $('#provider').val() === 'google' ){\n\t\t\t\t\t\t\t$('.google-merchant-message').show('slow');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$('.google-merchant-message').hide('slow');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('change', '.ftporsftp', function () {\n\t\t\t\tlet server = $(this).val(),\n\t\t\t\t\tstatus = $('.ssh2_status');\n\t\t\t\t\n\t\t\t\tif (server === 'sftp') {\n\t\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\t\tstatus.show().css('color', 'dodgerblue').text(opts.form.sftp_checking);\n\t\t\t\t\twpAjax.post('get_ssh2_status', {\n\t\t\t\t\t\t_ajax_nonce: opts.nonce,\n\t\t\t\t\t\tserver: server\n\t\t\t\t\t}).then(function (response) {\n\t\t\t\t\t\tif (response === 'exists') {\n\t\t\t\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\t\t\t\tstatus.css('color', '#2CC185').text(opts.form.sftp_available);\n\t\t\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\t\t\tstatus.hide();\n\t\t\t\t\t\t\t}, 1500);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\t\t\t\tstatus.show().css('color', 'red').text(opts.form.sftp_warning);\n\t\t\t\t\t\t}\n\t\t\t\t\t}).fail(function (e) {\n\t\t\t\t\t\tstatus.hide();\n\t\t\t\t\t\thelper.ajax_fail(e);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tstatus.hide();\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('click', '[name=\"save_feed_config\"]', function (e) {\n\t\t\t\te.preventDefault();\n\t\t\t\t$('#updatefeed').trigger('submit', {\n\t\t\t\t\tsave: true\n\t\t\t\t});\n\t\t\t})\n\t\t\t.on('change', '#provider', function (event) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\t//if (!$(this).closest('.generateFeed').hasClass('add-new')) return; // only for new feed.\n\n\t\t\t\tlet merchant = $(this).val(),\n\t\t\t\t\ttemplateName = $(this).find(':selected').text(),\n\t\t\t\t\tname = $('#filename').val(),\n\t\t\t\t\tfeedType = $(\"#feedType\"),\n\t\t\t\t\tfeedForm = $(\"#providerPage\"),\n\t\t\t\t\tmerchantInfo = $('#feed_merchant_info'); // set loading..\n\t\t\t\t\n\t\t\t\t// noinspection JSUnresolvedVariable\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\n\t\t\t\t\n\t\t\t\tmerchantInfo.find('.spinner').addClass('is-active');\n\t\t\t\tfeedType.disabled(!0); // disable dropdown\n\t\t\t\t\n\t\t\t\tfeedType.parent().find('.spinner').addClass('is-active');\n\t\t\t\tmerchantInfo.find('.merchant-info-section .data').html(''); // remove previous data\n\t\t\t\t// Get Merchant info for selected Provider/Merchant\n\t\t\t\t\n\t\t\t\tif (merchantInfoCache.hasOwnProperty(merchant)) {\n\t\t\t\t\tfeedEditor.renderMerchantInfo(merchantInfo, feedType, merchantInfoCache[merchant]);\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Triggers after merchant configuration is fetched & loaded\n\t\t\t\t\t * */\n\t\t\t\t\t$(document).trigger('woo_feed_config_loaded');\n\n\t\t\t\t} else {\n\t\t\t\t\twpAjax.send('woo_feed_get_merchant_info', {\n\t\t\t\t\t\ttype: 'GET',\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\tnonce: opts.nonce,\n\t\t\t\t\t\t\tprovider: merchant,\n\t\t\t\t\t\t\ttemplateName: templateName\n\t\t\t\t\t\t}\n\t\t\t\t\t}).then(function (r) {\n\t\t\t\t\t\tmerchantInfoCache[merchant] = r;\n\t\t\t\t\t\tfeedEditor.renderMerchantInfo(merchantInfo, feedType, r);\n\t\t\t\t\t\t// console.log('filter load')\n\t\t\t\t\t\t// $('#utm_source').val(templateName)\n\t\t\t\t\t}).then(function(){\n\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Triggers after merchant configuration is fetched & loaded\n\t\t\t\t\t\t * */\n\t\t\t\t\t\t$(document).trigger('woo_feed_config_loaded');\n\n\t\t\t\t\t}).fail(helper.ajax_fail);\n\t\t\t\t} // Get FeedForm For Selected Provider/Merchant\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (merchantTemplateCache.hasOwnProperty(merchant)) {\n\t\t\t\t\tfeedEditor.renderMerchantTemplate(feedForm, merchantTemplateCache[merchant]);\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Triggers after merchant configuration is fetched & loaded\n\t\t\t\t\t * */\n\t\t\t\t\t$(document).trigger('woo_feed_config_loaded');\n\n\t\t\t\t} else {\n\t\t\t\t\twpAjax.post('get_feed_merchant', {\n\t\t\t\t\t\t_ajax_nonce: opts.nonce,\n\t\t\t\t\t\tmerchant: merchant\n\t\t\t\t\t}).then(function (r) {\n\t\t\t\t\t\tmerchantTemplateCache[merchant] = r;\n\t\t\t\t\t\tfeedEditor.renderMerchantTemplate(feedForm, r);\n\t\t\t\t\t\t$('#utm_source').val(templateName);\n\t\t\t\t\t\t$('#utm_campaign').val(name);\n\t\t\t\t\t\t//when merchant is bing, change delimiter and enclosure\n\t\t\t\t\t\tif( 'bing' === merchant ) {\n\t\t\t\t\t\t\t//delimiter value\n\t\t\t\t\t\t\t$(\"#delimiter option\").removeAttr('selected');\n\t\t\t\t\t\t\t$(\"#delimiter option[value=\\\"tab\\\"]\").attr('selected', 'selected');\n\n\t\t\t\t\t\t\t//enclosure value\n\t\t\t\t\t\t\t$(\"#enclosure option\").removeAttr('selected');\n\t\t\t\t\t\t\t$(\"#enclosure option[value=\\\" \\\"]\").attr('selected', 'selected');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//reviewer options hide\n\t\t\t\t\t\tif( 'google_product_review' !== merchant) {\n\t\t\t\t\t\t\t$('.wf_attributes option[value=\"reviewer_name\"]').hide();\n\t\t\t\t\t\t}\n\t\t\t\t\t}).then(function(){\n\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t* Triggers after merchant configuration is fetched & loaded\n\t\t\t\t\t\t* */\n\t\t\t\t\t\t$(document).trigger('woo_feed_config_loaded');\n\n\t\t\t\t\t}).fail(helper.ajax_fail);\n\t\t\t\t}\n\t\t\t})\n\t\t\t// Feed Active and Inactive status change via ajax\n\t\t\t.on('change', '.woo_feed_status_input', function () {\n\t\t\t\tlet self = $(this);\n\t\t\t\twpAjax.post('update_feed_status', {\n\t\t\t\t\t_ajax_nonce: opts.nonce,\n\t\t\t\t\tfeedName: self.val(),\n\t\t\t\t\tstatus: self[0].checked ? 1 : 0\n\t\t\t\t});\n\t\t\t});\n\t\t// event with trigger\n\t\t$(document)\n\t\t\t.on('change', '[name=\"is_outOfStock\"], [name=\"product_visibility\"]', function () {\n\t\t\t\tlet outOfStockVisibilityRow = $('.out-of-stock-visibility');\n\t\t\t\tif ($('[name=\"is_outOfStock\"]:checked').val() === 'n' && $('[name=\"product_visibility\"]:checked').val() === '1') {\n\t\t\t\t\toutOfStockVisibilityRow.show();\n\t\t\t\t} else {\n\t\t\t\t\toutOfStockVisibilityRow.hide();\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('change', '.attr_type', function () {\n\t\t\t\t// Attribute type selection\n\t\t\t\tlet self = $(this),\n\t\t\t\t\ttype = self.val(),\n\t\t\t\t\trow = self.closest('tr');\n\t\t\t\t\n\t\t\t\tif (type === 'pattern') {\n\t\t\t\t\trow.find('.wf_attr').hide();\n\t\t\t\t\trow.find('.wf_attr').val('');\n\t\t\t\t\trow.find('.wf_default').show();\n\t\t\t\t} else {\n\t\t\t\t\trow.find('.wf_attr').show();\n\t\t\t\t\trow.find('.wf_default').hide();\n\t\t\t\t\trow.find('.wf_default').val('');\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('change', '.wf_mattributes, .attr_type', function () {\n\t\t\t\tlet row = $(this).closest('tr'),\n\t\t\t\t\tattribute = row.find('.wf_mattributes'),\n\t\t\t\t\ttype = row.find('.attr_type'),\n\t\t\t\t\tvalueColumn = row.find('td:eq(4)'),\n\t\t\t\t\tprovider = $('#provider').val();\n\t\t\t\t\n\t\t\t\t// noinspection JSUnresolvedVariable\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()])) {\n\t\t\t\t\tif (valueColumn.find('select.selectize').length === 0) {\n\t\t\t\t\t\tvalueColumn.find('input.wf_default').remove();\n\t\t\t\t\t\tvalueColumn.append('<span class=\"wf_default wf_attributes\"><select name=\"default[]\" class=\"selectize\"></select></span>');\n\t\t\t\t\t\t// noinspection JSUnresolvedVariable\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>`);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!googleCategories) {\n\t\t\t\t\t\t\tvalueColumn.append('<span class=\"spinner is-active\" style=\"margin: 0;\"></span>');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tlet select = valueColumn.find('.wf_attributes select');\n\t\t\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\t\t\thelper.selectize(select, {\n\t\t\t\t\t\t\tpreload: true,\n\t\t\t\t\t\t\tplaceholder: opts.form.select_category,\n\t\t\t\t\t\t\tload: function load(query, cb) {\n\t\t\t\t\t\t\t\tif (!googleCategories) {\n\t\t\t\t\t\t\t\t\twpAjax.send('get_google_categories', {\n\t\t\t\t\t\t\t\t\t\ttype: 'GET',\n\t\t\t\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\t\t\t\t_ajax_nonce: opts.nonce,\n\t\t\t\t\t\t\t\t\t\t\taction: \"get_google_categories\",\n\t\t\t\t\t\t\t\t\t\t\tprovider: provider\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}).then(function (r) {\n\t\t\t\t\t\t\t\t\t\tgoogleCategories = r;\n\t\t\t\t\t\t\t\t\t\tcb(googleCategories);\n\t\t\t\t\t\t\t\t\t\tvalueColumn.find('.spinner').remove();\n\t\t\t\t\t\t\t\t\t}).fail(helper.ajax_fail);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcb(googleCategories);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (attribute.val() !== 'current_category' && valueColumn.find('input.wf_default').length === 0) {\n\t\t\t\t\t\tvalueColumn.find('span').remove();\n\t\t\t\t\t\tvalueColumn.append('<input autocomplete=\"off\" class=\"wf_default wf_attributes\" type=\"text\" name=\"default[]\" value=\"\">');\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (type.val() !== 'pattern') {\n\t\t\t\t\t\t\tvalueColumn.find('input.wf_default').hide();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on('change', '#feedType,#provider', function (e) {\n\t\t\t\tlet type = $('#feedType').val(),\n\t\t\t\t\tprovider = $('#provider').val(),\n\t\t\t\t\titemWrapper = $('.itemWrapper'),\n\t\t\t\t\twf_csv_txt = $('.wf_csvtxt');\n\t\t\t\t\n\t\t\t\t// noinspection JSUnresolvedVariable\n\t\t\t\tif (type !== '' && helper.in_array(provider, opts.form.item_wrapper_hidden)) {\n\t\t\t\t\titemWrapper.hide();\n\t\t\t\t}\n\n\t\t\t\t//when feed type is changed\n\t\t\t\tif( 'feedType' === e.target.id ) {\n\t\t\t\t\tif (type === 'csv' || type === 'txt' || type === 'tsv') {\n\t\t\t\t\t\titemWrapper.hide();\n\t\t\t\t\t\twf_csv_txt.show();\n\n\t\t\t\t\t\tif( 'tsv' === type ) {\n\t\t\t\t\t\t\t$('#delimiter option:last').prop(\"selected\", \"selected\");\n\t\t\t\t\t\t} else if( 'csv' === type ) {\n\t\t\t\t\t\t\t$('#delimiter option:first').prop(\"selected\", \"selected\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if( type === 'xml' ) {\n\t\t\t\t\t\titemWrapper.show();\n\t\t\t\t\t\twf_csv_txt.hide();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t})\n\t\t\t.trigger('change');\n\n\n\t\t// product Attribute class\n\t\tclass WooFeedCustomFields {\n\n\t\t\tconstructor( field, status, isTaxonomy ) {\n\t\t\t\tthis.productCustomFields( field, status, isTaxonomy );\n\t\t\t}\n\n\t\t\tcacheClear() {\n\t\t\t\tlet data = {\n\t\t\t\t\taction: 'woo_feed_product_attribute_cache_remove',\n\t\t\t\t\tnonce: wpf_ajax_obj.ajax.nonce,\n\t\t\t\t};\n\t\t\t\t$.ajax({\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\turl: wpf_ajax_obj.wpf_ajax_url,\n\t\t\t\t\tdata\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tproductCustomFields( field, status = false, isTaxonomy ) {\n\t\t\t\tlet data = {\n\t\t\t\t\taction: 'woo_feed_custom_fields_status_change',\n\t\t\t\t\tnonce: wpf_ajax_obj.ajax.nonce,\n\t\t\t\t\tfield,\n\t\t\t\t\tstatus,\n\t\t\t\t\tisTaxonomy\n\t\t\t\t};\n\t\t\t\t$.ajax({\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\turl: wpf_ajax_obj.wpf_ajax_url,\n\t\t\t\t\tdata,\n\t\t\t\t\tsuccess: ( response ) => {\n\t\t\t\t\t\tif( response.success ) {\n\t\t\t\t\t\t\tthis.cacheClear();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconsole.log( response );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\t$(document).on('click', '.woofeed-custom-fields [id*=\"-switcher\"]', function () {\n\t\t\tlet field = $(this).attr( 'id' ).split( '-' )[0],\n\t\t\t\tisTaxonomy = $(this).data( 'taxonomy' ),\n\t\t\t\tstatus = $(this).prop( 'checked' );\n\t\t\tnew WooFeedCustomFields( field, status, isTaxonomy );\n\t\t});\n\n\t\t// Remove sticky cart on feature page\n\t\t$(document).ready(function() {\n\t\t\tvar s = $(\".wapk-feed-buy-now-container\");\n\t\t\tvar pos = s.position();\n\t\t\t$(window).scroll(function() {\n\t\t\t\tvar windowpos = $(window).scrollTop();\n\t\t\t\tif ( windowpos <= 5000 ) {\n\t\t\t\t\ts.addClass(\"fixed\");\n\t\t\t\t} else {\n\t\t\t\t\ts.removeClass(\"fixed\");\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t});\n\n\t$(document).on('click', '#woo-feed-debug-log-download', function (e) {\n\t\te.preventDefault();\n\t\t$(\"<a />\", {\n\t\t\tdownload: new Date() + \".log\",\n\t\t\thref: URL.createObjectURL(\n\t\t\t\tnew Blob([$(\"#woo-feed-debug-log\").val()], {\n\t\t\t\t\ttype: \"text/plain\"\n\t\t\t\t})),\n\t\t}).appendTo(\"body\")[0].click();\n\t});\n\n\t$(document).on('keyup', '#filename', function(e) {\n\t\tvar name = $('#filename').val();\n\t\t$('#utm_campaign').val(name);\n\t});\n\t// var providerVal = $('#category-mapping-form #providers').val();\n\t// console.log(providerVal)\n\t$(document).on('change', '#category-mapping-form #providers', function(e) {\n\t\tvar provider = $(this).find(':selected').val(),\n\t\t\tgoogleMap = ['google', 'facebook', 'pinterest', 'bing', 'bing_local_inventory', 'snapchat'];\n\t\tif( googleMap.indexOf(provider) !== -1 ) {\n\t\t\t$('input[id*=\"cat_mapping_\"]').css('display', 'none');\n\t\t\t$('.wf_default.wf_attributes').css('display', 'block').css('width', '100%');\n\t\t\t// $('#category-mapping-form .dashicons').css('display', 'block');\n\t\t} else {\n\t\t\t$('input[id*=\"cat_mapping_\"]').css('display', 'block');\n\t\t\t$('.wf_default.wf_attributes').css('display', 'none').css('width', '100%');\n\t\t\t// $('#category-mapping-form .dashicons').css('display', 'none');\n\t\t}\n\t});\n\n\t$(document).on('click', 'span[id*=\"cat-map-\"]', function(e) {\n\t\te.preventDefault();\n\t\tvar providerName = $('#category-mapping-form #providers').val(),\n\t\t\tgoogleMap = ['google', 'facebook', 'pinterest', 'bing', 'bing_local_inventory', 'snapchat'],\n\t\t\tcatId = $(this).attr('id').replace(/[^\\d.]/g, ''),\n\t\t\tgroupId = 'group-child-' + catId;\n\n\t\tif( googleMap.indexOf(providerName) !== -1) {\n\t\t\tvar catField = $(this).parents('tr').find('.selectized').val();\n\n\t\t\tif (catField) {\n\t\t\t\t$('.' + groupId).parents('tr').find('select').each(function (i, v) {\n\t\t\t\t\t$(v).data('selectize').setValue(catField);\n\t\t\t\t});\n\t\t\t}\n\n\t\t} else {\n\t\t\tvar value = $('#cat_mapping_'+catId).val();\n\t\t\t$('.'+groupId).parents('tr').find('input').val(value);\n\t\t}\n\n\t});\n\n})(jQuery, window, document, wp.ajax, wpf_ajax_obj);\n"]}
1
+ {"version":3,"sources":["woo-feed-admin.js"],"names":["_defineProperties","target","props","descriptor","i","_createClass","Constructor","protoProps","staticProps","prototype","window","wpAjax","self","prop","$","hasClass","currentTarget","clearTooltip","userAgent","actionMsg","match","actionKey","index","join","removeClass","removeAttr","addClass","elem","attr","msg","extend","_default","_args","merchantInfoCache","$copyBtn","feedGenerator","this","on","showTooltip","event","trigger","action","test","navigator","console","data","url","_classCallCheck","WooFeedCustomFields","productCustomFields","field","status","isTaxonomy","value","ajax","nonce","method","response","wpf_ajax_obj","wpf_ajax_url","clipboard","success","googleCategories","helper","haystack","sortable","onDrop","escape","text","ajax_fail","column_count","find","warn","wf_sortable","containerSelector","e","hasOwnProperty","opts","error","statusText","el","config","column","_onDrop","each","selectize_render_item","length","selectize","itemPath","itemSelector","create","concat","plugins","$item","container","group","options","draggedClass","bodyClass","render","item","split","map","s","placeholder","fancySelect","maxItemShow","form","replace","x","init","renderMerchantInfo","merchantInfo","document","jQuery","k","opt","feedType","r","types","html","t","trim","toLowerCase","na","disabled","val","in_array","renderMerchantTemplate","filter","contentSettings","feedForm","_loop","parent","is","tooltip","feedEditor","css","_regenerate","ClipboardJS","_feed","_current_btn","feed","_limit","generator","limit","_product_ids","_progress_per_batch","_refresh","isRegenerating","_all_btn","generate","condition","then","URLSearchParams","_color","preventDefault","_current_btn_label","_ajax_nonce","_log","_updateProgressStatus","message","key","regenerate","_block_button","product","setTimeout","_this2","_process_batch","_stopProgressBar","_progress","_current_batch","_total_batch","_resetProgressBar","post","_save_feed_file","fail","_get_product_ids","_unblock_button","refreshInterval","arguments","undefined","_timer","setInterval","update","table","show","color","width","wf","current_page_url_query","clip","_updateProgressBar","location","pagenow","attr_name","clearInterval","title","appendTo","remove","pageX","confirm","href","slideToggle","loader","tbody","hide","reload","button","status_area","select","execCommand","progress_message","current_attribute_value","fancyDataPicker","selectIf","price_attributes","selectKey","fancyOption","parents","includes","indexOf","outputSelect","urlParams","closest","row","del_confirm_multi","reindex_config_table","type","append","validate","valid","_ajax_clean_nonce","save","server","merchant","name","templateName","loading_tmpl","provider","send","merchantTemplateCache","outOfStockVisibilityRow","checked","valueColumn","attribute","preload","load","google_category","query","learn_more","cb","itemWrapper","wf_csv_txt","id","ready","windowpos","download","Date","URL","createObjectURL","Blob","click","googleMap","providerName","catId","wp"],"mappings":"yHAAA,SAAAA,kBAAAC,EAAAC,+BACA,IAAAC,EAAAD,EAAAE,kHADA,SAAAC,aAAAC,EAAAC,EAAAC,GAWI,OAFJD,GAAAP,kBAAAM,EAAAG,UAAAF,GARAC,GAAAE,kBAAAC,EAAAH,GAUIF,gFA0BYM,IAAAA,EAAAA,EAAAA,MADJC,EAAAD,gBAIC,IAAAA,EAAAA,KAAAC,GAHG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,GAwFpB/O,EAAAA,iBAtFoB,IAAA0P,EAAA1P,EAAA,qCAAAgH,MAICZ,EAAAxG,EAAAA,MAAAuG,KAAAA,MAAAyJ,QAAAhN,UAAAA,+BAvDDK,CAAAA,SAAAA,WAAAA,YAAAA,OAAAA,uBAAAA","file":"woo-feed-admin.min.js","sourcesContent":["// noinspection JSUnresolvedletiable\n/**!\n * WooFeed Scripts\n * @version 3.3.6\n * @package WooFeed\n * @copyright 2020 WebAppick\n *\n */\n/* global ajaxurl, wpAjax, postboxes, pagenow, alert, deleteUserSetting, typenow, adminpage, thousandsSeparator, decimalPoint, isRtl */\n// noinspection JSUnresolvedVariable\n(function($, window, document, wpAjax, opts) {\n \"use strict\";\n /**\n * All of the code for your admin-facing JavaScript source\n * should reside in this file.\n *\n * Note: It has been assumed you will write jQuery code here, so the\n * $ function reference has been prepared for usage within the scope\n * of this function.\n *\n * This enables you to define handlers, for when the DOM is ready:\n */\n\n /**\n * disable element utility\n *\n * @since 3.1.9\n *\n * @param {*} status\n * @returns {jQuery|HTMLElement}\n */\n $.fn.disabled = function(status) {\n $(this).each(function() {\n let self = $(this),\n prop = 'disabled';\n\n if (typeof self.prop(prop) !== 'undefined') {\n self.prop(prop, status === void 0 || status === true);\n } else {\n !0 === status ? self.addClass(prop) : self.removeClass(prop);\n }\n });\n return self; // method chaining\n };\n\n /**\n * Check if a HTMLElement or jQuery is disabled\n */\n $.fn.isDisabled = function() {\n let self = $(this),\n prop = 'disabled';\n return typeof self.prop(prop) !== 'undefined' ? self.prop(prop) : self.hasClass(prop);\n };\n\n /**\n * Clear Tooltip for clip board js\n * @param {Object} event\n */\n const clearTooltip = (event) => {\n $(event.currentTarget).removeClass( (index, className) => (className.match(/\\btooltipped-\\S+/g) || []).join(' ') ).removeClass('tooltipped').removeAttr('aria-label');\n };\n\n const showTooltip = (elem, msg) => {\n $(elem).addClass('tooltipped tooltipped-s').attr('aria-label', msg);\n };\n\n const fallbackMessage = (action) =>{\n let actionMsg,\n actionKey = action === 'cut' ? 'X' : 'C';\n\n if (/iPhone|iPad/i.test(navigator.userAgent)) {\n actionMsg = 'No support :(';\n } else if (/Mac/i.test(navigator.userAgent)) {\n actionMsg = 'Press ⌘-' + actionKey + ' to ' + action;\n } else {\n actionMsg = 'Press Ctrl-' + actionKey + ' to ' + action;\n }\n\n return actionMsg;\n };\n\n /**\n * Alias of jQuery.extend()\n * @param {Object} _default\n * @param {Object} _args\n */\n const extend = (_default, _args) => $.extend(true, {}, _default, _args);\n\n\t/*\n\t* Handles product attributes\n\t*\n\t* @since 4.4.18\n\t* */\n\tclass WooFeedCustomFields {\n\n\t\tconstructor( field, status, isTaxonomy ) {\n\t\t\tthis.productCustomFields( field, status, isTaxonomy );\n\t\t}\n\n\t\tcacheClear() {\n\t\t\tlet data = {\n\t\t\t\taction: 'woo_feed_product_attribute_cache_remove',\n\t\t\t\tnonce: wpf_ajax_obj.ajax.nonce,\n\t\t\t};\n\t\t\t$.ajax({\n\t\t\t\tmethod: 'POST',\n\t\t\t\turl: wpf_ajax_obj.wpf_ajax_url,\n\t\t\t\tdata\n\t\t\t});\n\t\t}\n\n\t\tproductCustomFields( field, status = false, isTaxonomy ) {\n\t\t\tlet data = {\n\t\t\t\taction: 'woo_feed_custom_fields_status_change',\n\t\t\t\tnonce: wpf_ajax_obj.ajax.nonce,\n\t\t\t\tfield,\n\t\t\t\tstatus,\n\t\t\t\tisTaxonomy\n\t\t\t};\n\t\t\t$.ajax({\n\t\t\t\tmethod: 'POST',\n\t\t\t\turl: wpf_ajax_obj.wpf_ajax_url,\n\t\t\t\tdata,\n\t\t\t\tsuccess: ( response ) => {\n\t\t\t\t\tif( response.success ) {\n\t\t\t\t\t\tthis.cacheClear();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.log( response );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n let $copyBtn,\n clipboard,\n googleCategories,\n helper = {\n in_array: (needle, haystack) => {\n try {\n return haystack.indexOf(needle) !== -1;\n } catch (e) {\n return false;\n }\n },\n selectize_render_item: (data, escape) => `<div class=\"item wapk-selectize-item\">${escape(data.value + ' ' + data.text)}</div>`, // phpcs:ignore WordPressVIPMinimum.JS.StringConcat.Found,\n ajax_fail: e => {\n console.warn(e);\n alert(e.hasOwnProperty('statusText') && e.hasOwnProperty('status') ? opts.ajax.error + '\\n' + e.statusText + ' (' + e.status + ')' : e);\n },\n /**\n * Initialize Sortable\n * @param {jQuery|HTMLElement} el\n * @param {object} config\n * @param {int|boolean} column\n * @param {function} onDrop\n * @return {jQuery|HTMLElement}\n */\n sortable: (el, config, column, onDrop) => {\n return (el || $('.sorted_table')).each(function() {\n let self = $(this),\n column_count = self.find('tbody > tr:eq(0) > td').length || column || 9;\n self.wf_sortable(extend({\n containerSelector: 'table',\n itemPath: '> tbody',\n itemSelector: 'tr',\n handle: 'i.wf_sortedtable',\n placeholder: `<tr class=\"placeholder\"><td colspan=\"${column_count}\"></td></tr>`,\n onDrop: ($item, container, _super, event) => {\n $item.removeClass(container.group.options.draggedClass).removeAttr('style');\n $(\"body\").removeClass(container.group.options.bodyClass);\n if ( onDrop && 'function' === typeof( onDrop ) ) {\n onDrop( $item, container, _super, event );\n }\n },\n }, config));\n });\n },\n selectize: (el, config) => {\n return (el || $('select.selectize')).not('.selectized').each(function() {\n let self = $(this);\n self.selectize(extend({\n create: self.data('create') || false,\n plugins: self.data('plugins') ? self.data('plugins').split(',').map(function(s) {\n return s.trim();\n }) : [],\n //['remove_button'],\n render: {\n item: helper.selectize_render_item\n }\n }, config));\n });\n },\n fancySelect: (el, config) => {\n return (el || $('select.fancySelect')).not('.FancySelectInit').each(function() {\n let self = $(this);\n self.fancySelect(extend({\n maxItemShow: 3\n }, config));\n });\n },\n reindex_config_table: () => {\n $('#table-1').find('tbody tr').each( ( x, el ) => {\n $(el).find('[name]').each( ( x1, el ) => {\n $(el).attr('name', $(el).attr('name').replace(/(\\[\\d\\])/g, `[${x}]`));\n } );\n } );\n },\n common: () => {\n helper.sortable( $('.sorted_table'), {}, 9, helper.reindex_config_table );\n helper.selectize();\n helper.fancySelect($('.outputType'));\n }\n },\n // helper functions\n feedEditor = {\n /**\n * The Editor Form Elem.\n * @type {jQuery|HTMLElement}\n */\n form: null,\n\n /**\n * Initialize The Feed Editor {Tabs...}\n * @returns {void}\n */\n init: function () {\n let self = this;\n self.form = $('.generateFeed');\n if (!self.form.length) return;\n helper.common();\n // noinspection JSUnresolvedVariable\n $(document).trigger(new jQuery.Event('feedEditor.init', {\n target: this.form\n }));\n },\n\n /**\n * Render Merchant info ajax response and handle allowed feed type for selected merchant\n * @param {jQuery|HTMLElement} merchantInfo jQuery dom object\n * @param {jQuery|HTMLElement} feedType jQuery dom object\n * @param {Object} r ajax response object\n */\n renderMerchantInfo: function (merchantInfo, feedType, r) {\n for (let k in r) {\n if (r.hasOwnProperty(k)) {\n merchantInfo.find('.merchant-info-section.' + k + ' .data').html(r[k]); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html\n\n if ('feed_file_type' === k) {\n (function() {\n let types = r[k].split(\",\").map(function(t) {\n return t.trim().toLowerCase();\n }).filter(function(t) {\n // noinspection JSUnresolvedVariable\n return t !== '' && t !== opts.na.toLowerCase();\n });\n\n if (types.length) {\n feedType.find('option').removeAttr('selected').each(function() {\n let opt = $(this);\n opt.val() && !helper.in_array(opt.val(), types) ? opt.disabled(!0) : opt.disabled(!1);\n });\n if (types.length === 1) feedType.find('option[value=\"' + types[0] + '\"]').attr('selected', 'selected');\n } else feedType.find('option').disabled(!1);\n })();\n }\n }\n }\n\n merchantInfo.find('.spinner').removeClass('is-active');\n feedType.disabled(!1);\n feedType.trigger('change');\n\n /**\n * Triggers after merchant configuration is fetched & loaded\n * */\n $(document).trigger('woo_feed_config_loaded');\n\n feedType.parent().find('.spinner').removeClass('is-active');\n },\n\n /**\n * Render Feed Template Tabs and settings while creating new feed.\n * @param {jQuery|HTMLElement} feedForm feed from query dom object\n * @param {object} r merchant template ajax response object\n */\n renderMerchantTemplate: function (feedForm, r) {\n let _loop = function _loop(k) {\n if (r.hasOwnProperty(k)) {\n if ('tabs' === k) {\n // noinspection JSUnresolvedFunction\n feedForm.html(r[k]); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.html\n } else {\n let contentSettings = $('[name=\"' + k + '\"]');\n\n if (contentSettings.length) {\n contentSettings.each(function() {\n let elem = $(this);\n\n if (elem.is('select')) {\n elem.find('[value=\"' + r[k] + '\"]').prop('selected', true);\n } else if ((elem.is('[type=checkbox]') || elem.is('[type=radio]')) && elem.val() === r[k]) {\n elem.prop('checked', true);\n } else {\n elem.val(r[k]); // type=text\n }\n }).trigger('change');\n }\n }\n }\n };\n\n for (let k in r) {\n _loop(k);\n }\n\n feedEditor.init();\n }\n },\n // Feed Editor Table\n merchantInfoCache = [],\n merchantTemplateCache = [],\n tooltip = () => {\n // Tooltip only Text\n $('.wfmasterTooltip')\n .hover(function () {\n // Hover over code\n let self = $(this), title = self.attr('wftitle');\n self.data('tipText', title).removeAttr('wftitle');\n $('<p class=\"wftooltip\"></p>').text(title).appendTo('body').fadeIn('slow');\n }, function () {\n // Hover out code\n let self = $(this);\n self.attr('wftitle', self.data('tipText'));\n $('.wftooltip').remove();\n })\n .mousemove(function (e) {\n $('.wftooltip').css({\n top: e.pageY + 10,\n left: e.pageX + 20\n });\n });\n },\n clip = () => {\n $copyBtn = $('.toClipboard');\n if (!ClipboardJS.isSupported() || /iPhone|iPad/i.test(navigator.userAgent)) {\n $copyBtn.find('img').hide(0);\n } else {\n $copyBtn.each(function() {\n $(this).on('mouseleave', clearTooltip).on('blur', clearTooltip);\n });\n clipboard = new ClipboardJS('.toClipboard');\n clipboard.on('error', function(event) {\n showTooltip(event.trigger, fallbackMessage(event.action));\n }).on('success', function(event) {\n showTooltip(event.trigger, 'Copied');\n });\n }\n };\n\n /**\n * Feed Generator Module\n */\n class feedGenerator {\n\n /**\n * Constructor\n * @constructor\n */\n constructor() {\n this._feed = opts.generator.feed; // wf_config+xxxx\n this._limit = opts.generator.limit;\n this._progress = 0;\n this._timer = null;\n this._color = false;\n // batch info\n this._total_batch = 0;\n this._current_batch = 0;\n this._product_ids = [];\n this._progress_per_batch = 0;\n this._refresh = true;\n // noinspection JSUnresolvedVariable\n this._regenerate = opts.generator.regenerate;\n window.isRegenerating = false;\n this._all_btn = $('.wpf_regenerate');\n this._current_btn = $(`#${this._feed.replace( 'wf_config', 'wf_feed_' )}`);\n this._current_btn_label = '';\n }\n\n /**\n * Init Hooks (Event)\n * @return {feedGenerator}\n */\n init() {\n let self = this;\n if ( '' !== this._feed && this._regenerate && false === window.isRegenerating ) {\n this.generate();\n }\n\n //thickbox body add feed plugin class to make it unique and custom style\n let current_page_query = window.location.search;\n let params = new URLSearchParams(current_page_query);\n let page_name = params.get(\"page\");\n if( \"webappick-manage-feeds\" === page_name ) {\n $('body').addClass('woo-import-popup-body');\n }\n\n $(document).on('click', '.woo-feed-campaign-close-button', function(event) {\n event.preventDefault();\n\n $(this).parent('.woo-feed-promotion').hide();\n let condition = $(this).data('condition');\n if(1 === condition) {\n wpAjax.post( 'woo_feed_hide_promotion', {\n _ajax_nonce: opts.nonce,\n condition: condition,\n } ).then( response => {\n self._log( response );\n } ).fail( error => {\n self._log( error );\n self._updateProgressStatus( error.message );\n self._color = 'red';\n } );\n }\n });\n\n $(document).on('click', '.wpf_regenerate', function(event) {\n event.preventDefault();\n self._current_btn = $( this );\n if( self._current_btn.hasClass('disabled') || window.isRegenerating === true ) return;\n self._feed = self._current_btn.attr('id').replace( 'wf_feed_', 'wf_config' );\n if( '' !== self._feed ) {\n self.generate();\n }\n });\n return this;\n }\n\n _block_button() {\n if ( this._all_btn.length ) {\n this._all_btn.addClass('disabled');\n }\n if ( this._current_btn.length ) {\n this._current_btn.find('span').addClass('wpf_spin reverse_spin');\n this._current_btn_label = this._current_btn.attr('title');\n // noinspection JSUnresolvedVariable\n this._current_btn.attr( 'aria-label', opts.regenerate ).attr( 'title', opts.regenerate );\n }\n }\n\n _unblock_button() {\n if ( this._all_btn.length ) {\n this._all_btn.removeClass('disabled');\n }\n if ( this._current_btn.length ) {\n this._current_btn.find('span').removeClass('wpf_spin');\n this._current_btn.find('span').removeClass('reverse_spin');\n this._current_btn.attr( 'aria-label', this._current_btn_label ).attr( 'title', this._current_btn_label );\n }\n }\n\n /**\n * Generate Feed\n * @return void\n */\n generate() {\n let self = this;\n window.isRegenerating = true;\n this._block_button();\n this._resetProgressBar();\n this._progressBarActive();\n this._log( 'Counting Total Products' );\n this._updateProgressStatus( 'Fetching products.' );\n this._get_product_ids().then( response => {\n this._progress = 10;\n self._log( {response} );\n if(response.success) {\n self._log( `Total ${response.total} Products found.` );\n self._product_ids = response.product;\n self._total_batch = this._product_ids.length;\n self._current_batch = 0;\n self._progress_per_batch = ( 90 - this._progress ) / this._total_batch;\n self._process_batch();\n self._updateProgressStatus( 'Processing Products...' );\n } else {\n self._updateProgressStatus( response.data.message );\n }\n }).fail( error => {\n self._log( error );\n self._updateProgressStatus( error.message );\n self._color = 'red';\n setTimeout( function(){\n self._stopProgressBar();\n self._unblock_button();\n }, 1500 );\n } );\n }\n\n /**\n * Get Product Ids\n * @returns {$.promise}\n * @private\n */\n _get_product_ids() {\n this._progress = 5;\n return wpAjax.post( 'get_product_information', {\n _ajax_nonce: opts.nonce,\n feed: this._feed,\n limit: this._limit,\n } );\n }\n\n /**\n * Run the Batch\n * @private\n */\n _process_batch() {\n let self = this;\n let status = `Processing Batch ${this._current_batch+1} of ${this._total_batch}`;\n this._updateProgressStatus( status );\n this._log( status );\n wpAjax.post( 'make_batch_feed', {\n _ajax_nonce: opts.nonce,\n feed: this._feed,\n products: this._product_ids[this._current_batch],\n loop: this._current_batch,\n } ).then( response => {\n self._current_batch++;\n self._log( `Batch ${self._current_batch} Completed` );\n self._log( response );\n if ( self._current_batch < self._total_batch ) {\n self._process_batch();\n self._progress += self._progress_per_batch;\n }\n if ( self._current_batch === self._total_batch ) {\n self._save_feed_file();\n }\n } ).fail( error => {\n self._log( error );\n self._updateProgressStatus( error.message );\n self._color = 'red';\n setTimeout( function(){\n self._stopProgressBar();\n self._unblock_button();\n }, 1500 );\n } );\n }\n\n /**\n * Save Feed Data from temp to feed file\n * @private\n */\n _save_feed_file() {\n let self = this;\n this._log( 'Saving feed file' );\n this._updateProgressStatus( 'Saving feed file' );\n wpAjax.post( 'save_feed_file', {\n _ajax_nonce: opts.nonce,\n feed: this._feed,\n } ).then( response => {\n self._log( response );\n self._progress = 100;\n if ( self._refresh ) {\n window.location.href = `${opts.pages.list.feed}&link=${response.url}&cat=${response.cat}`;\n }\n setTimeout( function(){\n self._stopProgressBar();\n setTimeout( function(){\n self._resetProgressBar( true );\n self._unblock_button();\n }, 3000 );\n }, 2500 );\n } ).fail( error => {\n self._log( error );\n self._updateProgressStatus( error.message );\n self._color = 'red';\n setTimeout( function(){\n self._stopProgressBar();\n self._unblock_button();\n }, 1500 );\n } );\n }\n\n /**\n * Console log wrapper with debug settings.\n * @param data\n * @returns {feedGenerator}\n * @private\n */\n _log( data ) {\n // noinspection JSUnresolvedVariable\n if ( opts.wpf_debug ) {\n console.log( data );\n }\n return this;\n }\n\n /**\n * Run the progressbar refresh interval\n * @param {int} refreshInterval\n * @returns {feedGenerator}\n * @private\n */\n _progressBarActive( refreshInterval = 0 ) {\n let self = this;\n this._toggleProgressBar( true );\n this._timer = setInterval( function(){\n self._updateProgressBar();\n }, refreshInterval || 1000 );\n return this;\n }\n\n /**\n * Stop Progressbar\n * @returns {feedGenerator}\n * @private\n */\n _stopProgressBar() {\n clearInterval( this._timer );\n return this;\n }\n\n /**\n * Reset Progressbar\n * @returns {feedGenerator}\n * @private\n */\n _resetProgressBar( update ) {\n this._toggleProgressBar( false );\n this._updateProgressStatus( '' );\n clearInterval( this._timer );\n this._color = false;\n this._timer = null;\n this._progress = 0;\n if ( update ) {\n this._updateProgressBar();\n }\n return this;\n }\n\n /**\n * Show hide the progress bar el\n * @param status\n * @returns {feedGenerator}\n * @private\n */\n _toggleProgressBar( status ) {\n let table = $('#feed_progress_table');\n if ( status ) {\n table.show();\n } else {\n table.hide();\n }\n return this;\n }\n\n /**\n * Update Progress bar text status\n * @param {string} status\n * @returns {feedGenerator}\n * @private\n */\n _updateProgressStatus( status ) {\n $( '.feed-progress-status' ).text( status );\n return this;\n }\n\n _getErrorMessageByCode( error ){\n let progress_message = $( '.feed-progress-status' );\n progress_message.css( {'color':this._color});\n $( '.feed-progress-percentage' ).css( {'color':this._color});\n $( '.wpf_spin' ).css( {'color':this._color});\n\n let message=error.status +' : '+ error.statusText+'. ';\n if(500===error.status){\n message+= \"Please increase your PHP max_execution_time. Please <a target='_blank' href='https://webappick.com/docs/woo-feed/faq-for-woocommerce-product-feed/how-to-solve-processing-10-feed-generation-stuck-error/'>read this doc</a>.\";\n }\n\n this._updateProgressStatus(message);\n\n }\n\n /**\n * Update Progress Data\n * hooked with setInterval\n * @private\n */\n _updateProgressBar() {\n let percentage = $( '.feed-progress-percentage' ),\n bar = $( '.feed-progress-bar-fill' ),\n _progress = `${Math.round( this._progress )}%`;\n bar.css( {\n width: _progress,\n } );\n percentage.text( _progress );\n }\n }\n // expose to the global scope\n window.wf = {\n helper: helper,\n feedEditor: feedEditor,\n generator: feedGenerator,\n };\n\n $(window).on('load', function() {\n // Template loading ui conflict\n if ($(location).attr(\"href\").match(/webappick.*feed/g) !== null) {\n $('#wpbody-content').addClass('woofeed-body-content');\n }\n\n // on edit page show item wrapper dropdown\n let current_page_url_query = window.location.search;\n let urlParams = new URLSearchParams(current_page_url_query);\n let page_action = urlParams.get('action');\n\n // ClipBoardJS\n clip();\n // postbox toggle\n postboxes.add_postbox_toggles(pagenow);\n // initialize generator\n let generator = new feedGenerator();\n generator.init();\n // noinspection JSUnresolvedVariable\n if( '' !== opts.generator.feed && opts.generator.regenerate ) {\n\n }\n // initialize editor\n feedEditor.init();\n helper.common(); // Generate Feed Add Table Row\n tooltip();\n // validate feed editor\n $(\".generateFeed\").validate();\n\n // document events\n $(document)\n .on('blur', 'input[name=\"wfDAttributeName\"]', function(e) {\n e.preventDefault();\n let attr_name = $(this).val();\n attr_name = attr_name.toLowerCase();\n attr_name = attr_name.split(' ').join('_');\n\n $('#wfDAttributeCode').val(attr_name);\n\n })\n .on('click', '[data-toggle_slide]', function(e) {\n e.preventDefault();\n $($(this).data('toggle_slide')).slideToggle('fast');\n })\n // XML Feed Wrapper\n .on('click', '#wf_newRow', function () {\n let tbody = $('#table-1 tbody'),\n template = $('#feed_config_template').text().trim().replace(/__idx__/g, tbody.find('tr').length);\n tbody.append(template);\n helper.fancySelect($('.outputType'));\n })\n // feed delete alert.\n .on('click', '.single-feed-delete', function (event) {\n event.preventDefault();\n // noinspection JSUnresolvedVariable\n if (confirm(opts.form.del_confirm)) {\n window.location.href = $(this).attr('val');\n }\n })\n // clear cache data.\n .on('click', '.wf_clean_cache_wrapper', function(event) {\n event.preventDefault();\n var nonce = $('.woo-feed-clean-cache-nonce').val();\n var loader = $('.woo-feed-cache-loader');\n\n //show loader\n loader.show();\n\n // passed cache nonce\n wpAjax.post('clear_cache_data', {\n _ajax_clean_nonce: nonce\n }).then(function (response) {\n if( response.success ) {\n loader.hide(); //hide loader\n location.reload();\n }\n }).fail(function (e) {\n console.log('something wrong');\n });\n\n })// Copy Status\n .on('click', '#woo-feed-copy-status-btn', function(event) {\n event.preventDefault();\n let button = $('#woo-feed-copy-status-btn');\n let status_area = $('#woo-feed-status-area');\n button.val('Copied');\n status_area.css('visibility','visible');\n status_area.select();\n\n document.execCommand('copy');\n })\n // feed value dropdown change.\n .on('change', '.wf_attr.wf_attributes', function(event) {\n event.preventDefault();\n\n $('.fancy-picker-picked').trigger(\"click\"); // trigger fancy select box clicked\n\n // price attributes\n var price_attributes = ['price', 'current_price', 'sale_price', 'price_with_tax', 'current_price_with_tax', 'sale_price_with_tax', 'shipping_cost'];\n // current value\n var current_attribute_value = $(this).val();\n var outputSelect = $(this).parents('tr').find('.outputType');\n var fancyOption = $(this).parents('tr').find('.fancy-picker-content .fancy-picker-option');\n var fancyDataPicker = $(this).parents('tr').find('.fancy-picker-data span');\n var selectIf, selectKey;\n\n // when any attribute is selected, pick the key\n if( price_attributes.includes(current_attribute_value) ) {\n // when select any price attribute\n selectIf = 'for_price';\n selectKey = \"Price\";\n } else if ( \"\" !== current_attribute_value && -1 !== current_attribute_value.indexOf('wf_taxo') ) {\n\n // when select any custom taxonomy\n selectIf = 'for_custom_taxo';\n selectKey = \"parent_if_empty\";\n } else {\n\n selectIf = 'for_all';\n selectKey = 'Default';\n }\n\n // remove selected class from old selected option\n fancyOption.removeClass('selected');\n\n // when value dropdown is selected as price or any custom taxonomy\n if( selectIf === 'for_custom_taxo' || selectIf === 'for_price' ) {\n\n // update \"Option Type\" when select key matches\n fancyOption.each(function(item) {\n if( selectKey === $(this).text() ) {\n $(this).addClass('selected');\n fancyDataPicker.text(selectKey);\n outputSelect.find(\"option\").text(selectKey);\n outputSelect.find(\"option\").val( $(this).data('value') );\n }\n });\n }\n\n })\n // bulk delete alert.\n .on('click', '#doaction, #doaction2', function () {\n // noinspection JSUnresolvedVariable\n return confirm(opts.form.del_confirm_multi);\n })\n // Generate Feed Table Row Delete\n .on('change', '.dType', function () {\n let self = $(this),\n type = self.val(),\n row = self.closest('tr');\n\n if (type === 'pattern') {\n row.find('.value_attribute').hide();\n row.find('.value_pattern').show();\n } else if (type === 'attribute') {\n row.find('.value_attribute').show();\n row.find('.value_pattern').hide();\n } else if (type === 'remove') {\n row.find('.value_attribute').hide();\n row.find('.value_pattern').hide();\n }\n })\n // Generate Feed Form Submit\n .on('click', '.delRow', function (e) {\n e.preventDefault();\n $(this).closest('tr').remove();\n helper.reindex_config_table();\n })\n .on('submit', '#generateFeed', function () {\n // Feed Generating form validation\n $(this).validate();\n\n if ($(this).valid()) {\n $(\".makeFeedResponse\")\n .show()\n .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\n }\n })\n // Generate Update Feed Form Submit\n .on('submit', '#updatefeed', function (e, data) {\n // Feed Generating form validation\n $(this).validate();\n\n if ($(this).valid()) {\n $(\".makeFeedResponse\")\n .show()\n .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\n }\n })\n .on( 'ready woo_feed_config_loaded', function(){\n\n if( $('#ftpenabled').val() == 0 ){\n $('.google-merchant-message').hide('slow');\n $('.woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) input, .woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) select').attr('disabled','disabled');\n } else {\n if( $('#provider').val() === 'google' ) {\n $('.google-merchant-message').show('slow');\n } else {\n $('.google-merchant-message').hide('slow');\n }\n $('.woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) input, .woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) select').removeAttr('disabled');\n }\n\n $('#ftpenabled').on('change', function(){\n if( $('#ftpenabled').val() == 0 ){\n $('.google-merchant-message').hide('slow');\n $('.woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) input, .woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) select').attr('disabled','disabled');\n } else {\n\n $('.woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) input, .woo-feed-ftp .ftpconfig tr:not(.ftpcontroller) select').removeAttr('disabled');\n\n // Google merchant specific message\n if( $('#provider').val() === 'google' ){\n $('.google-merchant-message').show('slow');\n } else {\n $('.google-merchant-message').hide('slow');\n }\n\n }\n });\n })\n .on('change', '.ftporsftp', function () {\n let server = $(this).val(),\n status = $('.ssh2_status');\n\n if (server === 'sftp') {\n // noinspection JSUnresolvedVariable\n status.show().css('color', 'dodgerblue').text(opts.form.sftp_checking);\n wpAjax.post('get_ssh2_status', {\n _ajax_nonce: opts.nonce,\n server: server\n }).then(function (response) {\n if (response === 'exists') {\n // noinspection JSUnresolvedVariable\n status.css('color', '#2CC185').text(opts.form.sftp_available);\n setTimeout(function () {\n status.hide();\n }, 1500);\n } else {\n // noinspection JSUnresolvedVariable\n status.show().css('color', 'red').text(opts.form.sftp_warning);\n }\n }).fail(function (e) {\n status.hide();\n helper.ajax_fail(e);\n });\n } else {\n status.hide();\n }\n })\n .on('click', '[name=\"save_feed_config\"]', function (e) {\n e.preventDefault();\n $('#updatefeed').trigger('submit', {\n save: true\n });\n })\n .on('change', '#provider', function (event) {\n event.preventDefault();\n\n let merchant = $(this).val(),\n templateName = $(this).find(':selected').text(),\n name = $('#filename').val(),\n feedType = $(\"#feedType\"),\n feedForm = $(\"#providerPage\"),\n merchantInfo = $('#feed_merchant_info'); // set loading..\n\n // noinspection JSUnresolvedVariable\n feedForm.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\n\n merchantInfo.find('.spinner').addClass('is-active');\n feedType.disabled(!0); // disable dropdown\n\n feedType.parent().find('.spinner').addClass('is-active');\n merchantInfo.find('.merchant-info-section .data').html(''); // remove previous data\n // Get Merchant info for selected Provider/Merchant\n\n if (merchantInfoCache.hasOwnProperty(merchant)) {\n feedEditor.renderMerchantInfo(merchantInfo, feedType, merchantInfoCache[merchant]);\n\n /**\n * Triggers after merchant configuration is fetched & loaded\n * */\n $(document).trigger('woo_feed_config_loaded');\n\n } else {\n wpAjax.send('woo_feed_get_merchant_info', {\n type: 'GET',\n data: {\n nonce: opts.nonce,\n provider: merchant,\n templateName: templateName\n }\n }).then(function (r) {\n merchantInfoCache[merchant] = r;\n feedEditor.renderMerchantInfo(merchantInfo, feedType, r);\n }).then(function(){\n\n /**\n * Triggers after merchant configuration is fetched & loaded\n * */\n $(document).trigger('woo_feed_config_loaded');\n\n }).fail(helper.ajax_fail);\n } // Get FeedForm For Selected Provider/Merchant\n\n\n if (merchantTemplateCache.hasOwnProperty(merchant)) {\n feedEditor.renderMerchantTemplate(feedForm, merchantTemplateCache[merchant]);\n\n /**\n * Triggers after merchant configuration is fetched & loaded\n * */\n $(document).trigger('woo_feed_config_loaded');\n\n } else {\n wpAjax.post('get_feed_merchant', {\n _ajax_nonce: opts.nonce,\n merchant: merchant\n }).then(function (r) {\n merchantTemplateCache[merchant] = r;\n feedEditor.renderMerchantTemplate(feedForm, r);\n $('#utm_source').val(templateName);\n $('#utm_campaign').val(name);\n //when merchant is bing, change delimiter and enclosure\n if( 'bing' === merchant ) {\n //delimiter value\n $(\"#delimiter option\").removeAttr('selected');\n $(\"#delimiter option[value=\\\"tab\\\"]\").attr('selected', 'selected');\n\n //enclosure value\n $(\"#enclosure option\").removeAttr('selected');\n $(\"#enclosure option[value=\\\" \\\"]\").attr('selected', 'selected');\n }\n\n //reviewer options hide\n if( 'google_product_review' !== merchant) {\n $('.wf_attributes option[value=\"reviewer_name\"]').hide();\n }\n }).then(function(){\n\n /**\n * Triggers after merchant configuration is fetched & loaded\n * */\n $(document).trigger('woo_feed_config_loaded');\n\n }).fail(helper.ajax_fail);\n }\n })\n // Feed Active and Inactive status change via ajax\n .on('change', '.woo_feed_status_input', function () {\n let self = $(this);\n wpAjax.post('update_feed_status', {\n _ajax_nonce: opts.nonce,\n feedName: self.val(),\n status: self[0].checked ? 1 : 0\n });\n });\n // event with trigger\n $(document)\n .on('change', '[name=\"is_outOfStock\"], [name=\"product_visibility\"]', function () {\n let outOfStockVisibilityRow = $('.out-of-stock-visibility');\n if ($('[name=\"is_outOfStock\"]:checked').val() === 'n' && $('[name=\"product_visibility\"]:checked').val() === '1') {\n outOfStockVisibilityRow.show();\n } else {\n outOfStockVisibilityRow.hide();\n }\n })\n .on('change', '.attr_type', function () {\n // Attribute type selection\n let self = $(this),\n type = self.val(),\n row = self.closest('tr');\n\n if (type === 'pattern') {\n row.find('.wf_attr').hide();\n row.find('.wf_attr').val('');\n row.find('.wf_default').show();\n } else {\n row.find('.wf_attr').show();\n row.find('.wf_default').hide();\n row.find('.wf_default').val('');\n }\n })\n .on('change', '.wf_mattributes, .attr_type', function () {\n let row = $(this).closest('tr'),\n attribute = row.find('.wf_mattributes'),\n type = row.find('.attr_type'),\n valueColumn = row.find('td:eq(4)'),\n provider = $('#provider').val();\n\n // noinspection JSUnresolvedVariable\n if (opts.form.google_category.hasOwnProperty(attribute.val()) && type.val() === 'pattern' && helper.in_array(provider, opts.form.google_category[attribute.val()])) {\n if (valueColumn.find('select.selectize').length === 0) {\n valueColumn.find('input.wf_default').remove();\n valueColumn.append('<span class=\"wf_default wf_attributes\"><select name=\"default[]\" class=\"selectize\"></select></span>');\n // noinspection JSUnresolvedVariable\n valueColumn.append(`<span style=\"font-size:x-small;\"><a style=\"color: red\" href=\"https://webappick.com/docs/woo-feed/feed-configuration/how-to-map-store-category-with-merchant-category/\" target=\"_blank\">${opts.learn_more}</a></span>`);\n\n if (!googleCategories) {\n valueColumn.append('<span class=\"spinner is-active\" style=\"margin: 0;\"></span>');\n }\n\n let select = valueColumn.find('.wf_attributes select');\n // noinspection JSUnresolvedVariable\n helper.selectize(select, {\n preload: true,\n placeholder: opts.form.select_category,\n load: function load(query, cb) {\n if (!googleCategories) {\n wpAjax.send('get_google_categories', {\n type: 'GET',\n data: {\n _ajax_nonce: opts.nonce,\n action: \"get_google_categories\",\n provider: provider\n }\n }).then(function (r) {\n googleCategories = r;\n cb(googleCategories);\n valueColumn.find('.spinner').remove();\n }).fail(helper.ajax_fail);\n } else {\n cb(googleCategories);\n }\n }\n });\n }\n } else {\n if (attribute.val() !== 'current_category' && valueColumn.find('input.wf_default').length === 0) {\n valueColumn.find('span').remove();\n valueColumn.append('<input autocomplete=\"off\" class=\"wf_default wf_attributes\" type=\"text\" name=\"default[]\" value=\"\">');\n\n if (type.val() !== 'pattern') {\n valueColumn.find('input.wf_default').hide();\n }\n }\n }\n })\n .on('change', '#feedType,#provider', function (e) {\n let type = $('#feedType').val(),\n provider = $('#provider').val(),\n itemWrapper = $('.itemWrapper'),\n wf_csv_txt = $('.wf_csvtxt');\n\n // noinspection JSUnresolvedVariable\n if (type !== '' && helper.in_array(provider, opts.form.item_wrapper_hidden)) {\n itemWrapper.hide();\n }\n\n //when feed type is changed\n if( 'feedType' === e.target.id ) {\n if (type === 'csv' || type === 'txt' || type === 'tsv') {\n itemWrapper.hide();\n wf_csv_txt.show();\n\n if( 'tsv' === type ) {\n $('#delimiter option:last').prop(\"selected\", \"selected\");\n } else if( 'csv' === type ) {\n $('#delimiter option:first').prop(\"selected\", \"selected\");\n }\n } else if( type === 'xml' ) {\n itemWrapper.show();\n wf_csv_txt.hide();\n }\n }\n\n })\n .trigger('change');\n\n\n $(document)\n\t\t\t.on('click', '.woofeed-custom-fields [id*=\"-switcher\"]', function () {\n\t\t\t\tlet field = $(this).attr( 'id' ).split( '-' )[0],\n\t\t\t\t\tisTaxonomy = $(this).data( 'taxonomy' ),\n\t\t\t\t\tstatus = $(this).prop( 'checked' );\n\t\t\t\tnew WooFeedCustomFields( field, status, isTaxonomy );\n\t\t\t})\n\n\t\t\t// Remove sticky cart on feature page\n\t\t\t.ready(function() {\n\t\t\t\tvar s = $(\".wapk-feed-buy-now-container\");\n\t\t\t\tvar pos = s.position();\n\t\t\t\t$(window).scroll(function() {\n\t\t\t\t\tvar windowpos = $(window).scrollTop();\n\t\t\t\t\tif ( windowpos <= 5000 ) {\n\t\t\t\t\t\ts.addClass(\"fixed\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\ts.removeClass(\"fixed\");\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n });\n\n $(document)\n\t\t.on('click', '#woo-feed-debug-log-download', function (e) {\n\t\t\te.preventDefault();\n\t\t\t$(\"<a />\", {\n\t\t\t\tdownload: new Date() + \".log\",\n\t\t\t\thref: URL.createObjectURL(\n\t\t\t\t\tnew Blob([$(\"#woo-feed-debug-log\").val()], {\n\t\t\t\t\t\ttype: \"text/plain\"\n\t\t\t\t\t})),\n\t\t\t}).appendTo(\"body\")[0].click();\n\t\t})\n\t\t.on('keyup', '#filename', function(e) {\n\t\t\tvar name = $('#filename').val();\n\t\t\t$('#utm_campaign').val(name);\n\t\t})\n\t\t// var providerVal = $('#category-mapping-form #providers').val();\n\t\t// console.log(providerVal)\n\t\t.on('change', '#category-mapping-form #providers', function(e) {\n\t\t\tvar provider = $(this).find(':selected').val(),\n\t\t\t\tgoogleMap = ['google', 'facebook', 'pinterest', 'bing', 'bing_local_inventory', 'snapchat'];\n\t\t\tif( googleMap.indexOf(provider) !== -1 ) {\n\t\t\t\t$('input[id*=\"cat_mapping_\"]').css('display', 'none');\n\t\t\t\t$('.wf_default.wf_attributes').css('display', 'block').css('width', '100%');\n\t\t\t\t// $('#category-mapping-form .dashicons').css('display', 'block');\n\t\t\t} else {\n\t\t\t\t$('input[id*=\"cat_mapping_\"]').css('display', 'block');\n\t\t\t\t$('.wf_default.wf_attributes').css('display', 'none').css('width', '100%');\n\t\t\t\t// $('#category-mapping-form .dashicons').css('display', 'none');\n\t\t\t}\n\t\t})\n\t\t.on('click', 'span[id*=\"cat-map-\"]', function(e) {\n\t\t\te.preventDefault();\n\t\t\tvar providerName = $('#category-mapping-form #providers').val(),\n\t\t\t\tgoogleMap = ['google', 'facebook', 'pinterest', 'bing', 'bing_local_inventory', 'snapchat'],\n\t\t\t\tcatId = $(this).attr('id').replace(/[^\\d.]/g, ''),\n\t\t\t\tgroupId = 'group-child-' + catId;\n\n\t\t\tif( googleMap.indexOf(providerName) !== -1) {\n\t\t\t\tvar catField = $(this).parents('tr').find('.selectized').val();\n\n\t\t\t\tif (catField) {\n\t\t\t\t\t$('.' + groupId).parents('tr').find('select').each(function (i, v) {\n\t\t\t\t\t\t$(v).data('selectize').setValue(catField);\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tvar value = $('#cat_mapping_'+catId).val();\n\t\t\t\t$('.'+groupId).parents('tr').find('input').val(value);\n\t\t\t}\n\n\t\t});\n\n})(jQuery, window, document, wp.ajax, wpf_ajax_obj);\n"]}
admin/partials/templates/pinterest_rss.txt ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
3
+ <channel>
4
+ <title><![CDATA[ {BlogName} ]]></title>
5
+ <link><![CDATA[ {BlogURL} ]]></link>
6
+ <description><![CDATA[ {BlogDescription} ]]></description>
7
+ <lastBuildDate>{DateTimeNow}</lastBuildDate>
8
+ {separator}
9
+
10
+ </channel>
11
+ </rss>
includes/classes/class-woo-feed-admin-message.php CHANGED
@@ -107,7 +107,7 @@ final class Woo_Feed_Message {
107
  'utm_term' => 'wooFeed',
108
  );
109
  }
110
- $doc_link = add_query_arg( $utm_links, 'https://webappick.com/docs/woo-feed/' );
111
  $support_link = 'https://wordpress.org/support/plugin/webappick-product-feed-for-woocommerce/';
112
  ?>
113
  <table class="wf-info-table widefat fixed">
107
  'utm_term' => 'wooFeed',
108
  );
109
  }
110
+ $doc_link = add_query_arg( $utm_links, 'https://webappick.com/docs/' );
111
  $support_link = 'https://wordpress.org/support/plugin/webappick-product-feed-for-woocommerce/';
112
  ?>
113
  <table class="wf-info-table widefat fixed">
includes/classes/class-woo-feed-default-attributes.php CHANGED
@@ -862,6 +862,8 @@ class Woo_Feed_Default_Attributes {
862
  'description' => 'Product Description[description]',
863
  'link' => 'Product URL[link]',
864
  'image' => 'Main Image[image]',
 
 
865
  '---1' => '',
866
 
867
  );
862
  'description' => 'Product Description[description]',
863
  'link' => 'Product URL[link]',
864
  'image' => 'Main Image[image]',
865
+ 'pubDate' => 'Publish Date[pubDate]',
866
+ 'guid' => 'GUID[guid]',
867
  '---1' => '',
868
 
869
  );
includes/classes/class-woo-feed-products-v3.php CHANGED
@@ -1288,7 +1288,7 @@ class Woo_Feed_Products_v3
1288
  $txt = explode('{separator}', $txt);
1289
  if (2 === count($txt)) {
1290
  $this->xml_wrapper['header'] = trim($txt[0]);
1291
- $this->xml_wrapper['footer'] = trim($txt[1]);
1292
  }
1293
  }
1294
 
@@ -1298,10 +1298,13 @@ class Woo_Feed_Products_v3
1298
 
1299
  // replace template variables.
1300
  $datetime_now = date('Y-m-d H:i:s', strtotime(current_time('mysql'))); // {DateTimeNow}
 
 
 
1301
  $blog_name = get_bloginfo('name'); // {BlogName}
1302
  $blog_url = get_bloginfo('url'); // {BlogURL}
1303
  //$blog_desc = get_bloginfo('description'); // {BlogDescription}
1304
- $blog_desc = "CTX Feed - This product feed is generated with the CTX Feed - WooCommerce Product Feed Generator plugin by WebAppick.com. For all your support questions check out our plugin Docs on https://webappick.com/docs or e-mail to: support@webappick.com"; // {BlogDescription}
1305
  $blog_email = get_bloginfo('admin_email'); // {BlogEmail}
1306
 
1307
  $this->xml_wrapper['header'] = str_replace(
1288
  $txt = explode('{separator}', $txt);
1289
  if (2 === count($txt)) {
1290
  $this->xml_wrapper['header'] = trim($txt[0]);
1291
+ $this->xml_wrapper['footer'] = "\n".trim($txt[1]);
1292
  }
1293
  }
1294
 
1298
 
1299
  // replace template variables.
1300
  $datetime_now = date('Y-m-d H:i:s', strtotime(current_time('mysql'))); // {DateTimeNow}
1301
+ if('pinterest_rss'===$this->config['provider']){ // DATE_RFC822 date format for pinterest rss feed
1302
+ $datetime_now = date('r', strtotime(current_time('mysql'))); // {DateTimeNow}
1303
+ }
1304
  $blog_name = get_bloginfo('name'); // {BlogName}
1305
  $blog_url = get_bloginfo('url'); // {BlogURL}
1306
  //$blog_desc = get_bloginfo('description'); // {BlogDescription}
1307
+ $blog_desc = "CTX Feed - This product feed is generated with the CTX Feed - WooCommerce Product Feed Manager plugin by WebAppick.com. For all your support questions check out our plugin Docs on https://webappick.com/docs or e-mail to: support@webappick.com"; // {BlogDescription}
1308
  $blog_email = get_bloginfo('admin_email'); // {BlogEmail}
1309
 
1310
  $this->xml_wrapper['header'] = str_replace(
includes/helper.php CHANGED
@@ -5471,6 +5471,26 @@ if (!function_exists('woo_feed_spartoo_attribute_value_modify')) {
5471
  return $attribute_value;
5472
  }
5473
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5474
  #==== MERCHANT TEMPLATE OVERRIDE END ================#
5475
 
5476
  // Including pluggable functions file
5471
  return $attribute_value;
5472
  }
5473
  }
5474
+
5475
+ if (!function_exists('woo_feed_get_pinterest_rss_date_attribute_callback')) {
5476
+ /**
5477
+ * Convert date format to DATERFC822 for pinterest RSS Feed.
5478
+ *
5479
+ * @param $attribute_value
5480
+ * @param $product
5481
+ * @param $feed_config
5482
+ *
5483
+ * @return string
5484
+ */
5485
+ function woo_feed_get_pinterest_rss_date_attribute_callback($attribute_value, $product, $feed_config)
5486
+ {
5487
+ if(!empty($attribute_value)){
5488
+ return date('r', strtotime($attribute_value));
5489
+ }
5490
+ return $attribute_value;
5491
+ }
5492
+ }
5493
+
5494
  #==== MERCHANT TEMPLATE OVERRIDE END ================#
5495
 
5496
  // Including pluggable functions file
includes/hooks.php CHANGED
@@ -61,11 +61,13 @@ add_action("admin_init", 'woo_feed_exclude_feed_from_hyper_cache', 10, 0);//Cach
61
 
62
 
63
  #==== MERCHANT TEMPLATE OVERRIDE START ==============
64
- add_filter( 'woo_feed_get_attribute', 'woo_feed_modify_google_color_attribute_value', 10, 4 );
65
- add_filter( 'woo_feed_get_weight_attribute', 'woo_feed_modify_weight_attribute_value', 10, 3 );
66
- add_filter( 'woo_feed_get_bestprice_product_type_attribute', 'woo_feed_get_bestprice_categoryPath_attribute_value_modify', 10, 3 );
67
- add_filter( 'woo_feed_get_availability_attribute', 'woo_feed_availability_attribute_value_modify', 10, 3 );
68
- add_filter( 'woo_feed_get_type_attribute', 'woo_feed_spartoo_attribute_value_modify', 10, 3 );
 
 
69
  #==== MERCHANT TEMPLATE OVERRIDE END ================
70
 
71
  // End of file hooks.php.
61
 
62
 
63
  #==== MERCHANT TEMPLATE OVERRIDE START ==============
64
+ add_filter( 'woo_feed_get_attribute', 'woo_feed_modify_google_color_attribute_value', 9, 4 );
65
+ add_filter( 'woo_feed_get_weight_attribute', 'woo_feed_modify_weight_attribute_value', 9, 3 );
66
+ add_filter( 'woo_feed_get_bestprice_product_type_attribute', 'woo_feed_get_bestprice_categoryPath_attribute_value_modify', 9, 3 );
67
+ add_filter( 'woo_feed_get_availability_attribute', 'woo_feed_availability_attribute_value_modify', 9, 3 );
68
+ add_filter( 'woo_feed_get_type_attribute', 'woo_feed_spartoo_attribute_value_modify', 9, 3 );
69
+ add_filter( 'woo_feed_get_pinterest_rss_date_created_attribute', 'woo_feed_get_pinterest_rss_date_attribute_callback', 9, 3 );
70
+ add_filter( 'woo_feed_get_pinterest_rss_date_updated_attribute', 'woo_feed_get_pinterest_rss_date_attribute_callback', 9, 3 );
71
  #==== MERCHANT TEMPLATE OVERRIDE END ================
72
 
73
  // End of file hooks.php.
includes/template-configs.php CHANGED
@@ -70,14 +70,14 @@ return array(
70
  'limit' => array('','','','','','','','','','','','','','','','','','','','',),
71
  ),
72
  'pinterest_rss' => array(
73
- 'mattributes' => array('title','description','link','image',),
74
- 'prefix' => array('','','','',),
75
- 'type' => array('attribute','attribute','attribute','attribute',),
76
- 'attributes' => array('title','description','link','image',),
77
- 'default' => array('','','','',),
78
- 'suffix' => array('','','','',),
79
- 'output_type' => array('1','1','1','1',),
80
- 'limit' => array('','','','',),
81
  ),
82
  'bol' => array(
83
  'mattributes' => array(
70
  'limit' => array('','','','','','','','','','','','','','','','','','','','',),
71
  ),
72
  'pinterest_rss' => array(
73
+ 'mattributes' => array('title','description','link','image','pubDate','guid',),
74
+ 'prefix' => array('','','','','','',),
75
+ 'type' => array('attribute','attribute','attribute','attribute','attribute','attribute',),
76
+ 'attributes' => array('title','description','link','image','date_created','link',),
77
+ 'default' => array('','','','','','',),
78
+ 'suffix' => array('','','','','','',),
79
+ 'output_type' => array('1','1','1','1','1','1',),
80
+ 'limit' => array('','','','','','',),
81
  ),
82
  'bol' => array(
83
  'mattributes' => array(
languages/woo-feed.pot CHANGED
@@ -12,35 +12,35 @@ msgstr ""
12
  "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
13
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
14
 
15
- #: woo-feed.php:248, woo-feed.php:368, woo-feed.php:443, woo-feed.php:799, woo-feed.php:839, woo-feed.php:859, woo-feed.php:885
16
  msgid "Unauthorized Action."
17
  msgstr ""
18
 
19
- #: woo-feed.php:253, woo-feed.php:372, includes/helper.php:1870, includes/classes/class-woo-feed-webappick-api.php:427, includes/classes/class-woo-feed-webappick-api.php:451
20
  msgid "Invalid Request."
21
  msgstr ""
22
 
23
- #: woo-feed.php:326
24
  msgid "Failed to fetch products."
25
  msgstr ""
26
 
27
- #: woo-feed.php:447
28
  msgid "Invalid Feed."
29
  msgstr ""
30
 
31
- #: woo-feed.php:571
32
  msgid "Feed Making Complete"
33
  msgstr ""
34
 
35
- #: woo-feed.php:655, woo-feed.php:695
36
  msgid "Failed security check"
37
  msgstr ""
38
 
39
- #: woo-feed.php:659, woo-feed.php:699
40
  msgid "Invalid Feed Type!"
41
  msgstr ""
42
 
43
- #: woo-feed.php:805
44
  msgid "Invalid Merchant"
45
  msgstr ""
46
 
12
  "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
13
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
14
 
15
+ #: woo-feed.php:232, woo-feed.php:352, woo-feed.php:427, woo-feed.php:783, woo-feed.php:823, woo-feed.php:843, woo-feed.php:869
16
  msgid "Unauthorized Action."
17
  msgstr ""
18
 
19
+ #: woo-feed.php:237, woo-feed.php:356, includes/helper.php:1870, includes/classes/class-woo-feed-webappick-api.php:427, includes/classes/class-woo-feed-webappick-api.php:451
20
  msgid "Invalid Request."
21
  msgstr ""
22
 
23
+ #: woo-feed.php:310
24
  msgid "Failed to fetch products."
25
  msgstr ""
26
 
27
+ #: woo-feed.php:431
28
  msgid "Invalid Feed."
29
  msgstr ""
30
 
31
+ #: woo-feed.php:555
32
  msgid "Feed Making Complete"
33
  msgstr ""
34
 
35
+ #: woo-feed.php:639, woo-feed.php:679
36
  msgid "Failed security check"
37
  msgstr ""
38
 
39
+ #: woo-feed.php:643, woo-feed.php:683
40
  msgid "Invalid Feed Type!"
41
  msgstr ""
42
 
43
+ #: woo-feed.php:789
44
  msgid "Invalid Merchant"
45
  msgstr ""
46
 
woo-feed.php CHANGED
@@ -10,7 +10,7 @@
10
  * Plugin Name: CTX Feed
11
  * Plugin URI: https://webappick.com/
12
  * Description: Easily generate woocommerce product feed for any marketing channel like Google Shopping(Merchant), Facebook Remarketing, Bing, eBay & more. Support 100+ Merchants.
13
- * Version: 4.4.18
14
  * Author: WebAppick
15
  * Author URI: https://webappick.com/
16
  * License: GPL v2
@@ -42,7 +42,7 @@ if ( ! defined( 'WOO_FEED_FREE_VERSION' ) ) {
42
  * @var string
43
  * @since 3.1.6
44
  */
45
- define( 'WOO_FEED_FREE_VERSION', '4.4.18' );
46
  }
47
 
48
  if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {
@@ -208,29 +208,13 @@ if ( ! function_exists( 'run_woo_feed' ) ) {
208
  add_action( 'plugins_loaded', array( $plugin, 'run' ), PHP_INT_MAX );
209
  add_action( 'admin_notices', 'wooFeed_Admin_Notices' );
210
  add_action( 'admin_notices', 'wooFeed_To_ctxFeed' );
 
211
 
212
  }
213
 
214
  run_woo_feed();
215
  }
216
 
217
- if( ! function_exists( 'woo_feed_hook_webappick_api' ) ){
218
-
219
- /*
220
- * Hooks WebAppick API to initialization hook
221
- * Solves conflict with Ultimate Member plugin
222
- *
223
- * @return void
224
- * @since 4.4.17
225
- * */
226
- function woo_feed_hook_webappick_api() {
227
- WooFeedWebAppickAPI::getInstance();
228
- }
229
-
230
- add_action( 'init', 'woo_feed_hook_webappick_api' );
231
-
232
- }
233
-
234
  // ======================================================================================================================*
235
  //
236
  // Ajax Feed Making Development Start.
10
  * Plugin Name: CTX Feed
11
  * Plugin URI: https://webappick.com/
12
  * Description: Easily generate woocommerce product feed for any marketing channel like Google Shopping(Merchant), Facebook Remarketing, Bing, eBay & more. Support 100+ Merchants.
13
+ * Version: 4.4.19
14
  * Author: WebAppick
15
  * Author URI: https://webappick.com/
16
  * License: GPL v2
42
  * @var string
43
  * @since 3.1.6
44
  */
45
+ define( 'WOO_FEED_FREE_VERSION', '4.4.19' );
46
  }
47
 
48
  if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {
208
  add_action( 'plugins_loaded', array( $plugin, 'run' ), PHP_INT_MAX );
209
  add_action( 'admin_notices', 'wooFeed_Admin_Notices' );
210
  add_action( 'admin_notices', 'wooFeed_To_ctxFeed' );
211
+ WooFeedWebAppickAPI::getInstance();
212
 
213
  }
214
 
215
  run_woo_feed();
216
  }
217
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
218
  // ======================================================================================================================*
219
  //
220
  // Ajax Feed Making Development Start.