CTX Feed – WooCommerce Product Feed Manager Plugin - Version 4.3.7

Version Description

(2020-12-15) = * Tweak : Bing template attributes managed.

Download this release

Release Info

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

Code changes from version 4.3.6 to 4.3.7

README.txt CHANGED
@@ -8,7 +8,7 @@ Google Product Review feed, product variations, rakuteen, shopping, skroutz, TSV
8
  Requires at least: 3.6
9
  Tested Up To: 5.6
10
  Requires PHP: 5.6
11
- Stable tag: 4.3.6
12
  License: GPLv2 or later
13
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
14
 
@@ -308,6 +308,9 @@ Using pro version:
308
 
309
  == Changelog ==
310
 
 
 
 
311
  = 4.3.6 (2020-12-14) =
312
  * Tweak : Google local inventory ads attributes managed.
313
  * Tweak : Google local product inventory attributes managed.
8
  Requires at least: 3.6
9
  Tested Up To: 5.6
10
  Requires PHP: 5.6
11
+ Stable tag: 4.3.7
12
  License: GPLv2 or later
13
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
14
 
308
 
309
  == Changelog ==
310
 
311
+ = 4.3.7 (2020-12-15) =
312
+ * Tweak : Bing template attributes managed.
313
+
314
  = 4.3.6 (2020-12-14) =
315
  * Tweak : Google local inventory ads attributes managed.
316
  * Tweak : Google local product inventory attributes managed.
includes/classes/class-woo-feed-default-attributes.php CHANGED
@@ -729,6 +729,80 @@ class Woo_Feed_Default_Attributes {
729
  );
730
  }
731
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
732
  /**
733
  * Google Product Review Attribute List
734
  *
729
  );
730
  }
731
 
732
+ /**
733
+ * Bing Attribute List
734
+ *
735
+ * @return array
736
+ */
737
+ public function bingAttributes() {
738
+
739
+ return array(
740
+ '--1' => 'Basic Information',
741
+ 'id' => 'Product Id[id]',
742
+ 'title' => 'Product Title[title]',
743
+ 'link' => 'Product Title[link]',
744
+ 'price' => 'Product Price[price]',
745
+ 'description' => 'Product Description[description]',
746
+ 'image_link' => 'Image[image_link]',
747
+ 'shipping' => 'Shipping[shipping]',
748
+ 'gtin' => 'GTIN[gtin]',
749
+ 'mpn' => 'MPN[mpn]',
750
+ 'brand' => 'Brand[brand]',
751
+ 'identifier_exists' => 'Identifier Exists[identifier_exists]',
752
+ '---1' => '',
753
+ '--2' => 'Apparel Products',
754
+ 'gender' => 'Gender[gender]',
755
+ 'age_group' => 'Age Group[age_group]',
756
+ 'color' => 'Color[color]',
757
+ 'size' => 'Size[size]',
758
+ 'size_type' => 'Size Type[size_type]',
759
+ 'size_system' => 'Size System[size_system]',
760
+ '---2' => '',
761
+ '--3' => 'Product Variants',
762
+ 'item_group_id' => 'Item Group ID[item_group_id]',
763
+ 'material' => 'Material[material]',
764
+ 'pattern' => 'Pattern[pattern]',
765
+ 'additional_image_link' => 'Additional Image Link[additional_image_link]',
766
+ '---3' => '',
767
+ '--4' => 'Other Information',
768
+ 'adult' => 'Adult[adult]',
769
+ 'availability' => 'Availability[availability]',
770
+ 'product_category' => 'Product Category[product_category]',
771
+ 'condition' => 'Condition[condition]',
772
+ 'expiration_date' => 'Expiration Date[expiration_date]',
773
+ 'multipack' => 'Multipack[multipack]',
774
+ 'product_type' => 'Product Type[product_type]',
775
+ 'mobile_link' => 'Mobile Link[mobile_link]',
776
+ 'unit_pricing_measure' => 'Unit Pricing Measure[unit_pricing_measure]',
777
+ 'unit_pricing_base_measure' => 'Unit Pricing Base Measure[unit_pricing_base_measure]',
778
+ 'installment' => 'Installment[installment]',
779
+ 'energy_efficiency_class' => 'Energy Efficiency Class[energy_efficiency_class]',
780
+ 'min_energy_efficiency_class' => 'Min Energy Efficiency Class[min_energy_efficiency_class]',
781
+ 'max_energy_efficiency_class' => 'Max Energy Efficiency Class[max_energy_efficiency_class]',
782
+ 'seller_name' => 'Seller Name[seller_name]',
783
+ 'ads_redirect' => 'Ads Redirect[ads_redirect]',
784
+ 'custom_label_0' => 'Custom Label 0[custom_label_0]',
785
+ 'custom_label_1' => 'Custom Label 1[custom_label_1]',
786
+ 'custom_label_2' => 'Custom Label 2[custom_label_2]',
787
+ 'custom_label_3' => 'Custom Label 3[custom_label_3]',
788
+ 'custom_label_4' => 'Custom Label 4[custom_label_4]',
789
+ '---4' => '',
790
+ '--5' => 'Sales & Promotions',
791
+ 'sale_price' => 'Sale Price[sale_price]',
792
+ 'sale_price_effective_date' => 'Sale Price Effective Date[sale_price_effective_date]',
793
+ 'promotion_ID' => 'Promotion ID[promotion_ID]',
794
+ '---5' => '',
795
+ '--6' => 'Local Product Inventory',
796
+ 'store_code' => 'Store Code[store_code]',
797
+ 'itemid' => 'Item ID[itemid]',
798
+ 'quantity' => 'Quantity[quantity]',
799
+ 'weeks_of_supply' => 'Weeks Of Supply[weeks_of_supply]',
800
+ 'pick_up_method' => 'Pick Up Method[pick_up_method]',
801
+ 'pick_up_sla' => 'Pick Up SLA[pick_up_sla]',
802
+ '---6' => '',
803
+ );
804
+ }
805
+
806
  /**
807
  * Google Product Review Attribute List
808
  *
includes/classes/class-woo-feed-dropdown.php CHANGED
@@ -424,11 +424,11 @@ class Woo_Feed_Dropdown {
424
  * @return string
425
  */
