CTX Feed – WooCommerce Product Feed Manager Plugin - Version v2.0.16

Version Description

Download this release

Release Info

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

Code changes from version 2.0.13 to v2.0.16

README.txt CHANGED
@@ -16,7 +16,7 @@ Get Real Buyer and Boost Your Sell by Uploading your Products to 100+ Shopping E
16
  <blockquote>
17
  <h4>Free version support unlimited feed with up to 2000 products including variations.</h4>
18
  <br/>
19
- <h4><a target="_blank" href="https://webappick.com/features/">Premium Version</a> have some additional awesome features which are not included into free version</h4>
20
  <br/>
21
  </blockquote>
22
  **WHAT IS PRODUCT FEED?**
@@ -32,7 +32,7 @@ You need product feed if you are a merchant with an ecommerce store and want to
32
  A shopping engine or comparison shopping engine is a type of website where shopper can search products based on price, feature and other criteria and compare. Most popular Comparison Shopping Engines are Google Shopping, Pricegrabber, Pricewatch, Shopzilla, Amazon Seller, Nextag, eBay Commerce Network.
33
 
34
  <blockquote>
35
- <h4><a target="_blank" href="http://webappick.helpscoutdocs.com/article/17-woocommerce-product-feed">Read Documentation and FAQ</a></h4>
36
  <br/>
37
  <h4>For Support Email to support@webappick.com or Click on Live Chat into our Website</h4>
38
  <br/>
@@ -121,7 +121,7 @@ In one word WooCommerce Product Feed is a revolution. Yah, it’s a revolution o
121
  <br/>
122
  </blockquote>
123
 
124
- **<a target="_blank" href="https://webappick.com/features/">WooCommerce Product Feed Pro</a> gives you everything you'll find in free and some awesome functionalities:**
125
 
126
  **SMART FILTER & CONDITIONS**
127
 
@@ -213,6 +213,14 @@ Using pro version:
213
  2. FTP info config
214
 
215
  == Changelog ==
 
 
 
 
 
 
 
 
216
 
217
  = 2.0.13(2017-04-09) =
218
  * Added the functionality to make feed for External/Affiliate Product
16
  <blockquote>
17
  <h4>Free version support unlimited feed with up to 2000 products including variations.</h4>
18
  <br/>
19
+ <h4><a target="_blank" href="http://webappick.com/plugin/woocommerce-product-feed-pro/">Premium Version</a> have some additional awesome features which are not included into free version</h4>
20
  <br/>
21
  </blockquote>
22
  **WHAT IS PRODUCT FEED?**
32
  A shopping engine or comparison shopping engine is a type of website where shopper can search products based on price, feature and other criteria and compare. Most popular Comparison Shopping Engines are Google Shopping, Pricegrabber, Pricewatch, Shopzilla, Amazon Seller, Nextag, eBay Commerce Network.
33
 
34
  <blockquote>
35
+ <h4><a target="_blank" href="http://webappick.helpscoutdocs.com">Read Documentation and FAQ</a></h4>
36
  <br/>
37
  <h4>For Support Email to support@webappick.com or Click on Live Chat into our Website</h4>
38
  <br/>
121
  <br/>
122
  </blockquote>
123
 
124
+ **<a target="_blank" href="http://webappick.com/plugin/woocommerce-product-feed-pro/">WooCommerce Product Feed Pro</a> gives you everything you'll find in free and some awesome functionalities:**
125
 
126
  **SMART FILTER & CONDITIONS**
127
 
213
  2. FTP info config
214
 
215
  == Changelog ==
216
+ = 2.0.16(2017-05-02) =
217
+ * Fixed: Additional Image issue google shopping template
218
+
219
+ = 2.0.15(2017-04-27) =
220
+ * Fixed the issue: Call to undefined method WC_Product_Variation::get_gallery_image_ids()
221
+
222
+ = 2.0.14(2017-04-27) =
223
+ * Fixed: Additional Image issue google shopping template
224
 
225
  = 2.0.13(2017-04-09) =
226
  * Added the functionality to make feed for External/Affiliate Product
