Product Feed PRO for WooCommerce - Version 8.8.5

Version Description

Fixed a shipping cost bug that happened when multiple flat rates where configured for a country

Download this release

Release Info

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

Code changes from version 8.8.4 to 8.8.5

classes/class-get-products.php CHANGED
@@ -669,14 +669,17 @@ class WooSEA_Get_Products {
669
 
670
  foreach ( $zone['zone_locations'] as $zone_type ) {
671
  $code_from_config = $this->woosea_country_to_code($project_config['countries']);
672
-
673
  // Only add shipping zones to the feed for specific feed country
674
  $ship_found = strpos($zone_type->code, $code_from_config);
675
-
676
  if(($ship_found !== false) OR ($add_all_shipping == "yes")){
677
  if ($zone_type->type == "country"){
678
  // This is a country shipping zone
679
  $zone_details['country'] = $zone_type->code;
 
 
 
680
  } elseif ($zone_type->type == "state"){
681
  // This is a state shipping zone, split of country
682
  $zone_expl = explode(":", $zone_type->code);
@@ -696,6 +699,7 @@ class WooSEA_Get_Products {
696
  } else {
697
  // Unknown shipping zone type
698
  }
 
699
  // Get the g:services and g:prices, because there could be multiple services the $shipping_arr could multiply again
700
  // g:service = "Method title - Shipping class costs"
701
  // for example, g:service = "Estimated Shipping - Heavy shipping". g:price would be 180
@@ -712,6 +716,7 @@ class WooSEA_Get_Products {
712
 
713
  if(isset($v->instance_settings['cost'])){
714
  $shipping_cost = $v->instance_settings['cost'];
 
715
  if(!$shipping_cost){
716
  $shipping_cost = 0;
717
  }
@@ -742,7 +747,7 @@ class WooSEA_Get_Products {
742
  }
743
  }
744
  }
745
-
746
  // WooCommerce Table Rate Bolder Elements
747
  if(is_plugin_active( 'woocommerce-table-rate-shipping/woocommerce-table-rate-shipping.php' )) {
748
  // Set shipping cost
@@ -785,7 +790,7 @@ class WooSEA_Get_Products {
785
  if((isset($v->instance_settings[$class_cost_id])) AND ($class_cost_id != "no_class_cost")){
786
  if (is_numeric($v->instance_settings[$class_cost_id])){
787
  $shipping_cost = $v->instance_settings[$class_cost_id];
788
-
789
  // Do we need to convert the shipping costswith the Aelia Currency Switcher
790
  if((isset($project_config['AELIA'])) AND (!empty($GLOBALS['woocommerce-aelia-currencyswitcher'])) AND (get_option ('add_aelia_support') == "yes")){
791
  if(!array_key_exists('base_currency', $project_config)){
@@ -812,7 +817,6 @@ class WooSEA_Get_Products {
812
  } else {
813
  $shipping_cost = $v->instance_settings[$class_cost_id];
814
  $shipping_cost = str_replace("[qty]", "1", $shipping_cost);
815
-
816
  $mathString = trim($shipping_cost); // trim white spaces
817
  if (preg_match("/fee percent/", $mathString)){
818
  $shipcost_piece = explode("+", $mathString);
@@ -939,7 +943,7 @@ class WooSEA_Get_Products {
939
  //unset($shipping_cost);
940
  }
941
  }
942
-
943
  // This shipping zone has postal codes so multiply the zone details
944
  $nr_postals = count($postal_code);
945
  if ($nr_postals > 0){
@@ -978,7 +982,8 @@ class WooSEA_Get_Products {
978
  // Remove empty countries
979
  foreach($shipping_arr as $k => $v){
980
  if(empty($v['country'])){
981
- unset($shipping_arr[$k]);
 
982
  }
983
  }
984
  return $shipping_arr;
@@ -2357,6 +2362,7 @@ class WooSEA_Get_Products {
2357
  $shipping_class_id = $product->get_shipping_class_id();
2358
 
2359
  $shipping_class= $product->get_shipping_class();
 
2360
  $class_cost_id = "class_cost_".$shipping_class_id;
2361
  if($class_cost_id == "class_cost_0"){
2362
  $class_cost_id = "no_class_cost";
669
 
670
  foreach ( $zone['zone_locations'] as $zone_type ) {
671
  $code_from_config = $this->woosea_country_to_code($project_config['countries']);
672
+
673
  // Only add shipping zones to the feed for specific feed country
674
  $ship_found = strpos($zone_type->code, $code_from_config);
675
+
676
  if(($ship_found !== false) OR ($add_all_shipping == "yes")){
677
  if ($zone_type->type == "country"){
678
  // This is a country shipping zone
679
  $zone_details['country'] = $zone_type->code;
680
+ } elseif ($zone_type->type == "code"){
681
+ // This is a country shipping zone
682
+ $zone_details['country'] = $zone_type->code;
683
  } elseif ($zone_type->type == "state"){
684
  // This is a state shipping zone, split of country
685
  $zone_expl = explode(":", $zone_type->code);
699
  } else {
700
  // Unknown shipping zone type
701
  }
702
+
703
  // Get the g:services and g:prices, because there could be multiple services the $shipping_arr could multiply again
704
  // g:service = "Method title - Shipping class costs"
705
  // for example, g:service = "Estimated Shipping - Heavy shipping". g:price would be 180
716
 
717
  if(isset($v->instance_settings['cost'])){
718
  $shipping_cost = $v->instance_settings['cost'];
719
+
720
  if(!$shipping_cost){
721
  $shipping_cost = 0;
722
  }
747
  }
748
  }
749
  }
750
+
751
  // WooCommerce Table Rate Bolder Elements
752
  if(is_plugin_active( 'woocommerce-table-rate-shipping/woocommerce-table-rate-shipping.php' )) {
753
  // Set shipping cost
790
  if((isset($v->instance_settings[$class_cost_id])) AND ($class_cost_id != "no_class_cost")){
791
  if (is_numeric($v->instance_settings[$class_cost_id])){
792
  $shipping_cost = $v->instance_settings[$class_cost_id];
793
+
794
  // Do we need to convert the shipping costswith the Aelia Currency Switcher
795
  if((isset($project_config['AELIA'])) AND (!empty($GLOBALS['woocommerce-aelia-currencyswitcher'])) AND (get_option ('add_aelia_support') == "yes")){
796
  if(!array_key_exists('base_currency', $project_config)){
817
  } else {
818
  $shipping_cost = $v->instance_settings[$class_cost_id];
819
  $shipping_cost = str_replace("[qty]", "1", $shipping_cost);
 
820
  $mathString = trim($shipping_cost); // trim white spaces
821
  if (preg_match("/fee percent/", $mathString)){
822
  $shipcost_piece = explode("+", $mathString);
943
  //unset($shipping_cost);
944
  }
945
  }
946
+
947
  // This shipping zone has postal codes so multiply the zone details
948
  $nr_postals = count($postal_code);
949
  if ($nr_postals > 0){
982
  // Remove empty countries
983
  foreach($shipping_arr as $k => $v){
984
  if(empty($v['country'])){
985
+ $shipping_arr[$v]['country'] = get_option( 'woocommerce_default_country' );
986
+ //unset($shipping_arr[$k]);
987
  }
988
  }
989
  return $shipping_arr;
2362
  $shipping_class_id = $product->get_shipping_class_id();
2363
 
2364
  $shipping_class= $product->get_shipping_class();
2365
+
2366
  $class_cost_id = "class_cost_".$shipping_class_id;
2367
  if($class_cost_id == "class_cost_0"){
2368
  $class_cost_id = "no_class_cost";
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=8.8.4',
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=8.8.5',
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: 8.8.4
9
 
10
  == Description ==
11
 
@@ -319,6 +319,9 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
319
 
320
  === Changelog ===
321
 
 
 
 
322
  = 8.8.4 (2020-10-01) =
323
  * Changed the default price mappings for the Pinterest template
324
 
@@ -2816,6 +2819,9 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
2816
 
2817
  == Upgrade Notice ==
2818
 
 
 
 
2819
  = 8.8.4 =
2820
  Changed the default price mappings for the Pinterest template
2821
 
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: 8.8.5
9
 
10
  == Description ==
11
 
319
 
320
  === Changelog ===
321
 
322
+ = 8.8.5 (2020-10-01) =
323
+ * Fixed a shipping cost bug that happened when multiple flat rates where configured for a country
324
+
325
  = 8.8.4 (2020-10-01) =
326
  * Changed the default price mappings for the Pinterest template
327
 
2819
 
2820
  == Upgrade Notice ==
2821
 
2822
+ = 8.8.5 =
2823
+ Fixed a shipping cost bug that happened when multiple flat rates where configured for a country
2824
+
2825
  = 8.8.4 =
2826
  Changed the default price mappings for the Pinterest template
2827
 
woocommerce-sea.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Plugin Name: Product Feed PRO for WooCommerce
4
- * Version: 8.8.4
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
@@ -48,7 +48,7 @@ if (!defined('ABSPATH')) {
48
  * Plugin versionnumber, please do not override.
49
  * Define some constants
50
  */
51
- define( 'WOOCOMMERCESEA_PLUGIN_VERSION', '8.8.4' );
52
  define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
53
  define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
54
 
1
  <?php
2
  /**
3
  * Plugin Name: Product Feed PRO for WooCommerce
4
+ * Version: 8.8.5
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
48
  * Plugin versionnumber, please do not override.
49
  * Define some constants
50
  */
51
+ define( 'WOOCOMMERCESEA_PLUGIN_VERSION', '8.8.5' );
52
  define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
53
  define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
54