CTX Feed – WooCommerce Product Feed Manager Plugin - Version 3.1.44

Version Description

(2019-10-31) = * Remove Duplicate Css * Fix success message not showing * Fix PHP non-numeric value & counting null warning

Download this release

Release Info

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

Code changes from version 3.1.43 to 3.1.44

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.3
7
- Stable tag: 3.1.43
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -304,6 +304,11 @@ Using pro version:
304
 
305
  == Changelog ==
306
 
 
 
 
 
 
307
  = 3.1.43 (2019-10-27) =
308
  * Improve Page loading performance on feed editor
309
  * FTP Module detection added in `FTP/SFTP` tab in feed editor
4
  Tags:woocommerce,google product feed,facebook product feed,woocommerce product feed,woocommerce,
5
  Requires at least: 3.6
6
  Tested Up To: 5.3
7
+ Stable tag: 3.1.44
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.44 (2019-10-31) =
308
+ * Remove Duplicate Css
309
+ * Fix success message not showing
310
+ * Fix PHP non-numeric value & counting null warning
311
+
312
  = 3.1.43 (2019-10-27) =
313
  * Improve Page loading performance on feed editor
314
  * FTP Module detection added in `FTP/SFTP` tab in feed editor
admin/partials/woo-feed-manage-list.php CHANGED
@@ -10,51 +10,47 @@
10
  * @author Ohidul Islam <wahid@webappick.com>
11
  */
12
  $myListTable = new Woo_Feed_Manage_list();
 
13
  ?>
14
-
15
  <div class="wrap">
16
  <h2><?php _e('Manage Feed', 'woo-feed'); ?>
17
  <a href="<?php echo admin_url('admin.php?page=webappick-product-feed-for-woocommerce/admin/class-woo-feed-admin.php'); ?>"
18
  class="page-title-action"><?php _e('New Feed', 'woo-feed'); ?></a>
19
  </h2>
20
  <?php echo WPFFWMessage()->infoMessage1(); ?>
21
-
22
-
23
- <table class="table widefat fixed" id="feedprogresstable" style="display: none;">
24
- <thead>
25
- <tr>
26
- <th><b>Generating Product Feed</b></th>
27
- </tr>
28
- </thead>
29
- <tbody>
30
- <tr>
31
- <td>
32
- <div class="feed-progress-container">
33
- <div class="feed-progress-bar" >
34
- <span class="feed-progress-bar-fill"></span>
35
- </div>
36
- </div>
37
- </td>
38
- </tr>
39
- <tr>
40
- <td>
41
- <div style="float: left;"><b style='color: darkblue;'><i class='dashicons dashicons-sos wpf_sos'></i></b>&nbsp;&nbsp;&nbsp;</div>
42
- <div class="feed-progress-container2" style="float: left;font-weight: bold;color: darkblue;">
43
-
44
- </div>
45
- <div class="feed-progress-container3" style="text-align:right;font-weight: bolder;color: #41f49d;font-family:'Arial Black';font-size: large;">
46
-
47
- </div>
48
- </td>
49
- </tr>
50
- </tbody>
51
- </table>
52
  <br><br>
53
-
54
  <?php
55
-
56
  $link = filter_input( INPUT_GET, 'link', FILTER_VALIDATE_URL );
57
-
 
 
 
 
58
  if (isset($link) && !empty($link)) {
59
  $message="<b style='color: #008779;'>Feed Generated Successfully. Feed URL: <a href=".esc_url($link)." target='_blank'>".esc_url($link)."</a></b>";
60
  if (isset($_GET['cat']) && $_GET['cat']=='no') {
@@ -83,7 +79,9 @@ $myListTable = new Woo_Feed_Manage_list();
83
  <form action="" method="post">
84
  <b><?php _e('Interval'); ?></b>&nbsp;&nbsp;&nbsp;
85
  <select name="wf_schedule" id="wf_schedule">
86
- <?php $interval = get_option('wf_schedule'); ?>
 
 
87
  <option <?php echo ($interval && $interval == "604800") ? "selected" : ""; ?> value="604800">1 Week</option>
88
  <option <?php echo ($interval && $interval == "86400") ? "selected" : ""; ?> value="86400">24 Hours</option>
89
  <option <?php echo ($interval && $interval == "43200") ? "selected" : ""; ?> value="43200">12 Hours</option>
@@ -108,9 +106,8 @@ $myListTable = new Woo_Feed_Manage_list();
108
  </div>
109
 
110
  <script type="text/javascript">
111
- (function( $ ) {
112
  'use strict';
113
-
114
  /**
115
  * All of the code for your admin-facing JavaScript source
116
  * should reside in this file.
@@ -122,56 +119,56 @@ $myListTable = new Woo_Feed_Manage_list();
122
  * This enables you to define handlers, for when the DOM is ready:
123
  *
124
  * $(function() {
125
- *
126
- * });
127
  *
128
- * When the window is loaded:
129
  */
130
-
 
 
 
131
  $( window ).load(function() {
132
-
133
- $('body').find(".single-feed-delete").click(function () {
134
- if (confirm('<?php _e('Are You Sure to Delete ?','woo-feed');?>')) {
 
 
 
 
 
 
 
 
 
 
 
 
135
  var url = jQuery(this).attr('val');
136
  window.location.href = url;
137
  }
138
  });
139
 
 
140
  $('#doaction, #doaction2').click(function () {
141
- if (confirm('<?php _e('Are You Sure to Delete ?','woo-feed'); ?>'))
142
- return true;
143
- else
144
- return false;
145
  });
146
-
147
- var fileName="<?php echo isset($fileName)?$fileName:''; ?>"; // wf_config+xxxx
148
- <?php $limit=get_option("woo_feed_per_batch");?>
149
- var limit=<?php echo ($limit)?$limit:200; ?>;
150
- if(fileName!=""){
151
- $("#feedprogresstable").show();
152
-
153
  generate_feed();
154
  }
155
-
156
  //==================Manage Feed==============================
157
  // Feed Regenerate
158
- $('.wpf_regenerate').on("click",function (e) {
159
- var elem = $('.wpf_regenerate');
160
- elem.prop('disabled', true);
161
- var fName = jQuery(this).attr('id');
162
- fileName=fName.replace("wf_feed_","wf_config");
163
- $(this).text('Generating...');
164
-
165
- //alert(fileName);
166
- if(fileName){
167
- $("#feedprogresstable").show();
168
  generate_feed();
169
  }
170
-
171
  });
172
 
173
-
174
-
175
  /*#######################################################
176
  #######-------------------------------------------#######
177
  ####### Ajax Feed Making Functions Start #######
@@ -179,171 +176,133 @@ $myListTable = new Woo_Feed_Manage_list();
179
  #########################################################
180
  */
181
 
182
- // Variable responsible to hold progress bar width
183
- var width = 10;
184
-
185
- function showFeedProgress(color="#3DC264"){
186
- // Progress br init
187
- var bar = document.querySelector('.feed-progress-bar-fill');
188
- bar.style.width = width + '%';
189
- bar.style.background =color;
190
- var nWidth=Math.round(width);
191
- $(".feed-progress-container3").text(nWidth + '%');
192
  }
193
 
194
-
195
  function generate_feed() {
196
- $(".feed-progress-container2").text("Calculating total products.");
197
-
198
  $.ajax({
199
- url : wpf_ajax_obj.wpf_ajax_url,
200
  type : 'post',
201
  data : {
202
- _ajax_nonce: wpf_ajax_obj.nonce,
203
  action: "get_product_information",
204
  feed: fileName
205
  },
206
  success : function(response) {
207
- console.log(response);
208
  if(response.success) {
209
- $(".feed-progress-container2").text("Delivering Feed Configuration.");
210
- var products=parseInt(response.data.product);
211
- if(products>2000){
212
- processFeed(2000,0,0);
213
- setTimeout(function(){
214
- $(".feed-progress-container2").text("Total 2000 products will be processed.");
215
- }, 3000);
216
- }else{
217
- processFeed(products,0,0);
218
- }
219
-
220
- console.log("Counting Total Products:"+products);
221
-
222
- $(".feed-progress-container2").text("Processing Products...");
223
  }else{
224
- $(".feed-progress-container2").text(response.data.message);
225
- showFeedProgress('red');
226
  }
227
  }
228
  });
229
  }
230
 
231
-
232
- function processFeed(n,offset,batch) {
233
- if (typeof(offset)==='undefined') offset = 0;
234
- if (typeof(batch)==='undefined') batch = 0;
235
-
236
- var batches =Math.ceil(n/limit);
237
-
238
- var progressBatch=90/batches;
239
-
240
- var currentProducts=limit*batch;
241
-
242
- console.log("Batches:"+batches);
243
- console.log("progressBatch:"+progressBatch);
244
- console.log("currentProducts:"+currentProducts);
245
- console.log("Offset:"+currentProducts);
246
- console.log("Limit:"+currentProducts);
247
-
248
- //$(".feed-progress-container2").text(currentProducts+" out of "+n+" products processed.");
249
- var nWidth=Math.round(width);
250
- $(".feed-progress-container2").text("Processing products..."+nWidth+"%");
251
-
252
- if(batch<batches){
253
- var a = performance.now();
254
- console.log("Processing Batch "+batch+" of "+batches);
255
  $.ajax({
256
- url : wpf_ajax_obj.wpf_ajax_url,
257
  type : 'post',
258
  data : {
259
- _ajax_nonce: wpf_ajax_obj.nonce,
260
- action: "make_batch_feed",
261
- limit:limit,
262
- offset:offset,
263
- feed: fileName
264
  },
265
  success : function(response) {
266
- // console.log(response);
267
- if(response.success) {
268
- if(response.data.products=="yes"){
269
- offset=offset+limit;
270
  batch++;
271
-
272
- setTimeout(function(){
273
- processFeed(n,offset,batch);
274
- }, 5000);
275
-
276
- width=width+progressBatch;
277
  showFeedProgress();
278
- }else if(n>offset){
279
- offset=offset+limit;
280
  batch++;
281
-
282
- setTimeout(function(){
283
- processFeed(n,offset,batch);
284
- }, 5000);
285
-
286
- width=width+progressBatch;
287
  showFeedProgress();
288
  }else{
289
- $(".feed-progress-container2").text("Saving feed file.");
290
  save_feed_file();
291
  }
292
  }
293
  },
294
  error:function (response) {
295
- if(response.status!=="200"){
296
- offset=(offset-limit)+10;
297
  batch++;
298
- processFeed(n,offset,batch);
299
-
300
- width=width+progressBatch;
301
  showFeedProgress();
302
  }
303
  console.log(response);
304
  }
305
  });
306
-
307
  }else{
308
- $(".feed-progress-container2").text("Saving feed file.");
309
  save_feed_file();
310
  }
311
  }
312
 
313
-
314
  /**
315
  * Save feed file into WordPress upload directory
316
  * after successfully processing the feed
317
  */
318
  function save_feed_file(){
 
 
 
 
319
  $.ajax({
320
- url : wpf_ajax_obj.wpf_ajax_url,
321
  type : 'post',
322
  data : {
323
- _ajax_nonce: wpf_ajax_obj.nonce,
324
  action: "save_feed_file",
325
- feed:fileName
326
  },
327
- success : function(response) {
328
- console.log(response);
329
- if(response.success) {
330
- width ='100';
331
  showFeedProgress();
332
- $(".feed-progress-container2").text(response.data.message);
333
- //$("#feedprogresstable").hide();
334
- $('.wf_regenerate').text('Regenerate');
335
- $('.wf_regenerate').prop('disabled', false);
336
- var url=response.data.url;
337
- var cat=response.data.cat;
338
- window.location.href = "<?php echo admin_url('admin.php?page=woo_feed_manage_feed&link='); ?>"+url+"&cat="+cat
339
  }else{
340
- showFeedProgress("red");
341
- $(".feed-progress-container2").text(response.data.message);
342
  }
343
  },
344
- error:function (response) {
345
- console.log(response);
346
- $(".feed-progress-container2").text("Failed to save feed file.");
347
  }
348
  });
349
  }
@@ -354,14 +313,7 @@ $myListTable = new Woo_Feed_Manage_list();
354
  #######-------------------------------------------#######
355
  #########################################################
356
  */
357
-
358
-
359
-
360
-
361
  });
362
-
363
-
364
-
365
  /**
366
  * ...and/or other possibilities.
367
  *
@@ -370,38 +322,5 @@ $myListTable = new Woo_Feed_Manage_list();
370
  * Although scripts in the WordPress core, Plugins and Themes may be
371
  * practising this, we should strive to set a better example in our own work.
372
  */
373
-
374
- })( jQuery );
375
- /**
376
- * Created by md.ohidulislam on 4/1/17.
377
- */
378
- </script>
379
-
380
- <style>
381
-
382
- .feed-progress-container {
383
- width:100%;
384
- color: white;
385
- text-align: center;
386
- font-weight: 300;
387
- }
388
-
389
- .feed-progress-bar {
390
- width:100%;
391
- background:#eee;
392
- padding:3px;
393
- border-radius:3px;
394
- box-shadow:inset 0px 1px 3px rgba(0,0,0,.2);
395
- }
396
-
397
- .feed-progress-bar-fill {
398
- height:20px;
399
- display:block;
400
- background:#3DC264;
401
- width:0%;
402
- border-radius:3px;
403
-
404
- -webkit-transition:width 0.8s ease;
405
- transition:width 0.8s ease;
406
- }
407
- </style>
10
  * @author Ohidul Islam <wahid@webappick.com>
11
  */
12
  $myListTable = new Woo_Feed_Manage_list();
13
+ $limit = get_option( "woo_feed_per_batch", 200 );
14
  ?>
 
15
  <div class="wrap">
16
  <h2><?php _e('Manage Feed', 'woo-feed'); ?>
17
  <a href="<?php echo admin_url('admin.php?page=webappick-product-feed-for-woocommerce/admin/class-woo-feed-admin.php'); ?>"
18
  class="page-title-action"><?php _e('New Feed', 'woo-feed'); ?></a>
19
  </h2>
20
  <?php echo WPFFWMessage()->infoMessage1(); ?>
21
+ <table class="table widefat fixed" id="feedprogresstable" style="display: none;">
22
+ <thead>
23
+ <tr>
24
+ <th><b>Generating Product Feed</b></th>
25
+ </tr>
26
+ </thead>
27
+ <tbody>
28
+ <tr>
29
+ <td>
30
+ <div class="feed-progress-container">
31
+ <div class="feed-progress-bar" >
32
+ <span class="feed-progress-bar-fill"></span>
33
+ </div>
34
+ </div>
35
+ </td>
36
+ </tr>
37
+ <tr>
38
+ <td>
39
+ <div style="float: left;"><b style='color: darkblue;'><i class='dashicons dashicons-sos wpf_sos'></i></b>&nbsp;&nbsp;&nbsp;</div>
40
+ <div class="feed-progress-status"></div>
41
+ <div class="feed-progress-percentage"></div>
42
+ </td>
43
+ </tr>
44
+ </tbody>
45
+ </table>
 
 
 
 
 
 
46
  <br><br>
 
47
  <?php
 
48
  $link = filter_input( INPUT_GET, 'link', FILTER_VALIDATE_URL );
49
+ /**
50
+ * @TODO use gettext functions
51
+ * @TODO use session/cookies/localstorage or transient api for this message
52
+ * @see settings_errors()
53
+ */
54
  if (isset($link) && !empty($link)) {
55
  $message="<b style='color: #008779;'>Feed Generated Successfully. Feed URL: <a href=".esc_url($link)." target='_blank'>".esc_url($link)."</a></b>";
56
  if (isset($_GET['cat']) && $_GET['cat']=='no') {
79
  <form action="" method="post">
80
  <b><?php _e('Interval'); ?></b>&nbsp;&nbsp;&nbsp;
81
  <select name="wf_schedule" id="wf_schedule">
82
+ <?php
83
+ //@TODO use filter with array for the dropdown
84
+ $interval = get_option('wf_schedule'); ?>
85
  <option <?php echo ($interval && $interval == "604800") ? "selected" : ""; ?> value="604800">1 Week</option>
86
  <option <?php echo ($interval && $interval == "86400") ? "selected" : ""; ?> value="86400">24 Hours</option>
87
  <option <?php echo ($interval && $interval == "43200") ? "selected" : ""; ?> value="43200">12 Hours</option>
106
  </div>
107
 
108
  <script type="text/javascript">
109
+ (function( $, window, document, opts ) {
110
  'use strict';
 
111
  /**
112
  * All of the code for your admin-facing JavaScript source
113
  * should reside in this file.
119
  * This enables you to define handlers, for when the DOM is ready:
120
  *
121
  * $(function() {
122
+ * });
 
123
  *
 
124
  */
125
+ /**
126
+ * On Window Load
127
+ * @TODO move this to js file so we can minify this.
128
+ */
129
  $( window ).load(function() {
130
+ var feedProgress = {
131
+ table: $( '#feedprogresstable' ),
132
+ status: $( '.feed-progress-status' ),
133
+ percentage: $( '.feed-progress-percentage' ),
134
+ bar: $( '.feed-progress-bar-fill' ),
135
+ barProgress: 10, // Variable responsible to hold progress bar width
136
+ },
137
+ regenerateBtn = $( '.wpf_regenerate' ),
138
+ fileName = "<?php echo isset( $fileName )? $fileName : ''; ?>", // wf_config+xxxx
139
+ limit = <?php echo ( $limit ) ? $limit : 200; ?>;
140
+
141
+ // feed delete alert
142
+ $( '.single-feed-delete' ).click( function ( event ) {
143
+ event.preventDefault();
144
+ if ( confirm( '<?php _e('Are You Sure to Delete?','woo-feed');?>' ) ) {
145
  var url = jQuery(this).attr('val');
146
  window.location.href = url;
147
  }
148
  });
149
 
150
+ // bulk delete alert
151
  $('#doaction, #doaction2').click(function () {
152
+ return confirm('<?php _e('Are You Sure to Delete?','woo-feed'); ?>');
 
 
 
153
  });
154
+ // generate feed
155
+ if( fileName !== "" ) {
156
+ feedProgress.table.show();
 
 
 
 
157
  generate_feed();
158
  }
 
159
  //==================Manage Feed==============================
160
  // Feed Regenerate
161
+ regenerateBtn.on( "click", function () {
162
+ var el = $( this );
163
+ regenerateBtn.disabled();
164
+ fileName = el.attr( 'id' ).replace( "wf_feed_", "wf_config" );
165
+ el.val( 'Generating...' );
166
+ if( fileName ) {
167
+ feedProgress.table.show();
 
 
 
168
  generate_feed();
169
  }
 
170
  });
171
 
 
 
172
  /*#######################################################
173
  #######-------------------------------------------#######
174
  ####### Ajax Feed Making Functions Start #######
176
  #########################################################
177
  */
178
 
179
+ function showFeedProgress( color ){
180
+ feedProgress.bar.css( {
181
+ width: feedProgress.barProgress + '%',
182
+ background: color || "#3DC264",
183
+ } );
184
+ feedProgress.percentage.text( Math.round( feedProgress.barProgress ) + '%' );
 
 
 
 
185
  }
186
 
 
187
  function generate_feed() {
188
+ console.log( "Counting Total Products" );
189
+ feedProgress.status.text( "Calculating total products." );
190
  $.ajax({
191
+ url : opts.wpf_ajax_url,
192
  type : 'post',
193
  data : {
194
+ _ajax_nonce: opts.nonce,
195
  action: "get_product_information",
196
  feed: fileName
197
  },
198
  success : function(response) {
199
+ console.log( response );
200
  if(response.success) {
201
+ feedProgress.status.text( "Delivering Feed Configuration." );
202
+ processFeed( parseInt( response.data.product ) );
203
+ //feedProgress.status.text("Total "+products+" products found.");
204
+ feedProgress.status.text( "Processing Products..." );
 
 
 
 
 
 
 
 
 
 
205
  }else{
206
+ feedProgress.status.text(response.data.message);
207
+ showFeedProgress( 'red' );
208
  }
209
  }
210
  });
211
  }
212
 
213
+ function processFeed( n, offset, batch ) {
214
+ if ( typeof( offset ) === 'undefined' ) offset = 0;
215
+ if ( typeof( batch ) === 'undefined' ) batch = 0;
216
+ var batches = Math.ceil( n/limit ),
217
+ progressBatch = 90 / batches;
218
+ console.log( ( limit*batch ) + " out of " + n + " products processed." );
219
+ feedProgress.status.text( "Processing products..." + Math.round( feedProgress.barProgress ) + "%" );
220
+ if( batch < batches ) {
221
+ console.log( "Processing Batch " + batch + " of " + batches );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
222
  $.ajax({
223
+ url : opts.wpf_ajax_url,
224
  type : 'post',
225
  data : {
226
+ _ajax_nonce: opts.nonce, action: "make_batch_feed",
227
+ limit: limit, offset: offset, feed: fileName
 
 
 
228
  },
229
  success : function(response) {
230
+ console.log( response );
231
+ if( response.success ) {
232
+ if( response.data.products === "yes" ) {
233
+ offset = offset+limit;
234
  batch++;
235
+ setTimeout( function(){
236
+ processFeed( n, offset, batch );
237
+ }, 2000 );
238
+ feedProgress.barProgress = feedProgress.barProgress + progressBatch;
 
 
239
  showFeedProgress();
240
+ } else if( n > offset ) {
241
+ offset = offset+limit;
242
  batch++;
243
+ processFeed( n, offset, batch );
244
+ feedProgress.barProgress = feedProgress.barProgress + progressBatch;
 
 
 
 
245
  showFeedProgress();
246
  }else{
247
+ feedProgress.status.text( "Saving feed file." );
248
  save_feed_file();
249
  }
250
  }
251
  },
252
  error:function (response) {
253
+ if( response.status !== "200" ) {
254
+ offset = (offset-limit)+10;
255
  batch++;
256
+ processFeed( n, offset, batch );
257
+ feedProgress.barProgress = feedProgress.barProgress + progressBatch;
 
258
  showFeedProgress();
259
  }
260
  console.log(response);
261
  }
262
  });
 
263
  }else{
264
+ feedProgress.status.text("Saving feed file.");
265
  save_feed_file();
266
  }
267
  }
268
 
 
269
  /**
270
  * Save feed file into WordPress upload directory
271
  * after successfully processing the feed
272
  */
273
  function save_feed_file(){
274
+ // Polylang codes
275
+ // var params = window.location.search.slice(1);
276
+ // var searchParam = new URLSearchParams(params);
277
+ // var old_lang = searchParam.get('old_lang');
278
  $.ajax({
279
+ url : opts.wpf_ajax_url,
280
  type : 'post',
281
  data : {
282
+ _ajax_nonce: opts.nonce,
283
  action: "save_feed_file",
284
+ feed: fileName
285
  },
286
+ success : function( response ) {
287
+ console.log( response );
288
+ if( response.success ) {
289
+ feedProgress.barProgress = 100;
290
  showFeedProgress();
291
+ feedProgress.status.text( response.data.message );
292
+ regenerateBtn.val( 'Regenerate' );
293
+ regenerateBtn.disabled( false );
294
+ // var default_polylang = (response.data.default_polylang) ? response.data.default_polylang : '';
295
+ window.location.href = "<?php echo admin_url( 'admin.php?WPFP_WPML_CURLANG=yes&page=webappick-manage-feeds&link=' ); ?>" + response.data.url + "&cat=" + response.data.cat;
296
+ // Polylang code
297
+ // window.location.href = "<?php // echo admin_url('admin.php?WPFP_WPML_CURLANG=yes&page=webappick-manage-feeds&link='); ?>"+url+"&cat="+cat + "&lang=" + old_lang;
298
  }else{
299
+ showFeedProgress( "red" );
300
+ feedProgress.status.text( response.data.message );
301
  }
302
  },
303
+ error:function ( response ) {
304
+ console.log( response );
305
+ feedProgress.status.text( "Failed to save feed file." );
306
  }
307
  });
308
  }
313
  #######-------------------------------------------#######
314
  #########################################################
315
  */
 
 
 
 
316
  });
 
 
 
317
  /**
318
  * ...and/or other possibilities.
319
  *
322
  * Although scripts in the WordPress core, Plugins and Themes may be
323
  * practising this, we should strive to set a better example in our own work.
324
  */
325
+ })( jQuery, window, document, wpf_ajax_obj );
326
+ </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/classes/class-woo-feed-products.php CHANGED
@@ -664,7 +664,9 @@ class Woo_Feed_Products {
664
  continue; // make sure that the product exists..
665
  }
666
  $regularPrice = $product->get_regular_price();
 
667
  $currentPrice = $product->get_price();
 
668
  if( $type == "regular" ) {
669
  if( $taxable ) {
670
  $regularPrice=$this->getPriceWithTax($product);
664
  continue; // make sure that the product exists..
665
  }
666
  $regularPrice = $product->get_regular_price();
667
+ if( empty( $regularPrice ) ) $regularPrice = 0;
668
  $currentPrice = $product->get_price();
669
+ if( empty( $currentPrice ) ) $currentPrice = 0;
670
  if( $type == "regular" ) {
671
  if( $taxable ) {
672
  $regularPrice=$this->getPriceWithTax($product);
includes/feeds/class-woo-feed-amazon.php CHANGED
@@ -73,13 +73,13 @@ class Woo_Feed_Amazon
73
  */
74
  public function get_txt_feed()
75
  {
76
- if (count($this->products)) {
77
 
78
  $delimiter = "\t";
79
  $enclosure = "";
80
  $getHeader=new Woo_Feed_Default_Attributes();
81
 
82
- if (count($this->products)) {
83
  $provider= $this->rules['provider'];
84
  $firstRow=$provider."_first_row";
85
  $method=$provider."Attributes";
73
  */
74
  public function get_txt_feed()
75
  {
76
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
77
 
78
  $delimiter = "\t";
79
  $enclosure = "";
80
  $getHeader=new Woo_Feed_Default_Attributes();
81
 
82
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
83
  $provider= $this->rules['provider'];
84
  $firstRow=$provider."_first_row";
85
  $method=$provider."Attributes";
includes/feeds/class-woo-feed-become.php CHANGED
@@ -96,7 +96,7 @@ class Become
96
  {
97
  //Basic product information
98
 
99
- if (count($this->products)) {
100
  foreach ($this->products as $key => $values) {
101
  foreach ($values as $attr => $value) {
102
  $this->products[$key][$attr] = $this->formatXMLLine($attr, $value, true, true, true);
@@ -112,7 +112,7 @@ class Become
112
  {
113
  //Basic product information
114
 
115
- if (count($this->products)) {
116
  foreach ($this->products as $key => $values) {
117
  foreach ($values as $attr => $value) {
118
  //Allow force strip HTML
@@ -625,7 +625,7 @@ class Become
625
  */
626
  public function get_txt_feed()
627
  {
628
- if (count($this->products)) {
629
  $headers = array_keys($this->products[0]);
630
  $feed[] = $headers;
631
  foreach ($this->products as $no => $product) {
@@ -650,7 +650,7 @@ class Become
650
  */
651
  public function get_csv_feed()
652
  {
653
- if (count($this->products)) {
654
  $headers = array_keys($this->products[0]);
655
  $feed[] = $headers;
656
  foreach ($this->products as $no => $product) {
96
  {
97
  //Basic product information
98
 
99
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
100
  foreach ($this->products as $key => $values) {
101
  foreach ($values as $attr => $value) {
102
  $this->products[$key][$attr] = $this->formatXMLLine($attr, $value, true, true, true);
112
  {
113
  //Basic product information
114
 
115
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
116
  foreach ($this->products as $key => $values) {
117
  foreach ($values as $attr => $value) {
118
  //Allow force strip HTML
625
  */
626
  public function get_txt_feed()
627
  {
628
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
629
  $headers = array_keys($this->products[0]);
630
  $feed[] = $headers;
631
  foreach ($this->products as $no => $product) {
650
  */
651
  public function get_csv_feed()
652
  {
653
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
654
  $headers = array_keys($this->products[0]);
655
  $feed[] = $headers;
656
  foreach ($this->products as $no => $product) {
includes/feeds/class-woo-feed-bing.php CHANGED
@@ -95,7 +95,7 @@ class Bing
95
  {
96
  //Basic product information
97
 
98
- if (count($this->products)) {
99
  foreach ($this->products as $key => $values) {
100
  foreach ($values as $attr => $value) {
101
  $this->products[$key][$attr] = $this->formatXMLLine($attr, $value, true, true, true);
@@ -111,7 +111,7 @@ class Bing
111
  {
112
  //Basic product information
113
 
114
- if (count($this->products)) {
115
  foreach ($this->products as $key => $values) {
116
  foreach ($values as $attr => $value) {
117
  //Allow force strip HTML
@@ -612,7 +612,7 @@ class Bing
612
  */
613
  public function get_txt_feed()
614
  {
615
- if (count($this->products)) {
616
  $headers = array_keys($this->products[0]);
617
  $feed[] = $headers;
618
  foreach ($this->products as $no => $product) {
@@ -633,7 +633,7 @@ class Bing
633
 
634
  public function get_csv_feed()
635
  {
636
- if (count($this->products)) {
637
  $headers = array_keys($this->products[0]);
638
  $feed[] = $headers;
639
  foreach ($this->products as $no => $product) {
95
  {
96
  //Basic product information
97
 
98
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
99
  foreach ($this->products as $key => $values) {
100
  foreach ($values as $attr => $value) {
101
  $this->products[$key][$attr] = $this->formatXMLLine($attr, $value, true, true, true);
111
  {
112
  //Basic product information
113
 
114
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
115
  foreach ($this->products as $key => $values) {
116
  foreach ($values as $attr => $value) {
117
  //Allow force strip HTML
612
  */
613
  public function get_txt_feed()
614
  {
615
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
616
  $headers = array_keys($this->products[0]);
617
  $feed[] = $headers;
618
  foreach ($this->products as $no => $product) {
633
 
634
  public function get_csv_feed()
635
  {
636
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
637
  $headers = array_keys($this->products[0]);
638
  $feed[] = $headers;
639
  foreach ($this->products as $no => $product) {
includes/feeds/class-woo-feed-connexity.php CHANGED
@@ -96,7 +96,7 @@ class Connexity
96
  {
97
  //Basic product information
98
 
99
- if (count($this->products)) {
100
  foreach ($this->products as $key => $values) {
101
  foreach ($values as $attr => $value) {
102
  $this->products[$key][$attr] = $this->formatXMLLine($attr, $value, true, true, true);
@@ -112,7 +112,7 @@ class Connexity
112
  {
113
  //Basic product information
114
 
115
- if (count($this->products)) {
116
  foreach ($this->products as $key => $values) {
117
  foreach ($values as $attr => $value) {
118
  //Allow force strip HTML
@@ -625,7 +625,7 @@ class Connexity
625
  */
626
  public function get_txt_feed()
627
  {
628
- if (count($this->products)) {
629
  $headers = array_keys($this->products[0]);
630
  $feed[] = $headers;
631
  foreach ($this->products as $no => $product) {
@@ -650,7 +650,7 @@ class Connexity
650
  */
651
  public function get_csv_feed()
652
  {
653
- if (count($this->products)) {
654
  $headers = array_keys($this->products[0]);
655
  $feed[] = $headers;
656
  foreach ($this->products as $no => $product) {
96
  {
97
  //Basic product information
98
 
99
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
100
  foreach ($this->products as $key => $values) {
101
  foreach ($values as $attr => $value) {
102
  $this->products[$key][$attr] = $this->formatXMLLine($attr, $value, true, true, true);
112
  {
113
  //Basic product information
114
 
115
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
116
  foreach ($this->products as $key => $values) {
117
  foreach ($values as $attr => $value) {
118
  //Allow force strip HTML
625
  */
626
  public function get_txt_feed()
627
  {
628
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
629
  $headers = array_keys($this->products[0]);
630
  $feed[] = $headers;
631
  foreach ($this->products as $no => $product) {
650
  */
651
  public function get_csv_feed()
652
  {
653
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
654
  $headers = array_keys($this->products[0]);
655
  $feed[] = $headers;
656
  foreach ($this->products as $no => $product) {
includes/feeds/class-woo-feed-facebook.php CHANGED
@@ -220,7 +220,7 @@ class Woo_Feed_Facebook
220
  "included_destination" => array("g:included_destination", true),
221
  );
222
 
223
- if (count($this->products)) {
224
  foreach ($this->products as $no => $product) {
225
  foreach ($product as $key => $value) {
226
  $this->mapAttribute($no, $key, $googleXMLAttribute[$key][0], $value, $googleXMLAttribute[$key][0]);
@@ -309,7 +309,7 @@ class Woo_Feed_Facebook
309
  "included_destination" => array("included destination", true),
310
  );
311
 
312
- if (count($this->products)) {
313
  foreach ($this->products as $no => $product) {
314
  foreach ($product as $key => $value) {
315
  $this->mapAttribute($no, $key, str_replace(" ", "_", $googleCSVTXTAttribute[$key][0]), $value, $googleCSVTXTAttribute[$key][0]);
220
  "included_destination" => array("g:included_destination", true),
221
  );
222
 
223
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
224
  foreach ($this->products as $no => $product) {
225
  foreach ($product as $key => $value) {
226
  $this->mapAttribute($no, $key, $googleXMLAttribute[$key][0], $value, $googleXMLAttribute[$key][0]);
309
  "included_destination" => array("included destination", true),
310
  );
311
 
312
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
313
  foreach ($this->products as $no => $product) {
314
  foreach ($product as $key => $value) {
315
  $this->mapAttribute($no, $key, str_replace(" ", "_", $googleCSVTXTAttribute[$key][0]), $value, $googleCSVTXTAttribute[$key][0]);
includes/feeds/class-woo-feed-google.php CHANGED
@@ -237,7 +237,7 @@ class Woo_Feed_Google
237
  "cost_of_goods_sold" => array("g:cost_of_goods_sold", true),
238
  );
239
 
240
- if (count($this->products)) {
241
  foreach ($this->products as $no => $product) {
242
  $this->identifier_status_add($no);
243
  foreach ($product as $key => $value) {
@@ -332,7 +332,7 @@ class Woo_Feed_Google
332
  "cost_of_goods_sold" => array("cost of goods sold", true),
333
  );
334
 
335
- if (count($this->products)) {
336
  foreach ($this->products as $no => $product) {
337
  foreach ($product as $key => $value) {
338
  $this->mapAttribute($no, $key, $googleCSVTXTAttribute[$key][0], $value, $googleCSVTXTAttribute[$key][0]);
237
  "cost_of_goods_sold" => array("g:cost_of_goods_sold", true),
238
  );
239
 
240
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
241
  foreach ($this->products as $no => $product) {
242
  $this->identifier_status_add($no);
243
  foreach ($product as $key => $value) {
332
  "cost_of_goods_sold" => array("cost of goods sold", true),
333
  );
334
 
335
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
336
  foreach ($this->products as $no => $product) {
337
  foreach ($product as $key => $value) {
338
  $this->mapAttribute($no, $key, $googleCSVTXTAttribute[$key][0], $value, $googleCSVTXTAttribute[$key][0]);
includes/feeds/class-woo-feed-kelkoo.php CHANGED
@@ -33,7 +33,7 @@ class Kelkoo
33
  {
34
  //Basic product information
35
 
36
- if (count($this->products)) {
37
  foreach ($this->products as $key => $values) {
38
  foreach ($values as $attr => $value) {
39
  $this->products[$key][$attr] = $this->formatXMLLine($attr, $value, true, true, true);
@@ -47,7 +47,7 @@ class Kelkoo
47
  {
48
  //Basic product information
49
 
50
- if (count($this->products)) {
51
  foreach ($this->products as $key => $values) {
52
  foreach ($values as $attr => $value) {
53
  //Allow force strip HTML
@@ -399,7 +399,7 @@ class Kelkoo
399
 
400
  public function get_txt_feed()
401
  {
402
- if (count($this->products)) {
403
  $headers = array_keys($this->products[0]);
404
  $feed[] = $headers;
405
  foreach ($this->products as $no => $product) {
@@ -420,7 +420,7 @@ class Kelkoo
420
 
421
  public function get_csv_feed()
422
  {
423
- if (count($this->products)) {
424
  $headers = array_keys($this->products[0]);
425
  $feed[] = $headers;
426
  foreach ($this->products as $no => $product) {
33
  {
34
  //Basic product information
35
 
36
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
37
  foreach ($this->products as $key => $values) {
38
  foreach ($values as $attr => $value) {
39
  $this->products[$key][$attr] = $this->formatXMLLine($attr, $value, true, true, true);
47
  {
48
  //Basic product information
49
 
50
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
51
  foreach ($this->products as $key => $values) {
52
  foreach ($values as $attr => $value) {
53
  //Allow force strip HTML
399
 
400
  public function get_txt_feed()
401
  {
402
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
403
  $headers = array_keys($this->products[0]);
404
  $feed[] = $headers;
405
  foreach ($this->products as $no => $product) {
420
 
421
  public function get_csv_feed()
422
  {
423
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
424
  $headers = array_keys($this->products[0]);
425
  $feed[] = $headers;
426
  foreach ($this->products as $no => $product) {
includes/feeds/class-woo-feed-nextag.php CHANGED
@@ -73,7 +73,7 @@ class Nextag
73
  public function mapAttributeForXML()
74
  {
75
  //Basic product information
76
- if (count($this->products)) {
77
  foreach ($this->products as $key => $values) {
78
  foreach ($values as $attr => $value) {
79
  $this->products[$key][$attr] = $this->formatXMLLine($attr, $value, true, true, true);
73
  public function mapAttributeForXML()
74
  {
75
  //Basic product information
76
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
77
  foreach ($this->products as $key => $values) {
78
  foreach ($values as $attr => $value) {
79
  $this->products[$key][$attr] = $this->formatXMLLine($attr, $value, true, true, true);
includes/feeds/class-woo-feed-pinterest.php CHANGED
@@ -227,7 +227,7 @@ class Woo_Feed_Pinterest
227
  "cost_of_goods_sold" => array("g:cost_of_goods_sold", true),
228
  );
229
 
230
- if (count($this->products)) {
231
  foreach ($this->products as $no => $product) {
232
  //echo "<pre>";
233
  //print_r($product);die();
@@ -324,7 +324,7 @@ class Woo_Feed_Pinterest
324
  "cost_of_goods_sold" => array("cost_of_goods_sold", true),
325
  );
326
 
327
- if (count($this->products)) {
328
  foreach ($this->products as $no => $product) {
329
  foreach ($product as $key => $value) {
330
  $this->mapAttribute($no, $key, $googleCSVTXTAttribute[$key][0], $value, $googleCSVTXTAttribute[$key][0]);
227
  "cost_of_goods_sold" => array("g:cost_of_goods_sold", true),
228
  );
229
 
230
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
231
  foreach ($this->products as $no => $product) {
232
  //echo "<pre>";
233
  //print_r($product);die();
324
  "cost_of_goods_sold" => array("cost_of_goods_sold", true),
325
  );
326
 
327
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
328
  foreach ($this->products as $no => $product) {
329
  foreach ($product as $key => $value) {
330
  $this->mapAttribute($no, $key, $googleCSVTXTAttribute[$key][0], $value, $googleCSVTXTAttribute[$key][0]);
includes/feeds/class-woo-feed-pricegrabber.php CHANGED
@@ -33,7 +33,7 @@ class Pricegrabber
33
  {
34
  //Basic product information
35
 
36
- if (count($this->products)) {
37
  foreach ($this->products as $key => $values) {
38
  foreach ($values as $attr => $value) {
39
  $this->products[$key][$attr] = $this->formatXMLLine($attr, $value, true, true, true);
@@ -47,7 +47,7 @@ class Pricegrabber
47
  {
48
  //Basic product information
49
 
50
- if (count($this->products)) {
51
  foreach ($this->products as $key => $values) {
52
  foreach ($values as $attr => $value) {
53
  //Allow force strip HTML
@@ -441,7 +441,7 @@ class Pricegrabber
441
 
442
  public function get_txt_feed()
443
  {
444
- if (count($this->products)) {
445
  $headers = array_keys($this->products[0]);
446
  $feed[] = $headers;
447
  foreach ($this->products as $no => $product) {
@@ -462,7 +462,7 @@ class Pricegrabber
462
 
463
  public function get_csv_feed()
464
  {
465
- if (count($this->products)) {
466
  $headers = array_keys($this->products[0]);
467
  $feed[] = $headers;
468
  foreach ($this->products as $no => $product) {
33
  {
34
  //Basic product information
35
 
36
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
37
  foreach ($this->products as $key => $values) {
38
  foreach ($values as $attr => $value) {
39
  $this->products[$key][$attr] = $this->formatXMLLine($attr, $value, true, true, true);
47
  {
48
  //Basic product information
49
 
50
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
51
  foreach ($this->products as $key => $values) {
52
  foreach ($values as $attr => $value) {
53
  //Allow force strip HTML
441
 
442
  public function get_txt_feed()
443
  {
444
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
445
  $headers = array_keys($this->products[0]);
446
  $feed[] = $headers;
447
  foreach ($this->products as $no => $product) {
462
 
463
  public function get_csv_feed()
464
  {
465
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
466
  $headers = array_keys($this->products[0]);
467
  $feed[] = $headers;
468
  foreach ($this->products as $no => $product) {
includes/feeds/class-woo-feed-shopmania.php CHANGED
@@ -33,7 +33,7 @@ class Shopmania
33
  {
34
  //Basic product information
35
 
36
- if (count($this->products)) {
37
  foreach ($this->products as $key => $values) {
38
  foreach ($values as $attr => $value) {
39
  $this->products[$key][$attr] = $this->formatXMLLine($attr, $value, true, true, true);
@@ -47,7 +47,7 @@ class Shopmania
47
  {
48
  //Basic product information
49
 
50
- if (count($this->products)) {
51
  foreach ($this->products as $key => $values) {
52
  foreach ($values as $attr => $value) {
53
  //Allow force strip HTML
@@ -429,7 +429,7 @@ class Shopmania
429
 
430
  public function get_txt_feed()
431
  {
432
- if (count($this->products)) {
433
  $headers = array_keys($this->products[0]);
434
  $feed[] = $headers;
435
  foreach ($this->products as $no => $product) {
@@ -450,7 +450,7 @@ class Shopmania
450
 
451
  public function get_csv_feed()
452
  {
453
- if (count($this->products)) {
454
  $headers = array_keys($this->products[0]);
455
  $feed[] = $headers;
456
  foreach ($this->products as $no => $product) {
33
  {
34
  //Basic product information
35
 
36
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
37
  foreach ($this->products as $key => $values) {
38
  foreach ($values as $attr => $value) {
39
  $this->products[$key][$attr] = $this->formatXMLLine($attr, $value, true, true, true);
47
  {
48
  //Basic product information
49
 
50
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
51
  foreach ($this->products as $key => $values) {
52
  foreach ($values as $attr => $value) {
53
  //Allow force strip HTML
429
 
430
  public function get_txt_feed()
431
  {
432
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
433
  $headers = array_keys($this->products[0]);
434
  $feed[] = $headers;
435
  foreach ($this->products as $no => $product) {
450
 
451
  public function get_csv_feed()
452
  {
453
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
454
  $headers = array_keys($this->products[0]);
455
  $feed[] = $headers;
456
  foreach ($this->products as $no => $product) {
includes/feeds/class-woo-feed-shopping.php CHANGED
@@ -156,7 +156,7 @@ class Shopping
156
  */
157
  public function mapAttributeForCSVTEXT()
158
  {
159
- if (count($this->products)) {
160
  foreach ($this->products as $key => $values) {
161
  foreach ($values as $attr => $value) {
162
  // Allow force strip HTML
@@ -660,7 +660,7 @@ class Shopping
660
  */
661
  public function get_txt_feed()
662
  {
663
- if (count($this->products)) {
664
  $headers = array_keys($this->products[0]);
665
  $feed[] = $headers;
666
  foreach ($this->products as $no => $product) {
@@ -686,7 +686,7 @@ class Shopping
686
  */
687
  public function get_csv_feed()
688
  {
689
- if (count($this->products)) {
690
  $headers = array_keys($this->products[0]);
691
  $feed[] = $headers;
692
  foreach ($this->products as $no => $product) {
156
  */
157
  public function mapAttributeForCSVTEXT()
158
  {
159
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
160
  foreach ($this->products as $key => $values) {
161
  foreach ($values as $attr => $value) {
162
  // Allow force strip HTML
660
  */
661
  public function get_txt_feed()
662
  {
663
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
664
  $headers = array_keys($this->products[0]);
665
  $feed[] = $headers;
666
  foreach ($this->products as $no => $product) {
686
  */
687
  public function get_csv_feed()
688
  {
689
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
690
  $headers = array_keys($this->products[0]);
691
  $feed[] = $headers;
692
  foreach ($this->products as $no => $product) {
includes/feeds/class-woo-feed-shopzilla.php CHANGED
@@ -96,7 +96,7 @@ class Shopzilla
96
  {
97
  //Basic product information
98
 
99
- if (count($this->products)) {
100
  foreach ($this->products as $key => $values) {
101
  foreach ($values as $attr => $value) {
102
  $this->products[$key][$attr] = $this->formatXMLLine($attr, $value, true, true, true);
@@ -112,7 +112,7 @@ class Shopzilla
112
  {
113
  //Basic product information
114
 
115
- if (count($this->products)) {
116
  foreach ($this->products as $key => $values) {
117
  foreach ($values as $attr => $value) {
118
  //Allow force strip HTML
@@ -625,7 +625,7 @@ class Shopzilla
625
  */
626
  public function get_txt_feed()
627
  {
628
- if (count($this->products)) {
629
  $headers = array_keys($this->products[0]);
630
  $feed[] = $headers;
631
  foreach ($this->products as $no => $product) {
@@ -650,7 +650,7 @@ class Shopzilla
650
  */
651
  public function get_csv_feed()
652
  {
653
- if (count($this->products)) {
654
  $headers = array_keys($this->products[0]);
655
  $feed[] = $headers;
656
  foreach ($this->products as $no => $product) {
96
  {
97
  //Basic product information
98
 
99
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
100
  foreach ($this->products as $key => $values) {
101
  foreach ($values as $attr => $value) {
102
  $this->products[$key][$attr] = $this->formatXMLLine($attr, $value, true, true, true);
112
  {
113
  //Basic product information
114
 
115
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
116
  foreach ($this->products as $key => $values) {
117
  foreach ($values as $attr => $value) {
118
  //Allow force strip HTML
625
  */
626
  public function get_txt_feed()
627
  {
628
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
629
  $headers = array_keys($this->products[0]);
630
  $feed[] = $headers;
631
  foreach ($this->products as $no => $product) {
650
  */
651
  public function get_csv_feed()
652
  {
653
+ if ( is_countable( $this->products ) && count( $this->products ) ) {
654
  $headers = array_keys($this->products[0]);
655
  $feed[] = $headers;
656
  foreach ($this->products as $no => $product) {
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.43
19
  * Author: WebAppick
20
  * Author URI: https://webappick.com/
21
  * License: GPL v2
@@ -34,7 +34,7 @@ if( ! defined( 'WOO_FEED_VERSION' ) ) {
34
  * Plugin Version
35
  * @var string
36
  */
37
- define( 'WOO_FEED_VERSION', '3.1.43' );
38
  }
39
  if( ! defined( 'WOO_FEED_FREE_FILE') ) {
40
  /**
@@ -80,7 +80,7 @@ if( ! defined( 'WOO_FEED_MIN_PHP_VERSION' ) ) {
80
  * @var string
81
  * @since 3.1.41
82
  */
83
- define( 'WOO_FEED_MIN_PHP_VERSION', '5.6.20' );
84
  }
85
  if( ! defined( 'WOO_FEED_PLUGIN_BASE_NAME' ) ) {
86
  /**
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.44
19
  * Author: WebAppick
20
  * Author URI: https://webappick.com/
21
  * License: GPL v2
34
  * Plugin Version
35
  * @var string
36
  */
37
+ define( 'WOO_FEED_VERSION', '3.1.44' );
38
  }
39
  if( ! defined( 'WOO_FEED_FREE_FILE') ) {
40
  /**
80
  * @var string
81
  * @since 3.1.41
82
  */
83
+ define( 'WOO_FEED_MIN_PHP_VERSION', '5.6' );
84
  }
85
  if( ! defined( 'WOO_FEED_PLUGIN_BASE_NAME' ) ) {
86
  /**