CTX Feed – WooCommerce Product Feed Manager Plugin - Version 4.3.24

Version Description

(2021-01-31) = * Fixed: Bundle product price missing solved. * Fixed: Setting page extra arrow appearing solved.

Download this release

Release Info

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

Code changes from version 4.3.23 to 4.3.24

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.23
12
  License: GPLv2 or later
13
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
14
 
@@ -308,6 +308,10 @@ Using pro version:
308
 
309
  == Changelog ==
310
 
 
 
 
 
311
  = 4.3.23 (2021-01-28) =
312
  * Fixed: Class Woo_Feed_Log_Handler_File not exist solved.
313
 
8
  Requires at least: 3.6
9
  Tested Up To: 5.6
10
  Requires PHP: 5.6
11
+ Stable tag: 4.3.24
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.24 (2021-01-31) =
312
+ * Fixed: Bundle product price missing solved.
313
+ * Fixed: Setting page extra arrow appearing solved.
314
+
315
  = 4.3.23 (2021-01-28) =
316
  * Fixed: Class Woo_Feed_Log_Handler_File not exist solved.
317
 
admin/partials/woo-feed-settings.php CHANGED
@@ -129,25 +129,6 @@ $settings = woo_feed_get_options( 'all' );
129
  <p class="description"><?php esc_html_e( 'Disables or Enables Brand', 'woo-feed' ); ?></p>
130
  </td>
131
  </tr>
132
- <!-- <tr>-->
133
- <!-- <td><label for="disable_pixel">--><?php //_e( 'Disable/Enable Facebook Pixel', 'woo-feed' ); ?><!--</label></td>-->
134
- <!-- <td>-->
135
- <!-- <label for="disable_pixel">-->
136
- <!-- <select name="disable_pixel" id="disable_pixel">-->
137
- <!-- <option value="disable"--><?php //selected( $settings['disable_pixel'], 'disable' ); ?><!-->--><?php //esc_html_e( 'Disabled', 'woo-feed' ); ?><!--</option>-->
138
- <!-- <option value="enable"--><?php //selected( $settings['disable_pixel'], 'enable' ); ?><!-->--><?php //esc_html_e( 'Enabled', 'woo-feed' ); ?><!--</option>-->
139
- <!-- </select>-->
140
- <!-- </label>-->
141
- <!-- <p class="description">--><?php //esc_html_e( 'Disables or Enables Facebook Pixel ID’s for Variation', 'woo-feed' ); ?><!--</p>-->
142
- <!-- </td>-->
143
- <!-- </tr>-->
144
- <!-- <tr>-->
145
- <!-- <th scope="row"><label for="pixel_id">--><?php //_e( 'Facebook Pixel Content ID’s for Variation', 'woo-feed' ); ?><!--</label></th>-->
146
- <!-- <td>-->
147
- <!-- <input class="regular-text" type="number" min="1" name="pixel_id" id="pixel_id" value="--><?php //echo esc_attr( $settings['pixel_id'] ); ?><!--">-->
148
- <!-- <p class="description">--><?php //_e( 'Insert your Facebook Pixel ID', 'woo-feed' ); ?><!--</p>-->
149
- <!-- </td>-->
150
- <!-- </tr>-->
151
  <tr>
152
  <th scope="row"><label for="allow_all_shipping"><?php esc_html_e( 'Add shipping costs for all countries to feed (Google Shopping / Facebook only)', 'woo-feed' ); ?></label></th>
153
  <td>
129
  <p class="description"><?php esc_html_e( 'Disables or Enables Brand', 'woo-feed' ); ?></p>
130
  </td>
131
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  <tr>
133
  <th scope="row"><label for="allow_all_shipping"><?php esc_html_e( 'Add shipping costs for all countries to feed (Google Shopping / Facebook only)', 'woo-feed' ); ?></label></th>
134
  <td>