426
  public function google_localAttributesDropdown( $selected = '' ) {
427
- $options = $this->get_cached_dropdown( 'googleAttributesDropdown', $selected );
428
 
429
  if ( false === $options ) {
430
  $attributes = new Woo_Feed_Default_Attributes();
431
- return $this->cache_dropdown( 'googleAttributesDropdown', $attributes->googleAttributes(), $selected );
432
  }
433
  return $options;
434
  }
@@ -441,11 +441,28 @@ class Woo_Feed_Dropdown {
441
  * @return string
442
  */
443
  public function google_local_inventoryAttributesDropdown( $selected = '' ) {
444
- $options = $this->get_cached_dropdown( 'googleAttributesDropdown', $selected );
445
 
446
  if ( false === $options ) {
447
  $attributes = new Woo_Feed_Default_Attributes();
448
- return $this->cache_dropdown( 'googleAttributesDropdown', $attributes->googleAttributes(), $selected );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
449
  }
450
  return $options;
451
  }
424
  * @return string
425
  */
426
  public function google_localAttributesDropdown( $selected = '' ) {
427
+ $options = $this->get_cached_dropdown( 'google_localAttributesDropdown', $selected );
428
 
429
  if ( false === $options ) {
430
  $attributes = new Woo_Feed_Default_Attributes();
431
+ return $this->cache_dropdown( 'google_localAttributesDropdown', $attributes->googleAttributes(), $selected );
432
  }
433
  return $options;
434
  }
441
  * @return string
442
  */
443
  public function google_local_inventoryAttributesDropdown( $selected = '' ) {
444
+ $options = $this->get_cached_dropdown( 'google_local_inventoryAttributesDropdown', $selected );
445
 
446
  if ( false === $options ) {
447
  $attributes = new Woo_Feed_Default_Attributes();
448
+ return $this->cache_dropdown( 'google_local_inventoryAttributesDropdown', $attributes->googleAttributes(), $selected );
449
+ }
450
+ return $options;
451
+ }
452
+
453
+ /**
454
+ * Dropdown of Bing Attribute List
455
+ *
456
+ * @param string $selected
457
+ *
458
+ * @return string
459
+ */
460
+ public function bingAttributesDropdown( $selected = '' ) {
461
+ $options = $this->get_cached_dropdown( 'bingAttributesDropdown', $selected );
462
+
463
+ if ( false === $options ) {
464
+ $attributes = new Woo_Feed_Default_Attributes();
465
+ return $this->cache_dropdown( 'bingAttributesDropdown', $attributes->bingAttributes(), $selected );
466
  }
467
  return $options;
468
  }
includes/classes/class-woo-feed-products-v3.php CHANGED
@@ -1068,7 +1068,11 @@ class Woo_Feed_Products_v3
1068
  }