includes/classes/class-woo-feed-engine.php CHANGED
@@ -365,7 +365,7 @@ class WF_Engine
365
  {
366
  $getParam=explode('?',$output);
367
  $URLParam=array();
368
- if($getParam[1]){
369
  $URLParam=$this->proper_parse_str($getParam[1]);
370
  }
371
 
365
  {
366
  $getParam=explode('?',$output);
367
  $URLParam=array();
368
+ if(isset($getParam[1])){
369
  $URLParam=$this->proper_parse_str($getParam[1]);
370
  }
371
 
includes/classes/class-woo-feed-products.php CHANGED
@@ -165,9 +165,11 @@ class Woo_Feed_Products
165
  # Additional Images
166
  $images = $this->additionalImages($product->get_gallery_attachment_ids());
167
  if ($images and is_array($images)) {
 
168
  foreach ($images as $key => $value) {
169
  if ($value != $this->productsList[$i]['image']) {
170
- $this->productsList[$i]["image_$key"] = $this->get_formatted_url($value);
 
171
  }
172
  }
173
  }
@@ -185,7 +187,7 @@ class Woo_Feed_Products
185
  $this->productsList[$i]['sale_price_sdate'] = $this->get_date($this->childID, "_sale_price_dates_from");
186
  $this->productsList[$i]['sale_price_edate'] = $this->get_date($this->childID, "_sale_price_dates_to");
187
  $this->productsList[$i]['price'] = ($product->get_regular_price()) ? $product->get_regular_price() : false;
188
- $this->productsList[$i]['sale_price'] = ($product->get_sale_price()) ? $product->get_sale_price() : false;
189
  $this->productsList[$i]['weight'] = ($product->get_weight()) ? $product->get_weight() : false;
190
  $this->productsList[$i]['width'] = ($product->get_width()) ? $product->get_width() : false;
191
  $this->productsList[$i]['height'] = ($product->get_height()) ? $product->get_height() : false;
@@ -236,9 +238,11 @@ class Woo_Feed_Products
236
  # Additional Images
237
  $images = $this->additionalImages($product->get_gallery_attachment_ids());
238
  if ($images and is_array($images)) {
 
239
  foreach ($images as $key => $value) {
240
  if ($value != $this->productsList[$i]['image']) {
241
- $this->productsList[$i]["image_$key"] = $this->get_formatted_url($value);
 
242
  }
243
  }
244
  }
@@ -258,7 +262,7 @@ class Woo_Feed_Products
258
  $this->productsList[$i]['sale_price_sdate'] = $this->get_date($product->id, "_sale_price_dates_from");
259
  $this->productsList[$i]['sale_price_edate'] = $this->get_date($product->id, "_sale_price_dates_to");
260
  $this->productsList[$i]['price'] = ($product->get_regular_price()) ? $product->get_regular_price() : false;
261
- $this->productsList[$i]['sale_price'] = ($product->get_sale_price()) ? $product->get_sale_price() : false;
262
  $this->productsList[$i]['weight'] = ($product->get_weight()) ? $product->get_weight() : false;
263
  $this->productsList[$i]['width'] = ($product->get_width()) ? $product->get_width() : false;
264
  $this->productsList[$i]['height'] = ($product->get_height()) ? $product->get_height() : false;
@@ -307,9 +311,11 @@ class Woo_Feed_Products
307
  # Additional Images
308
  $images = $this->additionalImages($product->get_gallery_attachment_ids());
309
  if ($images and is_array($images)) {
 
310
  foreach ($images as $key => $value) {
311
  if ($value != $this->productsList[$i]['image']) {
312
- $this->productsList[$i]["image_$key"] = $this->get_formatted_url($value);
 
313
  }
314
  }
315
  }
@@ -331,7 +337,7 @@ class Woo_Feed_Products
331
  $this->productsList[$i]['sale_price_edate'] = $this->get_date($product->id, "_sale_price_dates_to");
332
  $this->productsList[$i]['price'] = ($product->get_regular_price()) ? $product->get_regular_price() : false;
333
  $this->productsList[$i]['price_with_tax'] = ($product->is_taxable()) ? $product->get_price_including_tax() : $product->get_regular_price();
334
- $this->productsList[$i]['sale_price'] = ($product->get_sale_price()) ? $product->get_sale_price() : false;
335
  $this->productsList[$i]['weight'] = ($product->get_weight()) ? $product->get_weight() : false;
336
  $this->productsList[$i]['width'] = ($product->get_width()) ? $product->get_width() : false;
337
  $this->productsList[$i]['height'] = ($product->get_height()) ? $product->get_height() : false;
@@ -361,67 +367,68 @@ class Woo_Feed_Products
361
  }
362
 
363
 
364
- $this->productsList[$i]['id'] = $product->id;
365
- $this->productsList[$i]['variation_type'] = "parent";
366
- $this->productsList[$i]['title'] = $product->get_title();
367
- $this->productsList[$i]['description'] =$post->post_content;
368
 
369
- $this->productsList[$i]['short_description'] = $post->post_excerpt;
370
- $this->productsList[$i]['product_type'] = $this->get_product_term_list($post->ID, 'product_cat', "", ">");// $this->categories($this->parentID);//TODO
371
- $this->productsList[$i]['link'] = $link;
372
 
373
- $this->productsList[$i]['image'] = $this->get_formatted_url($mainImage);
374
 
375
- # Featured Image
376
- if (has_post_thumbnail($post->ID)):
377
- $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'single-post-thumbnail');
378
- $this->productsList[$i]['feature_image'] = $this->get_formatted_url($image[0]);
379
- else:
380
- $this->productsList[$i]['feature_image'] = $this->get_formatted_url($mainImage);
381
- endif;
382
 
383
- # Additional Images
384
- $images = $this->additionalImages($product->get_gallery_attachment_ids());
385
- if ($images and is_array($images)) {
386
- foreach ($images as $key => $value) {
387
- if ($value != $this->productsList[$i]['image']) {
388
- $this->productsList[$i]["image_$key"] = $this->get_formatted_url($value);
389
- }
390
  }
 
391
  }
 
392
 
393
- $this->productsList[$i]['condition'] = "New";
394
- $this->productsList[$i]['type'] = $product->get_type();
395
- $this->productsList[$i]['visibility'] = $product->visibility;
396
- $this->productsList[$i]['rating_total'] = $product->get_rating_count();
397
- $this->productsList[$i]['rating_average'] = $product->get_average_rating();
398
- $this->productsList[$i]['tags'] = $this->get_product_term_list($post->ID, 'product_tag');
399
-
400
- $this->productsList[$i]['item_group_id'] = $product->id;
401
- $this->productsList[$i]['sku'] = $product->get_sku();
402
 
403
- $this->productsList[$i]['availability'] = $this->availability($product->stock_status);
404
- $this->productsList[$i]['quantity'] = $this->get_quantity($product->id, "_stock");
405
- $this->productsList[$i]['sale_price_sdate'] = $this->get_date($product->id, "_sale_price_dates_from");
406
- $this->productsList[$i]['sale_price_edate'] = $this->get_date($product->id, "_sale_price_dates_to");
407
- $this->productsList[$i]['price'] = ($product->max_variation_price) ? $product->max_variation_price : false;
408
- $this->productsList[$i]['sale_price'] = ($product->min_variation_price) ? $product->min_variation_price : false;
409
- $this->productsList[$i]['weight'] = ($product->get_weight()) ? $product->get_weight() : false;
410
- $this->productsList[$i]['width'] = ($product->get_width()) ? $product->get_width() : false;
411
- $this->productsList[$i]['height'] = ($product->get_height()) ? $product->get_height() : false;
412
- $this->productsList[$i]['length'] = ($product->get_length()) ? $product->get_length() : false;
413
 
414
- # Sale price effective date
415
- $from = $this->sale_price_effective_date($product->id, '_sale_price_dates_from');
416
- $to = $this->sale_price_effective_date($product->id, '_sale_price_dates_to');
417
- if (!empty($from) && !empty($to)) {
418
- $from = date("c", strtotime($from));
419
- $to = date("c", strtotime($to));
420
- $this->productsList[$i]['sale_price_effective_date'] = "$from" . "/" . "$to";
421
- } else {
422
- $this->productsList[$i]['sale_price_effective_date'] = "";
423
- }
424
 
 
 
 
 
 
 
 
 
 
 
425
  }
426
  }
427
  $i++;
165
  # Additional Images
166
  $images = $this->additionalImages($product->get_gallery_attachment_ids());
167
  if ($images and is_array($images)) {
168
+ $imgKey=1;
169
  foreach ($images as $key => $value) {
170
  if ($value != $this->productsList[$i]['image']) {
171
+ $this->productsList[$i]["image_$imgKey"] = $this->get_formatted_url($value);
172
+ $imgKey++;
173
  }
174
  }
175
  }
187
  $this->productsList[$i]['sale_price_sdate'] = $this->get_date($this->childID, "_sale_price_dates_from");
188
  $this->productsList[$i]['sale_price_edate'] = $this->get_date($this->childID, "_sale_price_dates_to");
189
  $this->productsList[$i]['price'] = ($product->get_regular_price()) ? $product->get_regular_price() : false;
190
+ $this->productsList[$i]['sale_price'] = ($product->get_sale_price()) ? $product->get_sale_price() : $product->get_regular_price();
191
  $this->productsList[$i]['weight'] = ($product->get_weight()) ? $product->get_weight() : false;
192
  $this->productsList[$i]['width'] = ($product->get_width()) ? $product->get_width() : false;
193
  $this->productsList[$i]['height'] = ($product->get_height()) ? $product->get_height() : false;
238
  # Additional Images
239
  $images = $this->additionalImages($product->get_gallery_attachment_ids());
240
  if ($images and is_array($images)) {
241
+ $imgKey=1;
242
  foreach ($images as $key => $value) {
243
  if ($value != $this->productsList[$i]['image']) {
244
+ $this->productsList[$i]["image_$imgKey"] = $this->get_formatted_url($value);
245
+ $imgKey++;
246
  }
247
  }
248
  }
262
  $this->productsList[$i]['sale_price_sdate'] = $this->get_date($product->id, "_sale_price_dates_from");
263
  $this->productsList[$i]['sale_price_edate'] = $this->get_date($product->id, "_sale_price_dates_to");
264
  $this->productsList[$i]['price'] = ($product->get_regular_price()) ? $product->get_regular_price() : false;
265
+ $this->productsList[$i]['sale_price'] = ($product->get_sale_price()) ? $product->get_sale_price() : $product->get_regular_price();
266
  $this->productsList[$i]['weight'] = ($product->get_weight()) ? $product->get_weight() : false;
267
  $this->productsList[$i]['width'] = ($product->get_width()) ? $product->get_width() : false;
268
  $this->productsList[$i]['height'] = ($product->get_height()) ? $product->get_height() : false;
311
  # Additional Images
312
  $images = $this->additionalImages($product->get_gallery_attachment_ids());
313
  if ($images and is_array($images)) {
314
+ $imgKey=1;
315
  foreach ($images as $key => $value) {
316
  if ($value != $this->productsList[$i]['image']) {
317
+ $this->productsList[$i]["image_$imgKey"] = $this->get_formatted_url($value);
318
+ $imgKey++;
319
  }
320
  }
321
  }
337
  $this->productsList[$i]['sale_price_edate'] = $this->get_date($product->id, "_sale_price_dates_to");
338
  $this->productsList[$i]['price'] = ($product->get_regular_price()) ? $product->get_regular_price() : false;
339
  $this->productsList[$i]['price_with_tax'] = ($product->is_taxable()) ? $product->get_price_including_tax() : $product->get_regular_price();
340
+ $this->productsList[$i]['sale_price'] = ($product->get_sale_price()) ? $product->get_sale_price() : $product->get_regular_price();
341
  $this->productsList[$i]['weight'] = ($product->get_weight()) ? $product->get_weight() : false;
342
  $this->productsList[$i]['width'] = ($product->get_width()) ? $product->get_width() : false;
343
  $this->productsList[$i]['height'] = ($product->get_height()) ? $product->get_height() : false;
367
  }
368
 
369
 
370
+ $this->productsList[$i]['id'] = $product->id;
371
+ $this->productsList[$i]['variation_type'] = "parent";
372
+ $this->productsList[$i]['title'] = $product->get_title();
373
+ $this->productsList[$i]['description'] =$post->post_content;
374
 
375
+ $this->productsList[$i]['short_description'] = $post->post_excerpt;
376
+ $this->productsList[$i]['product_type'] = $this->get_product_term_list($post->ID, 'product_cat', "", ">");// $this->categories($this->parentID);//TODO
377
+ $this->productsList[$i]['link'] = $link;
378
 
379
+ $this->productsList[$i]['image'] = $this->get_formatted_url($mainImage);
380
 
381
+ # Featured Image
382
+ if (has_post_thumbnail($post->ID)):
383
+ $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'single-post-thumbnail');
384
+ $this->productsList[$i]['feature_image'] = $this->get_formatted_url($image[0]);
385
+ else:
386
+ $this->productsList[$i]['feature_image'] = $this->get_formatted_url($mainImage);
387
+ endif;
388
 
389
+ # Additional Images
390
+ $images = $this->additionalImages($product->get_gallery_attachment_ids());
391
+ if ($images and is_array($images)) {
392
+ $imgKey=1;
393
+ foreach ($images as $key => $value) {
394
+ if ($value != $this->productsList[$i]['image']) {
395
+ $this->productsList[$i]["image_$imgKey"] = $this->get_formatted_url($value);
396
  }
397
+ $imgKey++;
398
  }
399
+ }
400
 
401
+ $this->productsList[$i]['condition'] = "New";
402
+ $this->productsList[$i]['type'] = $product->get_type();
403
+ $this->productsList[$i]['visibility'] = $product->visibility;
404
+ $this->productsList[$i]['rating_total'] = $product->get_rating_count();
405
+ $this->productsList[$i]['rating_average'] = $product->get_average_rating();
406
+ $this->productsList[$i]['tags'] = $this->get_product_term_list($post->ID, 'product_tag');
 
 
 
407
 
408
+ $this->productsList[$i]['item_group_id'] = $product->id;
409
+ $this->productsList[$i]['sku'] = $product->get_sku();
 
 
 
 
 
 
 
 
410
 
411
+ $this->productsList[$i]['availability'] = $this->availability($product->stock_status);
412
+ $this->productsList[$i]['quantity'] = $this->get_quantity($product->id, "_stock");
413
+ $this->productsList[$i]['sale_price_sdate'] = $this->get_date($product->id, "_sale_price_dates_from");
414
+ $this->productsList[$i]['sale_price_edate'] = $this->get_date($product->id, "_sale_price_dates_to");
415
+ $this->productsList[$i]['price'] = ($product->max_variation_price) ? $product->max_variation_price : false;
416
+ $this->productsList[$i]['sale_price'] = ($product->min_variation_price) ? $product->min_variation_price : false;
417
+ $this->productsList[$i]['weight'] = ($product->get_weight()) ? $product->get_weight() : false;
418
+ $this->productsList[$i]['width'] = ($product->get_width()) ? $product->get_width() : false;
419
+ $this->productsList[$i]['height'] = ($product->get_height()) ? $product->get_height() : false;
420
+ $this->productsList[$i]['length'] = ($product->get_length()) ? $product->get_length() : false;
421
 
422
+ # Sale price effective date
423
+ $from = $this->sale_price_effective_date($product->id, '_sale_price_dates_from');
424
+ $to = $this->sale_price_effective_date($product->id, '_sale_price_dates_to');
425
+ if (!empty($from) && !empty($to)) {
426
+ $from = date("c", strtotime($from));
427
+ $to = date("c", strtotime($to));
428
+ $this->productsList[$i]['sale_price_effective_date'] = "$from" . "/" . "$to";
429
+ } else {
430
+ $this->productsList[$i]['sale_price_effective_date'] = "";
431
+ }
432
  }
433
  }
434
  $i++;
includes/feeds/class-woo-feed-facebook.php CHANGED
@@ -133,16 +133,16 @@ class Woo_Feed_Facebook
133
  "current_category" => array("g:google_product_category", true),
134
  "image" => array("g:image_link", true),
135
  "images" => array("g:additional_image_link", false),
136
- "images_1" => array("g:additional_image_link", true),
137
- "images_2" => array("g:additional_image_link", true),
138
- "images_3" => array("g:additional_image_link", true),
139
- "images_4" => array("g:additional_image_link", true),
140
- "images_5" => array("g:additional_image_link", true),
141
- "images_6" => array("g:additional_image_link", true),
142
- "images_7" => array("g:additional_image_link", true),
143
- "images_8" => array("g:additional_image_link", true),
144
- "images_9" => array("g:additional_image_link", true),
145
- "images_10" => array("g:additional_image_link", true),
146
  "condition" => array("g:condition", false),