includes/classes/class-woo-feed-dropdown.php CHANGED
@@ -220,6 +220,7 @@ class Woo_Feed_Dropdown {
220
  'sale_price_edate' => esc_html__( 'Sale End Date', 'woo-feed' ),
221
  'reviewer_name' => esc_html__( 'Reviewer Name', 'woo-feed' ),
222
  'weight' => esc_html__( 'Weight', 'woo-feed' ),
 
223
  'width' => esc_html__( 'Width', 'woo-feed' ),
224
  'height' => esc_html__( 'Height', 'woo-feed' ),
225
  'length' => esc_html__( 'Length', 'woo-feed' ),
220
  'sale_price_edate' => esc_html__( 'Sale End Date', 'woo-feed' ),
221
  'reviewer_name' => esc_html__( 'Reviewer Name', 'woo-feed' ),
222
  'weight' => esc_html__( 'Weight', 'woo-feed' ),
223
+ 'weight_unit' => esc_html__( 'Weight Unit', 'woo-feed' ),
224
  'width' => esc_html__( 'Width', 'woo-feed' ),
225
  'height' => esc_html__( 'Height', 'woo-feed' ),
226
  'length' => esc_html__( 'Length', 'woo-feed' ),
includes/classes/class-woo-feed-products-v3.php CHANGED
@@ -630,8 +630,18 @@ class Woo_Feed_Products_v3
630
  }
631
  } elseif ( 'csv' == $feedType || 'tsv' == $feedType || 'xls' == $feedType ) {
632
  $merchant_attribute = woo_feed_replace_to_merchant_attribute($merchant_attribute, $merchant, $feedType);
633
- $merchant_attribute = $this->processStringForCSV($merchant_attribute);
634
- $attributeValue = $this->processStringForCSV($attributeValue);
 
 
 
 
 
 
 
 
 
 
635
  } elseif ( 'txt' == $feedType ) {
636
  $merchant_attribute = woo_feed_replace_to_merchant_attribute($merchant_attribute, $merchant, $feedType);
637
  $merchant_attribute = $this->processStringForTXT($merchant_attribute);
@@ -2461,6 +2471,11 @@ class Woo_Feed_Products_v3
2461
  } elseif ( $product->is_type('grouped') ) {
2462
  return $this->getGroupProductPrice($product,
2463
  'regular'); // this calls self::price() so no need to use self::getWPMLPrice()
 
 
 
 
 
2464
  } else {
2465
  return $product->get_regular_price();
2466
  }
@@ -2661,6 +2676,37 @@ class Woo_Feed_Products_v3
2661
  return $price;
2662
  }