1069
 
1070
  $product = $this->products[ $this->pi ];
1071
- $headers = array_keys($product);
 
 
 
 
1072
  $this->feedHeader .= $this->enclosure . implode("$this->enclosure$this->delimiter$this->enclosure", $headers) . $this->enclosure . $eol;
1073
 
1074
  if ( 'google' === $this->config['provider'] ) {
@@ -1127,7 +1131,11 @@ class Woo_Feed_Products_v3
1127
  }
1128
 
1129
  $product = $this->products[ $this->pi ];
1130
- $this->feedHeader = array_keys($product);
 
 
 
 
1131
 
1132
  if ( 'google' === $this->config['provider'] ) {
1133
  $this->feedHeader = str_replace($this->google_product_highlights,'product highlight',$this->feedHeader);
1068
  }
1069
 
1070
  $product = $this->products[ $this->pi ];
1071
+ if( 'bing' === $this->config['provider'] ) {
1072
+ $headers = array_map('woo_feed_trim_attribute', array_keys( $product ));
1073
+ }else {
1074
+ $headers = array_keys( $product );
1075
+ }
1076
  $this->feedHeader .= $this->enclosure . implode("$this->enclosure$this->delimiter$this->enclosure", $headers) . $this->enclosure . $eol;
1077
 
1078
  if ( 'google' === $this->config['provider'] ) {
1131
  }
1132
 
1133
  $product = $this->products[ $this->pi ];
1134
+ if( 'bing' === $this->config['provider'] ) {
1135
+ $this->feedHeader = array_map('woo_feed_trim_attribute', array_keys( $product ));
1136
+ }else {
1137
+ $this->feedHeader = array_keys( $product );
1138
+ }
1139
 
