CTX Feed – WooCommerce Product Feed Manager Plugin - Version 3.1.33

Version Description

(2019-10-7) = * Add copy to clip board * Fix performance issue on feed add/edit screen

Download this release

Release Info

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

Code changes from version 3.1.32 to 3.1.33

README.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://webappick.com
4
  Tags:woocommerce,google product feed,facebook product feed,woocommerce product feed,woocommerce,
5
  Requires at least: 3.6
6
  Tested Up To: 5.2
7
- Stable tag: 3.1.32
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -304,6 +304,10 @@ Using pro version:
304
 
305
  == Changelog ==
306
 
 
 
 
 
307
  = 3.1.32 (2019-10-6) =
308
  * Fix parent sku not getting populated in feed data
309
  * Set feed type to CSV for Pinterest
4
  Tags:woocommerce,google product feed,facebook product feed,woocommerce product feed,woocommerce,
5
  Requires at least: 3.6
6
  Tested Up To: 5.2
7
+ Stable tag: 3.1.33
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
304
 
305
  == Changelog ==
306
 
307
+ = 3.1.33 (2019-10-7) =
308
+ * Add copy to clip board
309
+ * Fix performance issue on feed add/edit screen
310
+
311
  = 3.1.32 (2019-10-6) =
312
  * Fix parent sku not getting populated in feed data
313
  * Set feed type to CSV for Pinterest
admin/class-woo-feed-admin.php CHANGED
@@ -106,7 +106,7 @@ class Woo_Feed_Admin
106
  wp_register_script($this->woo_feed . "_shortable", plugin_dir_url(__FILE__) . 'js/jquery-sortable.js', array(), $this->version, false);
107
  wp_enqueue_script($this->woo_feed . "_shortable");
108
 
109
- wp_register_script($this->woo_feed, plugin_dir_url(__FILE__) . 'js/woo-feed-admin.js', array('jquery'), $this->version, false);
110
 
111
  $wpf_feed_nonce = wp_create_nonce('wpf_feed_nonce');
112
  wp_localize_script($this->woo_feed, 'wpf_ajax_obj', array(
106
  wp_register_script($this->woo_feed . "_shortable", plugin_dir_url(__FILE__) . 'js/jquery-sortable.js', array(), $this->version, false);
107
  wp_enqueue_script($this->woo_feed . "_shortable");
108
 
109
+ wp_register_script($this->woo_feed, plugin_dir_url(__FILE__) . 'js/woo-feed-admin.js', array( 'jquery', 'clipboard' ), $this->version, false);
110
 
111
  $wpf_feed_nonce = wp_create_nonce('wpf_feed_nonce');
112
  wp_localize_script($this->woo_feed, 'wpf_ajax_obj', array(
admin/class-woo-feed-manage-list.php CHANGED
@@ -61,46 +61,54 @@ class Woo_Feed_Manage_list extends Woo_Feed_List_Table
61
  * WP_List_Table::single_row_columns()
62
  *
63
  * @param array $item A singular item (one full row's worth of data)
64
- * @param array $column_name The name/slug of the column to be processed
65
  * @return string Text or HTML to be placed inside the column <td>
 
66
  **************************************************************************/
67
- function column_default($item, $column_name)
68
- {
69
  $getItem = $item['option_name'];
70
- $statusId=$item['option_id'];
71
  $itemInfo = unserialize(get_option($getItem));
72
-
73
-
74
- global $wpdb, $table_prefix;
75
  switch ($column_name) {
76
- case 'option_name':
77
- $name = $item[$column_name];
78
- return str_replace("wf_feed_", "", $name);
79
- case 'status':
80
- if(!isset($itemInfo['status']) || $itemInfo['status'] == 1){
81
- return ' <div class="wf_status_wrap"><input style="display: none;" data-index='.$statusId.' id='.$statusId.' checked class="woo_feed_status_input" type="checkbox" value="'.$getItem.'"/>
82
  <label for='.$statusId.' class= "woo-feed_active_status"></label></div>';
83
- }else{
84
- return ' <div class="wf_status_wrap"> <input style="display: none;" data-index='.$statusId.' id='.$statusId.' class="woo_feed_status_input" type="checkbox" value="'.$getItem.'"/>
85
  <label for='.$statusId.' class= "woo-feed_active_status"></label> </div>';
86
- }
87
- case 'provider':
88
- $provider = $itemInfo['feedrules']['provider'];
89
- return ucwords(str_replace("_", " ", $provider));
90
- case 'type':
91
- $feedType = $itemInfo['feedrules']['feedType'];
92
- return strtoupper(str_replace("_", " ", $feedType));
93
- case 'url':
94
- return $itemInfo[$column_name];
95
- case 'last_updated':
96
- return $itemInfo[$column_name];
97
- case 'view':
98
- $view = $itemInfo['url'];
99
- return "<a target='_blank' class='button' href='$view'>" . __('View') . "</a>&nbsp;<input type='button' id='$getItem' value=".__('Regenerate')." class='button wpf_regenerate'>&nbsp;<a target='_blank' class='button' href='$view' download>" . __('Download') . "</a>";
100
- default:
101
- return false;
102
- //return print_r($item, true); //Show the whole array for troubleshooting purposes
103
- }
 
 
 
 
 
 
 
 
 
 
 
104
  }
105
 
106
 
61
  * WP_List_Table::single_row_columns()
62
  *
63
  * @param array $item A singular item (one full row's worth of data)
64
+ * @param string $column_name The name/slug of the column to be processed
65
  * @return string Text or HTML to be placed inside the column <td>
66
+ *
67
  **************************************************************************/
68
+ function column_default($item, $column_name) {
 
69
  $getItem = $item['option_name'];
70
+ $statusId = $item['option_id'];
71
  $itemInfo = unserialize(get_option($getItem));
 
 
 
72
  switch ($column_name) {
73
+ case 'option_name':
74
+ $name = $item[$column_name];
75
+ return str_replace("wf_feed_", "", $name);
76
+ case 'status':
77
+ if(!isset($itemInfo['status']) || $itemInfo['status'] == 1){
78
+ return ' <div class="wf_status_wrap"><input style="display: none;" data-index='.$statusId.' id='.$statusId.' checked class="woo_feed_status_input" type="checkbox" value="'.$getItem.'"/>
79
  <label for='.$statusId.' class= "woo-feed_active_status"></label></div>';
80
+ }else{
81
+ return ' <div class="wf_status_wrap"> <input style="display: none;" data-index='.$statusId.' id='.$statusId.' class="woo_feed_status_input" type="checkbox" value="'.$getItem.'"/>
82
  <label for='.$statusId.' class= "woo-feed_active_status"></label> </div>';
83
+ }
84
+ case 'provider':
85
+ /** @noinspection SpellCheckingInspection */
86
+ $provider = $itemInfo['feedrules']['provider'];
87
+ return ucwords(str_replace("_", " ", $provider));
88
+ case 'type':
89
+ /** @noinspection SpellCheckingInspection */
90
+ $feedType = $itemInfo['feedrules']['feedType'];
91
+ return strtoupper(str_replace("_", " ", $feedType));
92
+ case 'url':
93
+ /** @noinspection HtmlUnknownAttribute,SpellCheckingInspection */
94
+ return sprintf(
95
+ '<span class="toClipboard" data-clipboard-target="#_url%1$s" id="_url%1$s">%2$s</span><span class="toClipboard" data-clipboard-target="#_url%1$s">%3$s</span>',
96
+ $statusId,
97
+ $itemInfo[ $column_name ],
98
+ '<img src="data:image/svg+xml,%0A%3Csvg height=\'1024\' width=\'896\' xmlns=\'http://www.w3.org/2000/svg\'%3E%3Cpath d=\'M128 768h256v64H128v-64z m320-384H128v64h320v-64z m128 192V448L384 640l192 192V704h320V576H576z m-288-64H128v64h160v-64zM128 704h160v-64H128v64z m576 64h64v128c-1 18-7 33-19 45s-27 18-45 19H64c-35 0-64-29-64-64V192c0-35 29-64 64-64h192C256 57 313 0 384 0s128 57 128 128h192c35 0 64 29 64 64v320h-64V320H64v576h640V768zM128 256h512c0-35-29-64-64-64h-64c-35 0-64-29-64-64s-29-64-64-64-64 29-64 64-29 64-64 64h-64c-35 0-64 29-64 64z\' /%3E%3C/svg%3E%0A" alt="' . __( 'Copy To Clipboard') . '" class="clippy">' );
99
+ case 'last_updated':
100
+ return $itemInfo[$column_name];
101
+ case 'view':
102
+ $view = $itemInfo['url'];
103
+ /** @noinspection HtmlUnknownTarget */
104
+ return sprintf(
105
+ '<a href="%1$s" class="button" target="_blank">%2$s</a>&nbsp;
106
+ <input type="button" id="%3$s" value="%4$s" class="button wpf_regenerate">&nbsp;
107
+ <a href="%1$s" class="button" target="_blank" download>%5$s</a>',
108
+ $view, __( 'View' ), $getItem, __( 'Regenerate' ), __( 'Download' ) );
109
+ default:
110
+ return false;
111
+ }
112
  }
113
 
114
 
admin/css/woo-feed-admin.css CHANGED
@@ -26,7 +26,7 @@
26
  transform: rotate(359deg);
27
  }
28
  }
29
-
30
  .wfbtn {
31
  background: #3498db;
32
  background-image: -webkit-linear-gradient(top, #3498db, #2980b9);
@@ -37,16 +37,17 @@
37
  -webkit-border-radius: 17px;
38
  -moz-border-radius: 17px;
39
  border-radius: 17px;
40
- -webkit-box-shadow: 0px 1px 3px #666666;
41
- -moz-box-shadow: 0px 1px 3px #666666;
42
- box-shadow: 0px 1px 3px #666666;
43
- font-family: Arial;
44
  color: #ffffff;
45
  font-size: 20px;
46
  padding: 10px 20px 10px 20px;
47
  border: solid #2b698f 3px;
48
  text-decoration: none;
49
  }
 
50
  .wftooltip {
51
  display:none;
52
  position:absolute;
@@ -57,6 +58,7 @@
57
  color:#fff;
58
  font-size:12px;
59
  }
 
60
  .wfbtn:hover {
61
  background: #3cb0fd;
62
  background-image: -webkit-linear-gradient(top, #3cb0fd, #3498db);
@@ -92,14 +94,15 @@
92
  color: red;
93
  }
94
 
95
- /*.widefat th {*/
96
- /*text-align: center;*/
97
- /*}*/
 
98
 
99
  #wf_newRow {
100
- margin-left: 0px;
101
  }
102
-
103
  .mtable tbody tr {
104
  height: 25px;
105
  border: 1px solid #CCC;
@@ -107,53 +110,50 @@
107
  align-items: baseline;
108
  font-weight: bold;
109
  }
110
-
111
  .mtable th:nth-child(1) {
112
  width: 17px;
113
  }
114
-
115
  .mtable th:nth-child(2) {
116
  width: 160px;
117
  }
118
-
119
  .mtable th:nth-child(3) {
120
  width: 100px;
121
  }
122
-
123
  .mtable th:nth-child(4) {
124
  width: 100px;
125
  }
126
-
127
  .mtable th:nth-child(5) {
128
  width: 150px;
129
  }
130
-
131
  .mtable th:nth-child(6) {
132
  width: 100px;
133
  }
134
-
135
  .mtable th:nth-child(7) {
136
  width: 150px;
137
  }
138
-
139
  .mtable th:nth-child(8) {
140
  width: 90px;
141
  }
142
-
143
  .mtable th:nth-child(9) {
144
  width: 29px;
145
  }
146
- .wp-admin select.wf_mattributes,
147
- .wfnoempty{
148
- width:120px;
149
- }
150
-
151
- .wf_mattributes {
152
  width: 150px;
153
  left: 0;
154
  height: 25px;
155
  }
156
 
 
157
  .wf_attributes {
158
  width: 150px;
159
  left: 0
@@ -167,21 +167,23 @@
167
  width: 100px;
168
  left: 0
169
  }
170
-
171
-
172
  .wf_sortedtable {
173
  cursor: move;
174
  }
 
175
  .sorted_table .dragged {
176
  position: absolute;
177
  opacity: 0.8;
178
  z-index: 9999;
179
  background: #fff;
180
  }
 
181
  .sorted_table tbody tr.placeholder td {
182
  border: 1px dashed #2cc185;
183
  height: 100%;
184
  }
 
185
  .mtable2 tbody tr {
186
  height: 25px;
187
  border: 1px solid #CCC;
@@ -189,42 +191,38 @@
189
  align-items: baseline;
190
  font-weight: bold;
191
  }
192
-
193
  .mtable2 th:nth-child(1) {
194
  width: 30px;
195
  }
196
-
197
  .mtable2 th:nth-child(2) {
198
  width: 150px;
199
  }
200
-
201
  .mtable2 th:nth-child(3) {
202
  width: 230px;
203
  }
204
-
205
  .mtable2 th:nth-child(4) {
206
  width: 220px;
207
  }
208
-
209
- /*.mtable2 th:nth-child(5) {*/
210
- /*width: 200px;*/
211
- /*}*/
212
-
213
- /*.mtable2 th:nth-child(6) {*/
214
- /*width: 200px;*/
215
- /*}*/
216
-
217
  .mtable2 th:nth-child(7) {
218
  width: 50px;
219
  }
220
-
221
  .mtable2 th:nth-child(8) {
222
  width: 50px;
223
  }
224
-
225
  .mtable2 th:nth-child(9) {
226
  width: 29px;
227
  }
 
 
 
 
228
 
229
  /*==================Tab Design=======================*/
230
 
@@ -309,53 +307,21 @@ p {
309
  font-weight: bold !important;
310
  border-color:#0073aa !important ;
311
  }
 
312
  .selectize-input.full #googleTaxonomyId-selectized { opacity: 0; position: absolute; left: -10000px; }
 
313
  .selectize-dropdown [data-selectable].option { cursor: default; }
 
314
  .selectize-control.plugin-remove_button [data-value] .remove{
315
  border-left: 1px solid #0073aa !important;
316
  }
317
 
318
- /**
319
- * Premium Page Design
320
- */
321
- .woo_feed_free_manage_attribute {
322
- margin: 0 auto;
323
- width: 100%;
324
- }
325
-
326
- .woo_feed_screenshort{
327
- max-width: 100%;
328
- width: 1000px;
329
- border: 3px solid #00b9eb;
330
- display: block;
331
- margin: 0 auto;
332
- }
333
 
334
- .woo-feed-screen-shot-title{
335
- font-size: 36px;
336
- text-align: center;
337
- box-sizing: content-box;
338
- color: #00b9eb;
339
- }
340
 
341
- .woo_feed_screen {
342
- background: #fff;
343
- padding: 25px 20px;
344
- margin-bottom: 20px;
345
- }
346
-
347
- .woo_feed_screen_des{
348
- text-align: center;
349
- margin: 20px 50px 20px 50px;
350
- font-size: 16px;
351
- color: #666;
352
- }
353
- .woo_feed_screen_des_2{
354
- text-align: center;
355
- margin: 20px 50px 5px 50px;
356
- font-size: 14px;
357
- color: #32373c;
358
- }
359
 
360
  /* Feed active and inactive button CSS */
361
  .wf_status_wrap label{
@@ -389,8 +355,53 @@ input[class=woo_feed_status_input]:checked + label:before{
389
  color:black;
390
  border-radius:100px;
391
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
392
 
393
  /*Plugin Deactivation popup*/
 
394
  .wpf_deactive_plugin-modal {
395
  position: fixed;
396
  z-index: 99999;
@@ -401,42 +412,299 @@ input[class=woo_feed_status_input]:checked + label:before{
401
  background: rgba(0,0,0,0.5);
402
  display: none;
403
  }
404
-
405
  .wpf_deactive_plugin-modal.modal-active {
406
  display: block;
407
  }
408
-
409
  .wpf_deactive_plugin-modal-wrap {
410
  width: 475px;
411
  position: relative;
412
  margin: 10% auto;
413
  background: #fff;
414
  }
415
-
416
  .wpf_deactive_plugin-modal-header {
417
  border-bottom: 1px solid #eee;
418
  padding: 8px 20px;
419
  }
420
-
421
  .wpf_deactive_plugin-modal-header h3 {
422
  line-height: 150%;
423
  margin: 0;
424
  }
425
-
426
  .wpf_deactive_plugin-modal-body {
427
  padding: 5px 20px 20px 20px;
428
  }
429
-
430
  .wpf_deactive_plugin-modal-body .reason-input {
431
  margin-top: 5px;
432
  margin-left: 20px;
433
  }
 
434
  .wpf_deactive_plugin-modal-footer {
435
  border-top: 1px solid #eee;
436
  padding: 12px 20px;
437
  text-align: right;
438
  }
439
-
440
  #wpbody-content.woofeed-body-content{
441
  overflow:visible!important;
442
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  transform: rotate(359deg);
27
  }
28
  }
29
+ /*noinspection SpellCheckingInspection */
30
  .wfbtn {
31
  background: #3498db;
32
  background-image: -webkit-linear-gradient(top, #3498db, #2980b9);
37
  -webkit-border-radius: 17px;
38
  -moz-border-radius: 17px;
39
  border-radius: 17px;
40
+ -webkit-box-shadow: 0 1px 3px #666666;
41
+ -moz-box-shadow: 0 1px 3px #666666;
42
+ box-shadow: 0 1px 3px #666666;
43
+ font-family: Arial, sans-serif;
44
  color: #ffffff;
45
  font-size: 20px;
46
  padding: 10px 20px 10px 20px;
47
  border: solid #2b698f 3px;
48
  text-decoration: none;
49
  }
50
+ /*noinspection SpellCheckingInspection */
51
  .wftooltip {
52
  display:none;
53
  position:absolute;
58
  color:#fff;
59
  font-size:12px;
60
  }
61
+ /*noinspection SpellCheckingInspection */
62
  .wfbtn:hover {
63
  background: #3cb0fd;
64
  background-image: -webkit-linear-gradient(top, #3cb0fd, #3498db);
94
  color: red;
95
  }
96
 
97
+ /*noinspection SpellCheckingInspection */
98
+ .widefat td select, .widefat td input {
99
+ max-width: 100%;
100
+ }
101
 
102
  #wf_newRow {
103
+ margin-left: 0;
104
  }
105
+ /*noinspection SpellCheckingInspection */
106
  .mtable tbody tr {
107
  height: 25px;
108
  border: 1px solid #CCC;
110
  align-items: baseline;
111
  font-weight: bold;
112
  }
113
+ /*noinspection SpellCheckingInspection */
114
  .mtable th:nth-child(1) {
115
  width: 17px;
116
  }
117
+ /*noinspection SpellCheckingInspection */
118
  .mtable th:nth-child(2) {
119
  width: 160px;
120
  }
121
+ /*noinspection SpellCheckingInspection */
122
  .mtable th:nth-child(3) {
123
  width: 100px;
124
  }
125
+ /*noinspection SpellCheckingInspection */
126
  .mtable th:nth-child(4) {
127
  width: 100px;
128
  }
129
+ /*noinspection SpellCheckingInspection */
130
  .mtable th:nth-child(5) {
131
  width: 150px;
132
  }
133
+ /*noinspection SpellCheckingInspection */
134
  .mtable th:nth-child(6) {
135
  width: 100px;
136
  }
137
+ /*noinspection SpellCheckingInspection */
138
  .mtable th:nth-child(7) {
139
  width: 150px;
140
  }
141
+ /*noinspection SpellCheckingInspection */
142
  .mtable th:nth-child(8) {
143
  width: 90px;
144
  }
145
+ /*noinspection SpellCheckingInspection */
146
  .mtable th:nth-child(9) {
147
  width: 29px;
148
  }
149
+ /*noinspection SpellCheckingInspection */
150
+ .wp-admin select.wf_mattributes, .wf_mattributes {
 
 
 
 
151
  width: 150px;
152
  left: 0;
153
  height: 25px;
154
  }
155
 
156
+
157
  .wf_attributes {
158
  width: 150px;
159
  left: 0
167
  width: 100px;
168
  left: 0
169
  }
170
+ /*noinspection SpellCheckingInspection */
 
171
  .wf_sortedtable {
172
  cursor: move;
173
  }
174
+
175
  .sorted_table .dragged {
176
  position: absolute;
177
  opacity: 0.8;
178
  z-index: 9999;
179
  background: #fff;
180
  }
181
+
182
  .sorted_table tbody tr.placeholder td {
183
  border: 1px dashed #2cc185;
184
  height: 100%;
185
  }
186
+ /*noinspection SpellCheckingInspection */
187
  .mtable2 tbody tr {
188
  height: 25px;
189
  border: 1px solid #CCC;
191
  align-items: baseline;
192
  font-weight: bold;
193
  }
194
+ /*noinspection SpellCheckingInspection */
195
  .mtable2 th:nth-child(1) {
196
  width: 30px;
197
  }
198
+ /*noinspection SpellCheckingInspection */
199
  .mtable2 th:nth-child(2) {
200
  width: 150px;
201
  }
202
+ /*noinspection SpellCheckingInspection */
203
  .mtable2 th:nth-child(3) {
204
  width: 230px;
205
  }
206
+ /*noinspection SpellCheckingInspection */
207
  .mtable2 th:nth-child(4) {
208
  width: 220px;
209
  }
210
+ /*noinspection SpellCheckingInspection */
 
 
 
 
 
 
 
 
211
  .mtable2 th:nth-child(7) {
212
  width: 50px;
213
  }
214
+ /*noinspection SpellCheckingInspection */
215
  .mtable2 th:nth-child(8) {
216
  width: 50px;
217
  }
218
+ /*noinspection SpellCheckingInspection */
219
  .mtable2 th:nth-child(9) {
220
  width: 29px;
221
  }
222
+ /*noinspection SpellCheckingInspection */
223
+ .wfnoempty{
224
+ width:120px;
225
+ }
226
 
227
  /*==================Tab Design=======================*/
228
 
307
  font-weight: bold !important;
308
  border-color:#0073aa !important ;
309
  }
310
+ /*noinspection SpellCheckingInspection */
311
  .selectize-input.full #googleTaxonomyId-selectized { opacity: 0; position: absolute; left: -10000px; }
312
+ /*noinspection SpellCheckingInspection */
313
  .selectize-dropdown [data-selectable].option { cursor: default; }
314
+ /*noinspection SpellCheckingInspection */
315
  .selectize-control.plugin-remove_button [data-value] .remove{
316
  border-left: 1px solid #0073aa !important;
317
  }
318
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
319
 
320
+ /* list table style */
321
+ /*noinspection SpellCheckingInspection */
322
+ .widefat td.column-url, .widefat th.column-url,
323
+ .column-url { color: #008779; font-weight: bold; }
 
 
324
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
325
 
326
  /* Feed active and inactive button CSS */
327
  .wf_status_wrap label{
355
  color:black;
356
  border-radius:100px;
357
  }
358
+ /* list table style */
359
+ /*noinspection SpellCheckingInspection */
360
+ .widefat td.column-url, .widefat th.column-url,
361
+ .column-url { color: #008779; font-weight: bold; }
362
+
363
+ /* Feed Progress */
364
+ .feed-progress-container {
365
+ width:100%;
366
+ color: white;
367
+ text-align: center;
368
+ font-weight: 300;
369
+ }
370
+
371
+ .feed-progress-bar {
372
+ width:100%;
373
+ background:#eee;
374
+ padding:3px;
375
+ border-radius:3px;
376
+ box-shadow:inset 0 1px 3px rgba(0,0,0,.2);
377
+ }
378
+
379
+ .feed-progress-bar-fill {
380
+ height:20px;
381
+ display:block;
382
+ background:#3DC264;
383
+ width:0;
384
+ border-radius:3px;
385
+ -webkit-transition:width 0.8s ease;
386
+ transition:width 0.8s ease;
387
+ }
388
+
389
+ .feed-progress-status {
390
+ float: left;
391
+ font-weight: bold;
392
+ color: darkblue;
393
+ }
394
+
395
+ .feed-progress-percentage {
396
+ text-align:right;
397
+ font-weight: bolder;
398
+ color: #41f49d;
399
+ font-family: 'Arial Black', sans-serif;
400
+ font-size: large;
401
+ }
402
 
403
  /*Plugin Deactivation popup*/
404
+ /*noinspection SpellCheckingInspection */
405
  .wpf_deactive_plugin-modal {
406
  position: fixed;
407
  z-index: 99999;
412
  background: rgba(0,0,0,0.5);
413
  display: none;
414
  }
415
+ /*noinspection SpellCheckingInspection */
416
  .wpf_deactive_plugin-modal.modal-active {
417
  display: block;
418
  }
419
+ /*noinspection SpellCheckingInspection */
420
  .wpf_deactive_plugin-modal-wrap {
421
  width: 475px;
422
  position: relative;
423
  margin: 10% auto;
424
  background: #fff;
425
  }
426
+ /*noinspection SpellCheckingInspection */
427
  .wpf_deactive_plugin-modal-header {
428
  border-bottom: 1px solid #eee;
429
  padding: 8px 20px;
430
  }
431
+ /*noinspection SpellCheckingInspection */
432
  .wpf_deactive_plugin-modal-header h3 {
433
  line-height: 150%;
434
  margin: 0;
435
  }
436
+ /*noinspection SpellCheckingInspection */
437
  .wpf_deactive_plugin-modal-body {
438
  padding: 5px 20px 20px 20px;
439
  }
440
+ /*noinspection SpellCheckingInspection */
441
  .wpf_deactive_plugin-modal-body .reason-input {
442
  margin-top: 5px;
443
  margin-left: 20px;
444
  }
445
+ /*noinspection SpellCheckingInspection */
446
  .wpf_deactive_plugin-modal-footer {
447
  border-top: 1px solid #eee;
448
  padding: 12px 20px;
449
  text-align: right;
450
  }
451
+ /*noinspection SpellCheckingInspection */
452
  #wpbody-content.woofeed-body-content{
453
  overflow:visible!important;
454
+ }
455
+ /*noinspection SpellCheckingInspection */
456
+ .clippy {
457
+ position: relative;
458
+ width: 13px;
459
+ margin-top: -3px;
460
+ margin-left: 3px;
461
+ top: 3px;
462
+ }
463
+ /*noinspection SpellCheckingInspection */
464
+ .column-url .clippy { display: none; }
465
+ /*noinspection SpellCheckingInspection */
466
+ .column-url:hover .clippy { display: inline-block; }
467
+ /**
468
+ * Primer Tooltip
469
+ * @TODO use node module
470
+ */
471
+
472
+ /*noinspection SpellCheckingInspection */
473
+ .tooltipped {
474
+ position: relative
475
+ }
476
+ /*noinspection SpellCheckingInspection */
477
+ .tooltipped:after {
478
+ position: absolute;
479
+ z-index: 1000000;
480
+ display: none;
481
+ padding: 5px 8px;
482
+ font: normal normal 11px/1.5 Helvetica,arial,nimbussansl,liberationsans,freesans,clean,sans-serif,"Segoe UI Emoji","Segoe UI Symbol";
483
+ color: #fff;
484
+ text-align: center;
485
+ text-decoration: none;
486
+ text-shadow: none;
487
+ text-transform: none;
488
+ letter-spacing: normal;
489
+ word-wrap: break-word;
490
+ white-space: pre;
491
+ pointer-events: none;
492
+ content: attr(aria-label);
493
+ background: rgba(0,0,0,.8);
494
+ border-radius: 3px;
495
+ -webkit-font-smoothing: subpixel-antialiased
496
+ }
497
+ /*noinspection SpellCheckingInspection */
498
+ .tooltipped:before {
499
+ position: absolute;
500
+ z-index: 1000001;
501
+ display: none;
502
+ width: 0;
503
+ height: 0;
504
+ color: rgba(0,0,0,.8);
505
+ pointer-events: none;
506
+ content: "";
507
+ border: 5px solid transparent
508
+ }
509
+ /*noinspection SpellCheckingInspection */
510
+ .tooltipped:hover:before,.tooltipped:hover:after,.tooltipped:active:before,.tooltipped:active:after,.tooltipped:focus:before,.tooltipped:focus:after {
511
+ display: inline-block;
512
+ text-decoration: none
513
+ }
514
+ /*noinspection SpellCheckingInspection */
515
+ .tooltipped-multiline:hover:after,.tooltipped-multiline:active:after,.tooltipped-multiline:focus:after {
516
+ display: table-cell
517
+ }
518
+ /*noinspection SpellCheckingInspection */
519
+ .tooltipped-s:after,.tooltipped-se:after,.tooltipped-sw:after {
520
+ top: 100%;
521
+ right: 50%;
522
+ margin-top: 5px
523
+ }
524
+ /*noinspection SpellCheckingInspection */
525
+ .tooltipped-s:before,.tooltipped-se:before,.tooltipped-sw:before {
526
+ top: auto;
527
+ right: 50%;
528
+ bottom: -5px;
529
+ margin-right: -5px;
530
+ border-bottom-color: rgba(0,0,0,.8)
531
+ }
532
+ /*noinspection SpellCheckingInspection */
533
+ .tooltipped-se:after {
534
+ right: auto;
535
+ left: 50%;
536
+ margin-left: -15px
537
+ }
538
+ /*noinspection SpellCheckingInspection */
539
+ .tooltipped-sw:after {
540
+ margin-right: -15px
541
+ }
542
+ /*noinspection SpellCheckingInspection */
543
+ .tooltipped-n:after,.tooltipped-ne:after,.tooltipped-nw:after {
544
+ right: 50%;
545
+ bottom: 100%;
546
+ margin-bottom: 5px
547
+ }
548
+ /*noinspection SpellCheckingInspection */
549
+ .tooltipped-n:before,.tooltipped-ne:before,.tooltipped-nw:before {
550
+ top: -5px;
551
+ right: 50%;
552
+ bottom: auto;
553
+ margin-right: -5px;
554
+ border-top-color: rgba(0,0,0,.8)
555
+ }
556
+ /*noinspection SpellCheckingInspection */
557
+ .tooltipped-ne:after {
558
+ right: auto;
559
+ left: 50%;
560
+ margin-left: -15px
561
+ }
562
+ /*noinspection SpellCheckingInspection */
563
+ .tooltipped-nw:after {
564
+ margin-right: -15px
565
+ }
566
+ /*noinspection SpellCheckingInspection */
567
+ .tooltipped-s:after,.tooltipped-n:after {
568
+ -webkit-transform: translateX(50%);
569
+ -ms-transform: translateX(50%);
570
+ transform: translateX(50%)
571
+ }
572
+ /*noinspection SpellCheckingInspection */
573
+ .tooltipped-w:after {
574
+ right: 100%;
575
+ bottom: 50%;
576
+ margin-right: 5px;
577
+ -webkit-transform: translateY(50%);
578
+ -ms-transform: translateY(50%);
579
+ transform: translateY(50%)
580
+ }
581
+ /*noinspection SpellCheckingInspection */
582
+ .tooltipped-w:before {
583
+ top: 50%;
584
+ bottom: 50%;
585
+ left: -5px;
586
+ margin-top: -5px;
587
+ border-left-color: rgba(0,0,0,.8)
588
+ }
589
+ /*noinspection SpellCheckingInspection */
590
+ .tooltipped-e:after {
591
+ bottom: 50%;
592
+ left: 100%;
593
+ margin-left: 5px;
594
+ -webkit-transform: translateY(50%);
595
+ -ms-transform: translateY(50%);
596
+ transform: translateY(50%)
597
+ }
598
+ /*noinspection SpellCheckingInspection */
599
+ .tooltipped-e:before {
600
+ top: 50%;
601
+ right: -5px;
602
+ bottom: 50%;
603
+ margin-top: -5px;
604
+ border-right-color: rgba(0,0,0,.8)
605
+ }
606
+
607
+ /*noinspection SpellCheckingInspection,CssInvalidPropertyValue*/
608
+ .tooltipped-multiline:after {
609
+ width: -webkit-max-content;
610
+ width: -moz-max-content;
611
+ width: max-content;
612
+ max-width: 250px;
613
+ word-break: break-word;
614
+ word-wrap: normal;
615
+ white-space: pre-line;
616
+ border-collapse: separate
617
+ }
618
+ /*noinspection SpellCheckingInspection */
619
+ .tooltipped-multiline.tooltipped-s:after,.tooltipped-multiline.tooltipped-n:after {
620
+ right: auto;
621
+ left: 50%;
622
+ -webkit-transform: translateX(-50%);
623
+ -ms-transform: translateX(-50%);
624
+ transform: translateX(-50%)
625
+ }
626
+ /*noinspection SpellCheckingInspection */
627
+ .tooltipped-multiline.tooltipped-w:after,.tooltipped-multiline.tooltipped-e:after {
628
+ right: 100%
629
+ }
630
+ @media screen and (min-width:0\0) {
631
+ /*noinspection SpellCheckingInspection */
632
+ .tooltipped-multiline:after {
633
+ width: 250px
634
+ }
635
+ }
636
+ /*noinspection SpellCheckingInspection */
637
+ .tooltipped-sticky:before,.tooltipped-sticky:after {
638
+ display: inline-block
639
+ }
640
+ /*noinspection SpellCheckingInspection */
641
+ .tooltipped-sticky.tooltipped-multiline:after {
642
+ display: table-cell
643
+ }
644
+ /*noinspection SpellCheckingInspection */
645
+ .fullscreen-overlay-enabled.dark-theme .tooltipped:after {
646
+ color: #000;
647
+ background: rgba(255,255,255,.8)
648
+ }
649
+ /*noinspection SpellCheckingInspection */
650
+ .fullscreen-overlay-enabled.dark-theme .tooltipped .tooltipped-s:before,.fullscreen-overlay-enabled.dark-theme .tooltipped .tooltipped-se:before,.fullscreen-overlay-enabled.dark-theme .tooltipped .tooltipped-sw:before {
651
+ border-bottom-color: rgba(255,255,255,.8)
652
+ }
653
+ /*noinspection SpellCheckingInspection */
654
+ .fullscreen-overlay-enabled.dark-theme .tooltipped.tooltipped-n:before,.fullscreen-overlay-enabled.dark-theme .tooltipped.tooltipped-ne:before,.fullscreen-overlay-enabled.dark-theme .tooltipped.tooltipped-nw:before {
655
+ border-top-color: rgba(255,255,255,.8)
656
+ }
657
+ /*noinspection SpellCheckingInspection */
658
+ .fullscreen-overlay-enabled.dark-theme .tooltipped.tooltipped-e:before {
659
+ border-right-color: rgba(255,255,255,.8)
660
+ }
661
+ /*noinspection SpellCheckingInspection */
662
+ .fullscreen-overlay-enabled.dark-theme .tooltipped.tooltipped-w:before {
663
+ border-left-color: rgba(255,255,255,.8)
664
+ }
665
+
666
+
667
+
668
+
669
+
670
+ /**
671
+ * Premium Page Design
672
+ */
673
+ .woo_feed_free_manage_attribute {
674
+ margin: 0 auto;
675
+ width: 100%;
676
+ }
677
+
678
+ .woo_feed_screenshort{
679
+ max-width: 100%;
680
+ width: 1000px;
681
+ border: 3px solid #00b9eb;
682
+ display: block;
683
+ margin: 0 auto;
684
+ }
685
+
686
+ .woo-feed-screen-shot-title{
687
+ font-size: 36px;
688
+ text-align: center;
689
+ box-sizing: content-box;
690
+ color: #00b9eb;
691
+ }
692
+
693
+ .woo_feed_screen {
694
+ background: #fff;
695
+ padding: 25px 20px;
696
+ margin-bottom: 20px;
697
+ }
698
+
699
+ .woo_feed_screen_des{
700
+ text-align: center;
701
+ margin: 20px 50px 20px 50px;
702
+ font-size: 16px;
703
+ color: #666;
704
+ }
705
+ .woo_feed_screen_des_2{
706
+ text-align: center;
707
+ margin: 20px 50px 5px 50px;
708
+ font-size: 14px;
709
+ color: #32373c;
710
+ }
admin/js/woo-feed-admin.js CHANGED
@@ -13,7 +13,7 @@
13
 
14
  /**
15
  * disable element utility
16
- * @since 3.1.9
17
  */
18
  $.fn.disabled = function( status ) {
19
  $(this).each( function(){
@@ -22,13 +22,61 @@
22
  return $(this); // method chaining
23
  };
24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  $(function () {
26
 
27
- // Template loading ui conflict . Added by Shoroar
28
  var pageURL = $(location). attr("href");
29
  if(pageURL.indexOf('webappick-product-feed-for-woocommerce') >= 0 || pageURL.indexOf('woo_feed_manage_feed') >= 0) {
 
30
  $('#wpbody-content').addClass('woofeed-body-content');
31
  }
 
32
  // Category Mapping (Auto Field Populate)
33
  $(".treegrid-parent").on('change keyup', function () {
34
  var val = $(this).val(), parent = $(this).attr('classval');
13
 
14
  /**
15
  * disable element utility
16
+ * @since 3.1.32
17
  */
18
  $.fn.disabled = function( status ) {
19
  $(this).each( function(){
22
  return $(this); // method chaining
23
  };
24
 
25
+ function clearTooltip( event ) {
26
+ // noinspection SpellCheckingInspection
27
+ $(event.currentTarget).removeClass( function (index, className) {
28
+ return (className.match (/\btooltipped-\S+/g) || []).join(' ');
29
+ } ).removeClass('tooltipped').removeAttr('aria-label');
30
+ }
31
+
32
+ function showTooltip( elem, msg ) {
33
+ // noinspection SpellCheckingInspection
34
+ $( elem ).addClass('tooltipped tooltipped-s').attr( 'aria-label', msg );
35
+ }
36
+
37
+ function fallbackMessage(action) {
38
+ // noinspection ES6ConvertVarToLetConst
39
+ var actionMsg = '', actionKey = (action === 'cut' ? 'X' : 'C');
40
+ if (/iPhone|iPad/i.test(navigator.userAgent)) {
41
+ actionMsg = 'No support :(';
42
+ } else if (/Mac/i.test(navigator.userAgent)) {
43
+ actionMsg = 'Press ⌘-' + actionKey + ' to ' + action;
44
+ } else {
45
+ actionMsg = 'Press Ctrl-' + actionKey + ' to ' + action;
46
+ }
47
+ return actionMsg;
48
+ }
49
+
50
+ $(window).load(function () {
51
+ // noinspection ES6ConvertVarToLetConst
52
+ var $copyBtn = $('.toClipboard');
53
+ if( ! ClipboardJS.isSupported() || /iPhone|iPad/i.test(navigator.userAgent) ) {
54
+ $copyBtn.find('img').hide(0);
55
+ } else {
56
+ $copyBtn.each( function(){
57
+ $(this).on( 'mouseleave', clearTooltip );
58
+ $(this).on( 'blur', clearTooltip );
59
+ } );
60
+ // noinspection ES6ConvertVarToLetConst
61
+ var clipboard = new ClipboardJS('.toClipboard');
62
+ clipboard.on( 'error', function( event ) {
63
+ showTooltip( event.trigger, fallbackMessage( event.action ) );
64
+ } ).on( 'success', function( event ) {
65
+ showTooltip( event.trigger, 'Copied!' );
66
+ } );
67
+ }
68
+ });
69
+
70
+
71
  $(function () {
72
 
73
+ // noinspection ES6ConvertVarToLetConst
74
  var pageURL = $(location). attr("href");
75
  if(pageURL.indexOf('webappick-product-feed-for-woocommerce') >= 0 || pageURL.indexOf('woo_feed_manage_feed') >= 0) {
76
+ // noinspection SpellCheckingInspection
77
  $('#wpbody-content').addClass('woofeed-body-content');
78
  }
79
+
80
  // Category Mapping (Auto Field Populate)
81
  $(".treegrid-parent").on('change keyup', function () {
82
  var val = $(this).val(), parent = $(this).attr('classval');
includes/classes/class-woo-feed-engine.php CHANGED
@@ -646,20 +646,14 @@ class WF_Engine
646
  foreach ($this->storeProducts as $no => $product) {
647
  $row = array();
648
  foreach ($headers as $key => $header) {
649
- if($this->rules['provider'] == 'spartoo.fi' && $header == "Parent / Child")
650
- {
651
  $_value = isset($product[$header])?$this->processStringForCSV($product[$header]): "";
652
- if($_value == 'variation')
653
- {
654
  $row[] = 'child';
655
- }
656
- else
657
- {
658
  $row[] = 'parent';
659
  }
660
- }
661
- else
662
- {
663
  $row[] = isset($product[$header])?$this->processStringForCSV($product[$header]): "";
664
  }
665
  }
646
  foreach ($this->storeProducts as $no => $product) {
647
  $row = array();
648
  foreach ($headers as $key => $header) {
649
+ if($this->rules['provider'] == 'spartoo.fi' && $header == "Parent / Child") {
 
650
  $_value = isset($product[$header])?$this->processStringForCSV($product[$header]): "";
651
+ if($_value == 'variation') {
 
652
  $row[] = 'child';
653
+ } else {
 
 
654
  $row[] = 'parent';
655
  }
656
+ } else {
 
 
657
  $row[] = isset($product[$header])?$this->processStringForCSV($product[$header]): "";
658
  }
659
  }
includes/classes/class-woo-feed-products.php CHANGED
@@ -1701,18 +1701,16 @@ class Woo_Feed_Products
1701
  * Get All Default WooCommerce Attributes
1702
  * @return bool|array
1703
  */
1704
- public function getAllAttributes()
1705
- {
1706
  global $wpdb;
1707
-
 
1708
  //Load the main attributes
1709
- $sql = '
1710
- SELECT attribute_name as name, attribute_type as type
1711
- FROM ' . $wpdb->prefix . 'woocommerce_attribute_taxonomies';
1712
  $data = $wpdb->get_results($sql);
1713
- if (count($data)) {
1714
  foreach ($data as $key => $value) {
1715
- $info["wf_attr_pa_" . $value->name] = $value->name;
1716
  }
1717
  return $info;
1718
  }
@@ -1724,48 +1722,29 @@ class Woo_Feed_Products
1724
  * Get All Custom Attributes
1725
  * @return array|bool
1726
  */
1727
- public function getAllCustomAttributes()
1728
- {
1729
  global $wpdb;
1730
  $info = array();
1731
  //Load the main attributes
1732
- $sql = "SELECT meta_key as name, meta_value as type
1733
- FROM " . $wpdb->prefix . "postmeta" . " group by meta_key";
 
 
 
 
 
 
1734
  $data = $wpdb->get_results($sql);
1735
- if ($data) {
1736
- foreach ($data as $key => $value) {
1737
- if (substr($value->name, 0, 1) !== "_") { //&& substr($value->name, 0, 13) !== "attribute_pa_"
1738
- $info["wf_cattr_" . $value->name] = $value->name;
1739
- }
1740
  }
1741
  return $info;
1742
  }
1743
  return false;
1744
  }
1745
 
1746
- /**
1747
- * Get All Taxonomy
1748
- *
1749
- * @param string $name
1750
- *
1751
- * @return mixed
1752
- */
1753
- public function getAllTaxonomy($name = "")
1754
- {
1755
- global $wpdb;
1756
- //Load the taxonomies
1757
- $info = false;
1758
-
1759
- $sql = "SELECT taxo.taxonomy, terms.name, terms.slug FROM $wpdb->term_taxonomy taxo
1760
- LEFT JOIN $wpdb->terms terms ON (terms.term_id = taxo.term_id) GROUP BY taxo.taxonomy";
1761
- $data = $wpdb->get_results($sql);
1762
- if (count($data)) {
1763
- foreach ($data as $key => $value) {
1764
- $info["wf_taxo_" . $value->taxonomy] = $value->taxonomy;
1765
- }
1766
- }
1767
- return $info;
1768
- }
1769
 
1770
  /**
1771
  * Get Category Mappings
@@ -1790,26 +1769,6 @@ class Woo_Feed_Products
1790
  return false;
1791
  }
1792
 
1793
- // /**
1794
- // * Get Dynamic Attribute List
1795
- // * @return bool|array
1796
- // */
1797
- // public function dynamicAttributes()
1798
- // {
1799
- // global $wpdb;
1800
-
1801
- // # Load Custom Category Mapped Attributes
1802
- // $var = "wf_dattribute_";
1803
- // $sql = $wpdb->prepare("SELECT * FROM $wpdb->options WHERE option_name LIKE %s;", $var . "%");
1804
- // $data = $wpdb->get_results($sql);
1805
- // if (count($data)) {
1806
- // foreach ($data as $key => $value) {
1807
- // $info[$key] = $value->option_name;
1808
- // }
1809
- // return $info;
1810
- // }
1811
- // return false;
1812
- // }
1813
 
1814
  /**
1815
  * Local Attribute List to map product value with merchant attributes
@@ -1878,11 +1837,13 @@ class Woo_Feed_Products
1878
  $sltd = "";
1879
  $str .= "<optgroup label='Primary Attributes'>";
1880
  foreach ($attributes as $key => $value) {
1881
- $sltd = "";
1882
- if ($selected == $key) {
1883
- $sltd = 'selected="selected"';
1884
- }
1885
- $str .= "<option $sltd value='$key'>" . $value . "</option>";
 
 
1886
  }
1887
  $str .= "</optgroup>";
1888
 
@@ -1890,11 +1851,12 @@ class Woo_Feed_Products
1890
  if ($images) {
1891
  $str .= "<optgroup label='Image Attributes'>";
1892
  foreach ($images as $key => $value) {
1893
- $sltd = "";
1894
- if ($selected == $key) {
1895
- $sltd = 'selected="selected"';
1896
- }
1897
- $str .= "<option $sltd value='$key'>" . $value . "</option>";
 
1898
  }
1899
  $str .= "</optgroup>";
1900
  }
@@ -1904,30 +1866,16 @@ class Woo_Feed_Products
1904
  if ($vAttributes) {
1905
  $str .= "<optgroup label='Product Attributes'>";
1906
  foreach ($vAttributes as $key => $value) {
1907
- $sltd = "";
1908
- if ($selected == $key) {
1909
- $sltd = 'selected="selected"';
1910
- }
1911
- $str .= "<option $sltd value='$key'>" . $value . "</option>";
 
1912
  }
1913
  $str .= "</optgroup>";
1914
  }
1915
 
1916
- # Get All Custom Attributes
1917
- // $customAttributes = $this->getAllCustomAttributes();
1918
- // if ($customAttributes) {
1919
- // $str .= "<optgroup label='Variation & Custom Attributes'>";
1920
- // foreach ($customAttributes as $key => $value) {
1921
- // if (strpos($value, 0, 1) != "_") {
1922
- // $sltd = "";
1923
- // if ($selected == $key) {
1924
- // $sltd = 'selected="selected"';
1925
- // }
1926
- // $str .= "<option $sltd value='$key'>" . $value . "</option>";
1927
- // }
1928
- // }
1929
- // $str .= "</optgroup>";
1930
- // }
1931
  return $str;
1932
  }
1933
 
1701
  * Get All Default WooCommerce Attributes
1702
  * @return bool|array
1703
  */
1704
+ public function getAllAttributes() {
 
1705
  global $wpdb;
1706
+ $info = array();
1707
+ /** @noinspection SqlResolve */
1708
  //Load the main attributes
1709
+ $sql = 'SELECT DISTINCT( attribute_name ) AS name, attribute_label as label FROM ' . $wpdb->prefix . 'woocommerce_attribute_taxonomies';
 
 
1710
  $data = $wpdb->get_results($sql);
1711
+ if ( count( $data ) ) {
1712
  foreach ($data as $key => $value) {
1713
+ $info["wf_attr_pa_" . $value->name] = $value->label;
1714
  }
1715
  return $info;
1716
  }
1722
  * Get All Custom Attributes
1723
  * @return array|bool
1724
  */
1725
+ public function getAllCustomAttributes() {
 
1726
  global $wpdb;
1727
  $info = array();
1728
  //Load the main attributes
1729
+ /** @noinspection SqlResolve,SpellCheckingInspection */
1730
+ $sql = "SELECT DISTINCT( meta_key ) FROM $wpdb->postmeta
1731
+ WHERE post_id IN (
1732
+ SELECT ID FROM $wpdb->posts WHERE post_type = 'product' OR post_type = 'product_variation'
1733
+ ) AND (
1734
+ meta_key NOT IN ('_edit_lock', '_wp_old_slug', '_edit_last', '_yith_wcpb_bundle_data', '_wpcom_is_markdown', '_downloadable_files', '_product_attributes', '_children', '_et_builder_version' )
1735
+ AND meta_key NOT LIKE '%_et_pb_%'
1736
+ )";
1737
  $data = $wpdb->get_results($sql);
1738
+ if ( count( $data ) ) {
1739
+ foreach ($data as $key => $value ) {
1740
+ /** @noinspection SpellCheckingInspection */
1741
+ $info["wf_cattr_" . $value->meta_key] = $value->meta_key;
 
1742
  }
1743
  return $info;
1744
  }
1745
  return false;
1746
  }
1747
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1748
 
1749
  /**
1750
  * Get Category Mappings
1769
  return false;
1770
  }
1771
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1772
 
1773
  /**
1774
  * Local Attribute List to map product value with merchant attributes
1837
  $sltd = "";
1838
  $str .= "<optgroup label='Primary Attributes'>";
1839
  foreach ($attributes as $key => $value) {
1840
+ /** @noinspection HtmlUnknownAttribute */
1841
+ $str .= sprintf(
1842
+ '<option value="%s"%s>%s</option>',
1843
+ $key,
1844
+ ! $is_selected ? $is_selected = selected( $selected, $key, false ) : '',
1845
+ $value
1846
+ );
1847
  }
1848
  $str .= "</optgroup>";
1849
 
1851
  if ($images) {
1852
  $str .= "<optgroup label='Image Attributes'>";
1853
  foreach ($images as $key => $value) {
1854
+ $str .= sprintf(
1855
+ '<option value="%s"%s>%s</option>',
1856
+ $key,
1857
+ ! $is_selected ? $is_selected = selected( $selected, $key, false ) : '',
1858
+ $value
1859
+ );
1860
  }
1861
  $str .= "</optgroup>";
1862
  }
1866
  if ($vAttributes) {
1867
  $str .= "<optgroup label='Product Attributes'>";
1868
  foreach ($vAttributes as $key => $value) {
1869
+ $str .= sprintf(
1870
+ '<option value="%s"%s>%s</option>',
1871
+ $key,
1872
+ ! $is_selected ? $is_selected = selected( $selected, $key, false ) : '',
1873
+ $value
1874
+ );
1875
  }
1876
  $str .= "</optgroup>";
1877
  }
1878
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1879
  return $str;
1880
  }
1881
 
woo-feed.php CHANGED
@@ -15,7 +15,7 @@
15
  * Plugin Name: WooCommerce Product Feed
16
  * Plugin URI: https://webappick.com/
17
  * Description: This plugin generate WooCommerce product feed for Shopping Engines like Google Shopping,Facebook Product Feed,eBay,Amazon,Idealo and many more..
18
- * Version: 3.1.32
19
  * Author: WebAppick
20
  * Author URI: https://webappick.com/
21
  * License: GPL v2
@@ -24,6 +24,7 @@
24
  * Domain Path: /languages
25
  * WC requires at least: 2.6
26
  * WC tested up to: 3.6
 
27
  */
28
 
29
  // If this file is called directly, abort.
@@ -35,7 +36,7 @@ if (!defined('ABSPATH')) {
35
  exit;
36
  }
37
 
38
- define( 'WOO_FEED_VERSION', '3.1.32' );
39
 
40
  /**
41
  * Plugin Path with trailing slash
@@ -118,11 +119,14 @@ add_action('wp_ajax_get_feed_merchant', 'feed_merchant_view');
118
  function feed_merchant_view()
119
  {
120
  check_ajax_referer('wpf_feed_nonce');
121
- $dropDown = new Woo_Feed_Dropdown();
122
- $product = new Woo_Feed_Products();
 
 
 
123
  $attributes = new Woo_Feed_Default_Attributes();
124
- $merchant = sanitize_text_field($_POST['merchant']);
125
- $provider = sanitize_text_field($_POST['merchant']);
126
  if(strpos($merchant,'amazon')!==false){
127
  include plugin_dir_path(__FILE__) . "admin/partials/templates/amazon_add-feed.php";
128
  }
@@ -532,12 +536,12 @@ add_action('wp_ajax_nopriv_save_feed_file', 'woo_feed_save_feed_file');
532
  function woo_feed_save_feed_file(){
533
 
534
  check_ajax_referer('wpf_feed_nonce');
535
- $feed=str_replace("wf_feed_", "",$_POST['feed']);
536
 
537
  $info=get_option($feed);
538
 
539
  if(!$info){
540
- $getInfo=unserialize(get_option($_POST['feed']));
541
  $info=$getInfo['feedrules'];
542
  }
543
 
15
  * Plugin Name: WooCommerce Product Feed
16
  * Plugin URI: https://webappick.com/
17
  * Description: This plugin generate WooCommerce product feed for Shopping Engines like Google Shopping,Facebook Product Feed,eBay,Amazon,Idealo and many more..
18
+ * Version: 3.1.33
19
  * Author: WebAppick
20
  * Author URI: https://webappick.com/
21
  * License: GPL v2
24
  * Domain Path: /languages
25
  * WC requires at least: 2.6
26
  * WC tested up to: 3.6
27
+ *
28
  */
29
 
30
  // If this file is called directly, abort.
36
  exit;
37
  }
38
 
39
+ define( 'WOO_FEED_VERSION', '3.1.33' );
40
 
41
  /**
42
  * Plugin Path with trailing slash
119
  function feed_merchant_view()
120
  {
121
  check_ajax_referer('wpf_feed_nonce');
122
+ /** @noinspection PhpUnusedLocalVariableInspection */
123
+ $dropDown = new Woo_Feed_Dropdown();
124
+ /** @noinspection PhpUnusedLocalVariableInspection */
125
+ $product = new Woo_Feed_Products();
126
+ /** @noinspection PhpUnusedLocalVariableInspection */
127
  $attributes = new Woo_Feed_Default_Attributes();
128
+ /** @noinspection PhpUnusedLocalVariableInspection */
129
+ $merchant = $provider = sanitize_text_field($_POST['merchant']);
130
  if(strpos($merchant,'amazon')!==false){
131
  include plugin_dir_path(__FILE__) . "admin/partials/templates/amazon_add-feed.php";
132
  }
536
  function woo_feed_save_feed_file(){
537
 
538
  check_ajax_referer('wpf_feed_nonce');
539
+ $feed=str_replace("wf_feed_", "",$_REQUEST['feed']);
540
 
541
  $info=get_option($feed);
542
 
543
  if(!$info){
544
+ $getInfo=unserialize(get_option($_REQUEST['feed']));
545
  $info=$getInfo['feedrules'];
546
  }
547