2663
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2664
  /**
2665
  * Return product price with tax
2666
  *
@@ -2692,6 +2738,19 @@ class Woo_Feed_Products_v3
2692
  return $product->get_weight();
2693
  }
2694
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2695
  /**
2696
  * Get Product Width
2697
  *
630
  }
631
  } elseif ( 'csv' == $feedType || 'tsv' == $feedType || 'xls' == $feedType ) {
632
  $merchant_attribute = woo_feed_replace_to_merchant_attribute($merchant_attribute, $merchant, $feedType);
633
+ $merchant_attribute = $this->processStringForCSV( $merchant_attribute );
634
+
635
+ if ( "shipping" === $merchant_attribute ) {
636
+ $merchant_attribute = 'shipping(country:region:service:price)';
637
+ }
638
+
639
+ if ( "tax" === $merchant_attribute ) {
640
+ $merchant_attribute = 'tax(country:region:rate:tax_ship)';
641
+ }
642
+
643
+ $attributeValue = $this->processStringForCSV( $attributeValue );
644
+
645
  } elseif ( 'txt' == $feedType ) {
646
  $merchant_attribute = woo_feed_replace_to_merchant_attribute($merchant_attribute, $merchant, $feedType);
647
  $merchant_attribute = $this->processStringForTXT($merchant_attribute);
2471
  } elseif ( $product->is_type('grouped') ) {
2472
  return $this->getGroupProductPrice($product,
2473
  'regular'); // this calls self::price() so no need to use self::getWPMLPrice()
2474
+ }elseif ( $product->is_type( 'bundle' ) ) {
2475
+ return $this->getBundleProductPrice(
2476
+ $product,
2477
+ 'price'
2478
+ ); // this calls self::price() so no need to use self::getWPMLPrice()
2479
  } else {
2480
  return $product->get_regular_price();
2481
  }
2676
  return $price;
2677
  }
2678
 
2679
+ /**
2680
+ * Get Bundle Product Price
2681
+ *
2682
+ * @param WC_Product $product product object.
2683
+ * @param string $type regular_price, sale_price & current_price.
2684
+ * @param boolean $tax product tax
2685
+ *
2686
+ * @return int|float|double
2687
+ * @since 4.3.24
2688
+ */
2689
+ protected function getBundleProductPrice( $product, $type, $tax = false ) {
2690
+ $id = $product->get_id();
2691
+ $price = 0;
2692
+ if ( class_exists( 'WC_Product_Bundle' ) ) {
2693
+ $bundle = new WC_Product_Bundle( $id );
2694
+ if ( 'current_price' === $type ) {
2695
+ $price = $bundle->get_bundle_price();
2696
+ }elseif ( 'sale_price' === $type ) {
2697
+ $price = $bundle->get_bundle_price();
2698
+ }else {
2699
+ $price = $bundle->get_bundle_regular_price();
2700
+ }
2701
+ }
2702
+
2703
+ if ( true === $tax && $product->is_taxable() ) {
2704
+ return $this->get_price_with_tax( $product, $price );
2705
+ }else {
2706
+ return $price;
2707
+ }
2708
+ }
2709
+
2710
  /**
2711
  * Return product price with tax
2712
  *
2738
  return $product->get_weight();
2739
  }
2740
 
2741
+ /**
2742
+ * Get Product Weight Unit
2743
+ *
2744
+ * @param WC_Product $product
2745
+ *
2746
+ * @return mixed
2747
+ * @since 5.2.7
2748
+ *
2749
+ */
2750
+ protected function weight_unit( $product ) {
2751
+ return get_option('woocommerce_weight_unit');
2752
+ }
2753
+
2754
  /**
2755
  * Get Product Width
2756
  *
includes/feeds/merchant_templates_override.php CHANGED
@@ -71,4 +71,36 @@ function woo_feed_get_bestprice_categoryPath_attribute_value_modify( $attribute_
71
  $attribute_value = str_replace('>',', ',$attribute_value);
72
  return $attribute_value;
73
  }
74
- add_filter('woo_feed_get_bestprice_product_type_attribute','woo_feed_get_bestprice_categoryPath_attribute_value_modify',10,3);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  $attribute_value = str_replace('>',', ',$attribute_value);
72
  return $attribute_value;
73
  }
74
+ add_filter('woo_feed_get_bestprice_product_type_attribute','woo_feed_get_bestprice_categoryPath_attribute_value_modify',10,3);
75
+
76
+ /**
77
+ * Modify wight value
78
+ *
79
+ * @param $attribute_value
80
+ * @param $product
81
+ * @param $feed_config
82
+ * @return string
83
+ */
84
+ if( ! function_exists( 'woo_feed_modify_weight_attribute_value' ) ) {
85
+ function woo_feed_modify_weight_attribute_value( $attribute_value, $product, $feed_config ) {
86
+ if ( in_array($feed_config['provider'], ['google', 'facebook', 'pinterest', 'bing', 'snapchat']) ) {
87
+ if( isset( $feed_config['attributes'] ) ) {
88
+ $attributes = $feed_config['attributes'];
89
+ $key = array_search ('weight', $attributes);
90
+ if( isset( $feed_config['suffix'] ) && !empty($key) ) {
91
+ if( array_key_exists( $key, $feed_config['suffix'] ) ) {
92
+ $weight_suffix_unit = $feed_config['suffix'][$key];
93
+
94
+ if( empty($weight_suffix_unit) && !empty($attribute_value) ) {
95
+ $attribute_value = $attribute_value . ' ' . get_option('woocommerce_weight_unit');
96
+ }
97
+
98
+ }
99
+ }
100
+ }
101
+ }
102
+
103
+ return $attribute_value;
104
+ }
105
+ add_filter( 'woo_feed_get_weight_attribute', 'woo_feed_modify_weight_attribute_value', 10, 3 );
106
+ }
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.23
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.23' );
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.24
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.24' );
42
  }
43
 
44
  if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {