Product Feed PRO for WooCommerce - Version 9.0.7

Version Description

Fixed an issue where sale prices configured with the WooCommerce FlyCart plugin did not work

Download this release

Release Info

Developer jorisverwater
Plugin Icon 128x128 Product Feed PRO for WooCommerce
Version 9.0.7
Comparing to
See all releases

Code changes from version 9.0.6 to 9.0.7

classes/class-get-products.php CHANGED
@@ -2417,7 +2417,8 @@ class WooSEA_Get_Products {
2417
  //$product_data['system_sale_price'] = ($product->get_sale_price() != $sale_price) ? $this->get_product_price($product, $sale_price ) : '';
2418
  $product_data['system_sale_price'] = wc_format_decimal($product_data['system_sale_price'],2);
2419
 
2420
- if(!empty($tax_rates)){
 
2421
  foreach ($tax_rates as $tk => $tv){
2422
  if($tv['rate'] > 0){
2423
  $tax_rates[1]['rate'] = $tv['rate'];
@@ -2430,7 +2431,7 @@ class WooSEA_Get_Products {
2430
  }
2431
 
2432
  $fullrate = 100+$tax_rates[1]['rate'];
2433
-
2434
  // Override price when bundled or composite product
2435
  if(($product->get_type() == "bundle") OR ($product->get_type() == "composite")){
2436
  $meta = get_post_meta($product_data['id']);
@@ -2506,7 +2507,7 @@ class WooSEA_Get_Products {
2506
  $product_data['sale_price_forced'] = round(wc_get_price_excluding_tax($product, array('price'=> $product->get_sale_price())) * (100+$tax_rates[1]['rate'])/100,2);
2507
  $product_data['net_sale_price'] = ($product->get_sale_price()/$fullrate)*100;
2508
  $product_data['net_sale_price'] = round($product_data['net_sale_price'],2);
2509
-
2510
  // We do not want to have 0 sale price values in the feed
2511
  if($product_data['net_sale_price'] == 0){
2512
  $product_data['net_sale_price'] = "";
@@ -2518,12 +2519,20 @@ class WooSEA_Get_Products {
2518
  if($product_data['sale_price'] > 0){
2519
  $price = $product_data['sale_price'];
2520
  }
2521
-
2522
  // Is the Discount Rules for WooCommerce by FlyCart plugin active, check for sale prices
2523
  if ($this->woosea_is_plugin_active('woo-discount-rules/woo-discount-rules.php')){
2524
  $discount = apply_filters('advanced_woo_discount_rules_get_product_discount_price_from_custom_price', 10, $product, 1, $product_data['sale_price'], 'discounted_price', true, true);
2525
  if($discount !== false){
2526
- $product_data['sale_price'] = $discount;
 
 
 
 
 
 
 
 
2527
  }
2528
  }
2529
 
@@ -2836,20 +2845,21 @@ class WooSEA_Get_Products {
2836
  $custom_value = $product_data['condition'];
2837
  }
2838
 
2839
- // Need to clean up the strange price rightpress is returning
2840
- if($custom_kk == "rp_wcdpd_price_cache"){
2841
-
2842
- if((isset($project_config['AELIA'])) AND (!empty($GLOBALS['woocommerce-aelia-currencyswitcher'])) AND (get_option ('add_aelia_support') == "yes")){
2843
- $product_data['price'] = do_shortcode('[aelia_cs_product_price product_id="'.$product_data['id'].'" formatted="0" currency="'.$project_config['AELIA'].'"]');
2844
- $product_data['sale_price'] = apply_filters('wc_aelia_cs_convert', $custom_value['sale_price']['p'], $from_currency, $project_config['AELIA']);
2845
- } else {
2846
- if(array_key_exists("price", $custom_value)){
2847
- $product_data['price'] = $custom_value['price']['p'];
2848
- }
2849
 
2850
- if(array_key_exists("sale_price", $custom_value)){
2851
- $product_data['sale_price'] = $custom_value['sale_price']['p'];
2852
- }
 
2853
  }
2854
  }
2855
  $product_data[$new_key] = $custom_value;
@@ -3374,7 +3384,6 @@ class WooSEA_Get_Products {
3374
  // Check if the sale price is effective
3375
  if((strtotime($product_data['sale_price_start_date'])) AND (strtotime($product_data['sale_price_end_date']))){
3376
  $current_date = date('Y-m-d');
3377
-
3378
  if(($current_date < $product_data['sale_price_start_date'])){
3379
  unset($product_data['sale_price']);
3380
  }
2417
  //$product_data['system_sale_price'] = ($product->get_sale_price() != $sale_price) ? $this->get_product_price($product, $sale_price ) : '';
2418
  $product_data['system_sale_price'] = wc_format_decimal($product_data['system_sale_price'],2);
2419
 
2420
+ if(!empty($tax_rates)){
2421
+
2422
  foreach ($tax_rates as $tk => $tv){
2423
  if($tv['rate'] > 0){
2424
  $tax_rates[1]['rate'] = $tv['rate'];
2431
  }
2432
 
2433
  $fullrate = 100+$tax_rates[1]['rate'];
2434
+
2435
  // Override price when bundled or composite product
2436
  if(($product->get_type() == "bundle") OR ($product->get_type() == "composite")){
2437
  $meta = get_post_meta($product_data['id']);
2507
  $product_data['sale_price_forced'] = round(wc_get_price_excluding_tax($product, array('price'=> $product->get_sale_price())) * (100+$tax_rates[1]['rate'])/100,2);
2508
  $product_data['net_sale_price'] = ($product->get_sale_price()/$fullrate)*100;
2509
  $product_data['net_sale_price'] = round($product_data['net_sale_price'],2);
2510
+
2511
  // We do not want to have 0 sale price values in the feed
2512
  if($product_data['net_sale_price'] == 0){
2513
  $product_data['net_sale_price'] = "";
2519
  if($product_data['sale_price'] > 0){
2520
  $price = $product_data['sale_price'];
2521
  }
2522
+
2523
  // Is the Discount Rules for WooCommerce by FlyCart plugin active, check for sale prices
2524
  if ($this->woosea_is_plugin_active('woo-discount-rules/woo-discount-rules.php')){
2525
  $discount = apply_filters('advanced_woo_discount_rules_get_product_discount_price_from_custom_price', 10, $product, 1, $product_data['sale_price'], 'discounted_price', true, true);
2526
  if($discount !== false){
2527
+ $product_data['sale_price'] = $discount;
2528
+ $price_incl_tax = get_option( 'woocommerce_prices_include_tax' );
2529
+ if($price_incl_tax == "yes"){
2530
+ $product_data['price_forced'] = $product_data['price']*($fullrate/100);
2531
+ $product_data['net_sale_price'] = ($discount/$fullrate)*100;
2532
+ $product_data['sale_price_forced'] = $discount*($fullrate/100);
2533
+ } else {
2534
+ $product_data['net_sale_price'] = $discount;
2535
+ }
2536
  }
2537
  }
2538
 
2845
  $custom_value = $product_data['condition'];
2846
  }
2847
 
2848
+ // Need to clean up the strange price Rightpress is returning
2849
+ if ($this->woosea_is_plugin_active('wc-dynamic-pricing-and-discounts/wc-dynamic-pricing-and-discounts.php')){
2850
+ if($custom_kk == "rp_wcdpd_price_cache"){
2851
+ if((isset($project_config['AELIA'])) AND (!empty($GLOBALS['woocommerce-aelia-currencyswitcher'])) AND (get_option ('add_aelia_support') == "yes")){
2852
+ $product_data['price'] = do_shortcode('[aelia_cs_product_price product_id="'.$product_data['id'].'" formatted="0" currency="'.$project_config['AELIA'].'"]');
2853
+ $product_data['sale_price'] = apply_filters('wc_aelia_cs_convert', $custom_value['sale_price']['p'], $from_currency, $project_config['AELIA']);
2854
+ } else {
2855
+ if(array_key_exists("price", $custom_value)){
2856
+ $product_data['price'] = $custom_value['price']['p'];
2857
+ }
2858
 
2859
+ if(array_key_exists("sale_price", $custom_value)){
2860
+ $product_data['sale_price'] = $custom_value['sale_price']['p'];
2861
+ }
2862
+ }
2863
  }
2864
  }
2865
  $product_data[$new_key] = $custom_value;
3384
  // Check if the sale price is effective
3385
  if((strtotime($product_data['sale_price_start_date'])) AND (strtotime($product_data['sale_price_end_date']))){
3386
  $current_date = date('Y-m-d');
 
3387
  if(($current_date < $product_data['sale_price_start_date'])){
3388
  unset($product_data['sale_price']);
3389
  }
js/woosea_key.js CHANGED
@@ -27,7 +27,7 @@ jQuery(document).ready(function($) {
27
  var license_key = $('#license-key').val();
28
 
29
  jQuery.ajax({
30
- url: 'https://www.adtribes.io/check/license.php?key=' + license_key + '&email=' + license_email + '&domain=' + root_domain + '&version=9.0.6',
31
  jsonp: 'callback',
32
  dataType: 'jsonp',
33
  type: 'GET',
27
  var license_key = $('#license-key').val();
28
 
29
  jQuery.ajax({
30
+ url: 'https://www.adtribes.io/check/license.php?key=' + license_key + '&email=' + license_email + '&domain=' + root_domain + '&version=9.0.7',
31
  jsonp: 'callback',
32
  dataType: 'jsonp',
33
  type: 'GET',
readme.txt CHANGED
@@ -5,7 +5,7 @@ License URI: http://www.gnu.org/licenses/gpl.html
5
  Tags: Product Feed, Google Shopping, Google Shopping Feed, WooCommerce Product Feed, WooCommerce Product Feed PRO, Bing Shopping, Bing product feed, Bing remarking, Google Merchant Feed, Google DRM Feed, Google Dynamic Remarketing Feed, Facebook feed, Google feed, Bing feed, Facebook Product Feed, Facebook Dynamic remarketing, Data Feed, WooCommerce Feed, XML product feed, CSV product feed, TSV, TXT product feed, comparison shopping engines, comparison shopping websites, vergelijk.nl, vergelijk.be, vertaa.fi, beslist.nl, kieskeurig.nl, bol.com, raketten, pricerunner, pricegrabber, Buy, leGuide, Kelkoo, Twenga, Yandex, Etsy, Dealtime, Shopzilla, Billiger, Google Product Review feed
6
  Requires at least: 4.5
7
  Tested up to: 5.5
8
- Stable tag: 9.0.6
9
 
10
  == Description ==
11
 
@@ -321,6 +321,9 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
321
 
322
  === Changelog ===
323
 
 
 
 
324
  = 9.0.6 (2020-11-11) =
325
  * Added EAN as one of the fields that can be selected for the custom feed template
326
 
@@ -2888,6 +2891,9 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
2888
 
2889
  == Upgrade Notice ==
2890
 
 
 
 
2891
  = 9.0.6 =
2892
  Added EAN as one of the fields that can be selected for the custom feed template
2893
 
5
  Tags: Product Feed, Google Shopping, Google Shopping Feed, WooCommerce Product Feed, WooCommerce Product Feed PRO, Bing Shopping, Bing product feed, Bing remarking, Google Merchant Feed, Google DRM Feed, Google Dynamic Remarketing Feed, Facebook feed, Google feed, Bing feed, Facebook Product Feed, Facebook Dynamic remarketing, Data Feed, WooCommerce Feed, XML product feed, CSV product feed, TSV, TXT product feed, comparison shopping engines, comparison shopping websites, vergelijk.nl, vergelijk.be, vertaa.fi, beslist.nl, kieskeurig.nl, bol.com, raketten, pricerunner, pricegrabber, Buy, leGuide, Kelkoo, Twenga, Yandex, Etsy, Dealtime, Shopzilla, Billiger, Google Product Review feed
6
  Requires at least: 4.5
7
  Tested up to: 5.5
8
+ Stable tag: 9.0.7
9
 
10
  == Description ==
11
 
321
 
322
  === Changelog ===
323
 
324
+ = 9.0.7 (2020-11-12) =
325
+ * Fixed an issue where sale prices configured with the WooCommerce FlyCart plugin did not work
326
+
327
  = 9.0.6 (2020-11-11) =
328
  * Added EAN as one of the fields that can be selected for the custom feed template
329
 
2891
 
2892
  == Upgrade Notice ==
2893
 
2894
+ = 9.0.7 =
2895
+ Fixed an issue where sale prices configured with the WooCommerce FlyCart plugin did not work
2896
+
2897
  = 9.0.6 =
2898
  Added EAN as one of the fields that can be selected for the custom feed template
2899
 
woocommerce-sea.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Plugin Name: Product Feed PRO for WooCommerce
4
- * Version: 9.0.6
5
  * Plugin URI: https://www.adtribes.io/support/?utm_source=wpadmin&utm_medium=plugin&utm_campaign=woosea_product_feed_pro
6
  * Description: Configure and maintain your WooCommerce product feeds for Google Shopping, Facebook, Remarketing, Bing, Yandex, Comparison shopping websites and over a 100 channels more.
7
  * Author: AdTribes.io
@@ -17,7 +17,7 @@
17
  * Domain Path: /languages
18
  *
19
  * WC requires at least: 4.4
20
- * WC tested up to: 4.6
21
  *
22
  * Product Feed PRO for WooCommerce is free software: you can redistribute it and/or modify
23
  * it under the terms of the GNU General Public License as published by
1
  <?php
2
  /**
3
  * Plugin Name: Product Feed PRO for WooCommerce
4
+ * Version: 9.0.7
5
  * Plugin URI: https://www.adtribes.io/support/?utm_source=wpadmin&utm_medium=plugin&utm_campaign=woosea_product_feed_pro
6
  * Description: Configure and maintain your WooCommerce product feeds for Google Shopping, Facebook, Remarketing, Bing, Yandex, Comparison shopping websites and over a 100 channels more.
7
  * Author: AdTribes.io
17
  * Domain Path: /languages
18
  *
19
  * WC requires at least: 4.4
20
+ * WC tested up to: 4.7
21
  *
22
  * Product Feed PRO for WooCommerce is free software: you can redistribute it and/or modify
23
  * it under the terms of the GNU General Public License as published by