147
  "availability" => array("g:availability", false),
148
  "price" => array("g:price", true),
@@ -374,7 +374,13 @@ class Woo_Feed_Facebook
374
  } elseif (strpos($value, "<![CDATA[") === false && $cdata === true && !empty($value)) {
375
  $value = "<![CDATA[$value]]>";
376
  } elseif ($cdata) {
377
- $value = "<![CDATA[$value]]>";
 
 
 
 
 
 
378
  }
379
 
380
  return "
@@ -410,12 +416,8 @@ class Woo_Feed_Facebook
410
  foreach ($items as $item => $products) {
411
  $feed .= " <".$this->feedWrapper.">";
412
  foreach ($products as $key => $value) {
413
- if (substr($key, 0, 7) == 'images_' && !empty($value)) {
414
- $key = "g:additional_image_link";
415
- $feed .= $this->formatXMLLine($key,$value, true);
416
-
417
- } else {
418
- if (!empty($value)) $feed.=$value;
419
  }
420
  }
421
  $feed .= "\n </" . $this->feedWrapper . ">\n";
133
  "current_category" => array("g:google_product_category", true),
134
  "image" => array("g:image_link", true),
135
  "images" => array("g:additional_image_link", false),
136
+ "images_1" => array("g:additional_image_link_1", true),
137
+ "images_2" => array("g:additional_image_link_2", true),
138
+ "images_3" => array("g:additional_image_link_3", true),
139
+ "images_4" => array("g:additional_image_link_4", true),
140
+ "images_5" => array("g:additional_image_link_5", true),
141
+ "images_6" => array("g:additional_image_link_6", true),
142
+ "images_7" => array("g:additional_image_link_7", true),
143
+ "images_8" => array("g:additional_image_link_8", true),
144
+ "images_9" => array("g:additional_image_link_9", true),
145
+ "images_10" => array("g:additional_image_link_10", true),
146
  "condition" => array("g:condition", false),
147
  "availability" => array("g:availability", false),
148
  "price" => array("g:price", true),
374
  } elseif (strpos($value, "<![CDATA[") === false && $cdata === true && !empty($value)) {
375
  $value = "<![CDATA[$value]]>";
376
  } elseif ($cdata) {
377
+ if(!empty($value)){
378
+ $value = "<![CDATA[$value]]>";
379
+ }
380
+ }
381
+
382
+ if (substr($attribute, 0, 23) == 'g:additional_image_link') {
383
+ $attribute = "g:additional_image_link";
384
  }
385
 
386
  return "
416
  foreach ($items as $item => $products) {
417
  $feed .= " <".$this->feedWrapper.">";
418
  foreach ($products as $key => $value) {
419
+ if (!empty($value)){
420
+ $feed .= $value;
 
 
 
 
421
  }
422
  }
423
  $feed .= "\n </" . $this->feedWrapper . ">\n";
includes/feeds/class-woo-feed-google.php CHANGED
@@ -141,16 +141,16 @@ class Woo_Feed_Google
141
  "current_category" => array("g:google_product_category", true),
142
  "image" => array("g:image_link", true),
143
  "images" => array("g:additional_image_link", false),
144
- "images_1" => array("g:additional_image_link", true),
145
- "images_2" => array("g:additional_image_link", true),
146
- "images_3" => array("g:additional_image_link", true),
147
- "images_4" => array("g:additional_image_link", true),
148
- "images_5" => array("g:additional_image_link", true),
149
- "images_6" => array("g:additional_image_link", true),
150
- "images_7" => array("g:additional_image_link", true),
151
- "images_8" => array("g:additional_image_link", true),
152
- "images_9" => array("g:additional_image_link", true),
153
- "images_10" => array("g:additional_image_link", true),
154
  "condition" => array("g:condition", false),
155
  "availability" => array("g:availability", false),
156
  "price" => array("g:price", true),
@@ -200,8 +200,6 @@ class Woo_Feed_Google
200
 
201
  if (count($this->products)) {
202
  foreach ($this->products as $no => $product) {
203
- //echo "<pre>";
204
- //print_r($product);die();
205
  $this->identifier_status_add($no);
206
  foreach ($product as $key => $value) {
207
  $this->mapAttribute($no, $key, $googleXMLAttribute[$key][0], $value, $googleXMLAttribute[$key][0]);
@@ -425,10 +423,11 @@ class Woo_Feed_Google
425
  } else if ($cdata) {
426
  if(!empty($value)){
427
  $value = "<![CDATA[$value]]>";
428
- }else{
429
- $value = $value;
430
  }
 
431
 
 
 
432
  }
433
 
434
  return "
@@ -456,14 +455,10 @@ class Woo_Feed_Google
456
  if ($items) {
457
  foreach ($items as $item => $products) {
458
  $feed .= " <" . $this->feedWrapper . ">";
459
- foreach ($products as $key => $value) {
460
- if (substr($key, 0, 7) == 'images_' && !empty($value)) {
461
- $key = "g:additional_image_link";
462
- $feed .= $this->formatXMLLine($key, $value, true);
463
 
464
- } else {
465
- if (!empty($value))
466
- $feed .= $value;
467
  }
468
  }
469
  $feed .= "\n </" . $this->feedWrapper . ">\n";
141
  "current_category" => array("g:google_product_category", true),
142
  "image" => array("g:image_link", true),
143
  "images" => array("g:additional_image_link", false),
144
+ "images_1" => array("g:additional_image_link_1", true),
145
+ "images_2" => array("g:additional_image_link_2", true),
146
+ "images_3" => array("g:additional_image_link_3", true),
147
+ "images_4" => array("g:additional_image_link_4", true),
148
+ "images_5" => array("g:additional_image_link_5", true),
149
+ "images_6" => array("g:additional_image_link_6", true),
150
+ "images_7" => array("g:additional_image_link_7", true),
151
+ "images_8" => array("g:additional_image_link_8", true),
152
+ "images_9" => array("g:additional_image_link_9", true),
153
+ "images_10" => array("g:additional_image_link_10", true),
154
  "condition" => array("g:condition", false),
155
  "availability" => array("g:availability", false),
156
  "price" => array("g:price", true),
200
 
201
  if (count($this->products)) {
202
  foreach ($this->products as $no => $product) {
 
 
203
  $this->identifier_status_add($no);
204
  foreach ($product as $key => $value) {
205
  $this->mapAttribute($no, $key, $googleXMLAttribute[$key][0], $value, $googleXMLAttribute[$key][0]);
423
  } else if ($cdata) {
424
  if(!empty($value)){
425
  $value = "<![CDATA[$value]]>";
 
 
426
  }
427
+ }
428
 
429
+ if (substr($attribute, 0, 23) == 'g:additional_image_link') {
430
+ $attribute = "g:additional_image_link";
431
  }
432
 
433
  return "
455
  if ($items) {
456
  foreach ($items as $item => $products) {
457
  $feed .= " <" . $this->feedWrapper . ">";
 
 
 
 
458
 
459
+ foreach ($products as $key => $value) {
460
+ if (!empty($value)){
461
+ $feed .= $value;
462
  }
463
  }
464
  $feed .= "\n </" . $this->feedWrapper . ">\n";
woo-feed.php CHANGED
@@ -15,8 +15,8 @@
15
  * @wordpress-plugin
16
  * Plugin Name: WooCommerce Product Feed
17
  * Plugin URI: https://webappick.com/
18
- * Description: This is a wordpress plugin to generate woocommerce product feed for Shopping Engines like Google Shopping,eBay,Amazon,Pricegrabber and many more..
19
- * Version: 2.0.13
20
  * Author: WebAppick
21
  * Author URI: https://webappick.com/
22
  * License: GPL v2
15
  * @wordpress-plugin
16
  * Plugin Name: WooCommerce Product Feed
17
  * Plugin URI: https://webappick.com/
18
+ * Description: This plugin generate woocommerce product feed for Shopping Engines like Google Shopping,Facebook Product Feed,eBay,Amazon,Idealo and many more..
19
+ * Version: 2.0.16
20
  * Author: WebAppick
21
  * Author URI: https://webappick.com/
22
  * License: GPL v2