1140
  if ( 'google' === $this->config['provider'] ) {
1141
  $this->feedHeader = str_replace($this->google_product_highlights,'product highlight',$this->feedHeader);
includes/feeds/merchant_infos.php CHANGED
@@ -57,7 +57,7 @@ return array(
57
  ), // Pinterest.
58
  'bing' => array(
59
  'link' => 'http://bit.ly/33ZeuVS',
60
- 'feed_file_type' => array( 'TXT' ),
61
  ), // Bing.
62
  'pricespy' => array(
63
  'link' => 'http://bit.ly/2t0rEFm',
57
  ), // Pinterest.
58
  'bing' => array(
59
  'link' => 'http://bit.ly/33ZeuVS',
60
+ 'feed_file_type' => array( 'TXT', 'CSV' ),
61
  ), // Bing.
62
  'pricespy' => array(
63
  'link' => 'http://bit.ly/2t0rEFm',
includes/feeds/merchant_templates.php CHANGED
@@ -2666,38 +2666,14 @@ return array(
2666
  'limit' => array( '', '', '', '', '', '', '', '', '', '', '', '' ),
2667
  ),
2668
  'bing' => array(
2669
- 'mattributes' => array(
2670
- 'id',
2671
- 'title',
2672
- 'link',
2673
- 'price',
2674
- 'description',
2675
- 'image_link',
2676
- 'shipping',
2677
- ),
2678
- 'prefix' => array( '', '', '', '', '', '', '' ),
2679
- 'type' => array(
2680
- 'attribute',
2681
- 'attribute',
2682
- 'attribute',
2683
- 'attribute',
2684
- 'attribute',
2685
- 'attribute',
2686
- 'attribute',
2687
- ),
2688
- 'attributes' => array(
2689
- 'id',
2690
- 'title',
2691
- 'link',
2692
- 'price',
2693
- 'description',
2694
- 'image',
2695
- 'shipping_class',
2696
- ),
2697
- 'default' => array( '', '', '', '', '', '', '' ),
2698
- 'suffix' => array( '', '', '', '', '', '', '' ),
2699
- 'output_type' => array( '1', '1', '1', '1', '1', '1', '1' ),
2700
- 'limit' => array( '', '', '', '', '', '', '' ),
2701
  ),
2702
  'google_local_inventory' => array(
2703
  'mattributes' => array(
2666
  'limit' => array( '', '', '', '', '', '', '', '', '', '', '', '' ),
2667
  ),
2668
  'bing' => array(
2669
+ 'mattributes' => array('id','title','link','price','description','image_link','shipping','gtin','mpn','brand','product_type','product_category','availability','item_group_id',),
2670
+ 'prefix' => array('','','','','','','','','','','','','','',),
2671
+ 'type' => array('attribute','attribute','attribute','attribute','attribute','attribute','attribute','attribute','attribute','pattern','attribute','pattern','attribute','attribute',),
2672
+ 'attributes' => array('id','title','link','price','description','image','shipping_class','woo_feed_gtin','sku',$this->brand_pattern,'product_type','','availability','item_group_id',),
2673
+ 'default' => array('','','','','','','','','','','','','','',),
2674
+ 'suffix' => array('','','','','','','','','','','','','','',),
2675
+ 'output_type' => array('1','1','1','6','1','1','1','1','1','1','1','1','1','1',),
2676
+ 'limit' => array('','','','','','','','','','','','','','',),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2677
  ),
2678
  'google_local_inventory' => array(
2679
  'mattributes' => array(
includes/helper.php CHANGED
@@ -3311,4 +3311,16 @@ if ( ! function_exists( 'woo_feed_product_structured_data' )) {
3311
  }
3312
  }
3313
 
 
 
 
 
 
 
 
 
 
 
 
 
3314
  // End of file helper.php.
3311
  }
3312
  }
3313
 
3314
+ if( ! function_exists( 'woo_feed_trim_attribute' ) ) {
3315
+ /**
3316
+ * Trim attribute by specific sign
3317
+ *
3318
+ * @param $attribute string feed attribute
3319
+ * @return mixed
3320
+ */
3321
+ function woo_feed_trim_attribute($attribute) {
3322
+ return str_replace('_', ' ', $attribute);
3323
+ }
3324
+ }
3325
+
3326
  // End of file helper.php.
woo-feed.php CHANGED
@@ -10,7 +10,7 @@
10
  * Plugin Name: WooCommerce Product Feed
11
  * Plugin URI: https://webappick.com/
12
  * Description: Easily generate woocommerce product feed for any marketing channel like Google Shopping(Merchant), Facebook Remarketing, Bing, eBay & more. Support 100+ Merchants.
13
- * Version: 4.3.6
14
  * Author: WebAppick
15
  * Author URI: https://webappick.com/
16
  * License: GPL v2
@@ -38,7 +38,7 @@ if ( ! defined( 'WOO_FEED_FREE_VERSION' ) ) {
38
  * @var string
39
  * @since 3.1.6
40
  */
41
- define( 'WOO_FEED_FREE_VERSION', '4.3.6' );
42
  }
43
 
44
  if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {
10
  * Plugin Name: WooCommerce Product Feed
11
  * Plugin URI: https://webappick.com/
12
  * Description: Easily generate woocommerce product feed for any marketing channel like Google Shopping(Merchant), Facebook Remarketing, Bing, eBay & more. Support 100+ Merchants.
13
+ * Version: 4.3.7
14
  * Author: WebAppick
15
  * Author URI: https://webappick.com/
16
  * License: GPL v2
38
  * @var string
39
  * @since 3.1.6
40
  */
41
+ define( 'WOO_FEED_FREE_VERSION', '4.3.7' );
42
  }
43
 
44
  if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {