Product Feed PRO for WooCommerce - Version 7.4.8

Version Description

For Google DSA and Skroutz feeds the parent variable products are added to the feed too.

Download this release

Release Info

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

Code changes from version 7.4.7 to 7.4.8

classes/class-get-products.php CHANGED
@@ -719,7 +719,7 @@ class WooSEA_Get_Products {
719
  $shipping_cost = 0;
720
  }
721
 
722
- // Do we need to convert the shipping costswith the Aelia Currency Switcher
723
  if((isset($project_config['AELIA'])) AND (!empty($GLOBALS['woocommerce-aelia-currencyswitcher'])) AND (get_option ('add_aelia_support') == "yes")){
724
  if(!array_key_exists('base_currency', $project_config)){
725
  $from_currency = get_woocommerce_currency();
@@ -2049,7 +2049,6 @@ class WooSEA_Get_Products {
2049
  $product_data['short_description'] = preg_replace('/\[vc_raw_html.*\[\/vc_raw_html\]/', '', $product_data['short_description']);
2050
  $product_data['short_description'] = preg_replace( '/\[(.*?)\]/', ' ', $product_data['short_description'] );
2051
 
2052
-
2053
  // Strip out the non-line-brake character
2054
  $product_data['description'] = str_replace(" ", "", $product_data['description']);
2055
  $product_data['short_description'] = str_replace(" ", "", $product_data['short_description']);
@@ -2264,7 +2263,6 @@ class WooSEA_Get_Products {
2264
  }
2265
 
2266
  //$set_country_base = add_filter('wc_aelia_cs_selected_currency', 'SEK', 0);
2267
-
2268
  //$product_data['price'] = apply_filters('wc_aelia_cs_convert', $product_data['price'], $from_currency, $project_config['AELIA']);
2269
  $product_data['price'] = do_shortcode('[aelia_cs_product_price product_id="'.$product_data['id'].'" formatted="0" currency="'.$project_config['AELIA'].'"]');
2270
  $product_data['regular_price'] = apply_filters('wc_aelia_cs_convert', $product_data['regular_price'], $from_currency, $project_config['AELIA']);
@@ -2282,8 +2280,12 @@ class WooSEA_Get_Products {
2282
  }
2283
 
2284
  $product_data['net_price'] = apply_filters('wc_aelia_cs_convert', $product_data['net_price'], $from_currency, $project_config['AELIA']);
2285
- $product_data['net_regular_price'] = apply_filters('wc_aelia_cs_convert', $product_data['net_regular_price'], $from_currency, $project_config['AELIA']);
2286
- $product_data['net_sale_price'] = apply_filters('wc_aelia_cs_convert', $product_data['net_sale_price'], $from_currency, $project_config['AELIA']);
 
 
 
 
2287
 
2288
  // Get Aelia manually inserted currency prices
2289
  if($product->is_type('simple')){
@@ -2340,7 +2342,6 @@ class WooSEA_Get_Products {
2340
  }
2341
  }
2342
  }
2343
-
2344
  }
2345
 
2346
  // Localize the price attributes
@@ -2405,7 +2406,7 @@ class WooSEA_Get_Products {
2405
  }
2406
  }
2407
  }
2408
-
2409
  // Google Dynamic Remarketing feeds require the English price notation
2410
  if ($project_config['name'] == "Google Remarketing - DRM"){
2411
  $thousand_separator = wc_get_price_thousand_separator();
@@ -2459,14 +2460,12 @@ class WooSEA_Get_Products {
2459
  }
2460
 
2461
  foreach($diff_taxonomies as $taxo){
2462
- // if((strpos($taxo, "pa_") === 0) OR (strpos($taxo, "product_") === 0) OR (strpos($taxo, "pwb-") === 0) OR (strpos($taxo, "dokan") === 0)){
2463
- $term_value = get_the_terms($product_data['id'], $taxo);
2464
- if(is_array($term_value)){
2465
- foreach($term_value as $term){
2466
- $product_data[$taxo] = $term->name;
2467
- }
2468
  }
2469
- // }
2470
  }
2471
 
2472
  /*r
@@ -2535,23 +2534,23 @@ class WooSEA_Get_Products {
2535
 
2536
  // Need to clean up the strange price rightpress is returning
2537
  if($custom_kk == "rp_wcdpd_price_cache"){
2538
- if(array_key_exists("price", $custom_value)){
2539
- $product_data['price'] = $custom_value['price']['p'];
2540
- }
2541
 
2542
- if(array_key_exists("sale_price", $custom_value)){
2543
- $product_data['sale_price'] = $custom_value['sale_price']['p'];
2544
- }
 
 
 
 
 
 
 
 
 
2545
  }
2546
  $product_data[$new_key] = $custom_value;
2547
  }
2548
 
2549
-
2550
-
2551
-
2552
-
2553
-
2554
-
2555
  /**
2556
  * We need to check if this product has individual custom product attributes
2557
  */
@@ -2669,14 +2668,17 @@ class WooSEA_Get_Products {
2669
  $product_data['total_product_orders'] = $sales_array[0];
2670
 
2671
  $visibility_list = wp_get_post_terms($product_data['item_group_id'], 'product_visibility', array("fields" => "all"));
2672
- foreach($visibility_list as $visibility_single){
2673
- if($visibility_single->slug == "exclude-from-catalog"){
2674
- $product_data['exclude_from_catalog'] = "yes";
2675
- }
2676
- if($visibility_single->slug == "exclude-from-search"){
2677
- $product_data['exclude_from_search'] = "yes";
2678
- }
2679
- }
 
 
 
2680
 
2681
  if(($product_data['exclude_from_search'] == "yes") AND ($product_data['exclude_from_catalog'] == "yes")){
2682
  $product_data['exclude_from_all'] = "yes";
@@ -2994,10 +2996,19 @@ class WooSEA_Get_Products {
2994
  /**
2995
  * When a product is a variable product we need to delete the original product from the feed, only the originals are allowed
2996
  */
2997
- if(($product->is_type('variable')) AND ($product_data['item_group_id'] == 0)){
2998
- $product_data = array();
2999
- $product_data = null;
3000
- }
 
 
 
 
 
 
 
 
 
3001
 
3002
  /**
3003
  * Remove variation products that are not THE default variation product
719
  $shipping_cost = 0;
720
  }
721
 
722
+ // Do we need to convert the shipping costs with the Aelia Currency Switcher
723
  if((isset($project_config['AELIA'])) AND (!empty($GLOBALS['woocommerce-aelia-currencyswitcher'])) AND (get_option ('add_aelia_support') == "yes")){
724
  if(!array_key_exists('base_currency', $project_config)){
725
  $from_currency = get_woocommerce_currency();
2049
  $product_data['short_description'] = preg_replace('/\[vc_raw_html.*\[\/vc_raw_html\]/', '', $product_data['short_description']);
2050
  $product_data['short_description'] = preg_replace( '/\[(.*?)\]/', ' ', $product_data['short_description'] );
2051
 
 
2052
  // Strip out the non-line-brake character
2053
  $product_data['description'] = str_replace(" ", "", $product_data['description']);
2054
  $product_data['short_description'] = str_replace(" ", "", $product_data['short_description']);
2263
  }
2264
 
2265
  //$set_country_base = add_filter('wc_aelia_cs_selected_currency', 'SEK', 0);
 
2266
  //$product_data['price'] = apply_filters('wc_aelia_cs_convert', $product_data['price'], $from_currency, $project_config['AELIA']);
2267
  $product_data['price'] = do_shortcode('[aelia_cs_product_price product_id="'.$product_data['id'].'" formatted="0" currency="'.$project_config['AELIA'].'"]');
2268
  $product_data['regular_price'] = apply_filters('wc_aelia_cs_convert', $product_data['regular_price'], $from_currency, $project_config['AELIA']);
2280
  }
2281
 
2282
  $product_data['net_price'] = apply_filters('wc_aelia_cs_convert', $product_data['net_price'], $from_currency, $project_config['AELIA']);
2283
+ if(isset($product_data['net_regular_price'])){
2284
+ $product_data['net_regular_price'] = apply_filters('wc_aelia_cs_convert', $product_data['net_regular_price'], $from_currency, $project_config['AELIA']);
2285
+ }
2286
+ if(isset($product_data['net_sale_price'])){
2287
+ $product_data['net_sale_price'] = apply_filters('wc_aelia_cs_convert', $product_data['net_sale_price'], $from_currency, $project_config['AELIA']);
2288
+ }
2289
 
2290
  // Get Aelia manually inserted currency prices
2291
  if($product->is_type('simple')){
2342
  }
2343
  }
2344
  }
 
2345
  }
2346
 
2347
  // Localize the price attributes
2406
  }
2407
  }
2408
  }
2409
+
2410
  // Google Dynamic Remarketing feeds require the English price notation
2411
  if ($project_config['name'] == "Google Remarketing - DRM"){
2412
  $thousand_separator = wc_get_price_thousand_separator();
2460
  }
2461
 
2462
  foreach($diff_taxonomies as $taxo){
2463
+ $term_value = get_the_terms($product_data['id'], $taxo);
2464
+ if(is_array($term_value)){
2465
+ foreach($term_value as $term){
2466
+ $product_data[$taxo] = $term->name;
 
 
2467
  }
2468
+ }
2469
  }
2470
 
2471
  /*r
2534
 
2535
  // Need to clean up the strange price rightpress is returning
2536
  if($custom_kk == "rp_wcdpd_price_cache"){
 
 
 
2537
 
2538
+ if((isset($project_config['AELIA'])) AND (!empty($GLOBALS['woocommerce-aelia-currencyswitcher'])) AND (get_option ('add_aelia_support') == "yes")){
2539
+ $product_data['price'] = do_shortcode('[aelia_cs_product_price product_id="'.$product_data['id'].'" formatted="0" currency="'.$project_config['AELIA'].'"]');
2540
+ $product_data['sale_price'] = apply_filters('wc_aelia_cs_convert', $custom_value['sale_price']['p'], $from_currency, $project_config['AELIA']);
2541
+ } else {
2542
+ if(array_key_exists("price", $custom_value)){
2543
+ $product_data['price'] = $custom_value['price']['p'];
2544
+ }
2545
+
2546
+ if(array_key_exists("sale_price", $custom_value)){
2547
+ $product_data['sale_price'] = $custom_value['sale_price']['p'];
2548
+ }
2549
+ }
2550
  }
2551
  $product_data[$new_key] = $custom_value;
2552
  }
2553
 
 
 
 
 
 
 
2554
  /**
2555
  * We need to check if this product has individual custom product attributes
2556
  */
2668
  $product_data['total_product_orders'] = $sales_array[0];
2669
 
2670
  $visibility_list = wp_get_post_terms($product_data['item_group_id'], 'product_visibility', array("fields" => "all"));
2671
+
2672
+ if(!empty($visibility_list)){
2673
+ foreach($visibility_list as $visibility_single){
2674
+ if($visibility_single->slug == "exclude-from-catalog"){
2675
+ $product_data['exclude_from_catalog'] = "yes";
2676
+ }
2677
+ if($visibility_single->slug == "exclude-from-search"){
2678
+ $product_data['exclude_from_search'] = "yes";
2679
+ }
2680
+ }
2681
+ }
2682
 
2683
  if(($product_data['exclude_from_search'] == "yes") AND ($product_data['exclude_from_catalog'] == "yes")){
2684
  $product_data['exclude_from_all'] = "yes";
2996
  /**
2997
  * When a product is a variable product we need to delete the original product from the feed, only the originals are allowed
2998
  */
2999
+
3000
+ // For these channels parent products are allowed
3001
+ $allowed_channel_parents = array(
3002
+ "skroutz",
3003
+ "google_dsa",
3004
+ );
3005
+
3006
+ if (!in_array($project_config['fields'], $allowed_channel_parents)){
3007
+ if(($product->is_type('variable')) AND ($product_data['item_group_id'] == 0)){
3008
+ $product_data = array();
3009
+ $product_data = null;
3010
+ }
3011
+ }
3012
 
3013
  /**
3014
  * Remove variation products that are not THE default variation product
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=7.4.7',
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=7.4.8',
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.3
8
- Stable tag: 7.4.7
9
 
10
  == Description ==
11
 
@@ -312,6 +312,9 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
312
 
313
  === Changelog ===
314
 
 
 
 
315
  = 7.4.7 (2020-02-19) =
316
  * Fixed a bug where the suffix currency configuration for shipping costs was ignored. This issue has been fixed now.
317
 
@@ -2373,6 +2376,9 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
2373
 
2374
  == Upgrade Notice ==
2375
 
 
 
 
2376
  = 7.4.7 =
2377
  Fixed a bug where the suffix currency configuration for shipping costs was ignored. This issue has been fixed now.
2378
 
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.3
8
+ Stable tag: 7.4.8
9
 
10
  == Description ==
11
 
312
 
313
  === Changelog ===
314
 
315
+ = 7.4.8 (2020-02-20) =
316
+ * For Google DSA and Skroutz feeds the parent variable products are added to the feed too.
317
+
318
  = 7.4.7 (2020-02-19) =
319
  * Fixed a bug where the suffix currency configuration for shipping costs was ignored. This issue has been fixed now.
320
 
2376
 
2377
  == Upgrade Notice ==
2378
 
2379
+ = 7.4.8 =
2380
+ For Google DSA and Skroutz feeds the parent variable products are added to the feed too.
2381
+
2382
  = 7.4.7 =
2383
  Fixed a bug where the suffix currency configuration for shipping costs was ignored. This issue has been fixed now.
2384
 
woocommerce-sea.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Plugin Name: Product Feed PRO for WooCommerce
4
- * Version: 7.4.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
@@ -48,7 +48,7 @@ if (!defined('ABSPATH')) {
48
  * Plugin versionnumber, please do not override.
49
  * Define some constants
50
  */
51
- define( 'WOOCOMMERCESEA_PLUGIN_VERSION', '7.4.7' );
52
  define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
53
  define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
54
 
@@ -854,7 +854,7 @@ function woosea_request_review(){
854
  // if (preg_match("/woo-product-feed-pro|woosea_manage_feed|woosea_manage_settings/i",$page)){
855
 
856
  if(($nr_projects > 0) AND ($is_active > $show_after) AND ($notification_interaction != "yes")){
857
- echo '<div class="notice notice-info review-notification is-dismissible">';
858
  echo '<table><tr><td></td><td><font color="green" style="font-weight:normal";><p>Hey, I noticed you have been using our plugin, <u>Product Feed PRO for WooCommerce by AdTribes.io</u>, for over a week now and have created product feed projects with it - that\'s awesome! Could you please do Eva and me a BIG favor and give it a 5-star rating on WordPress? Just to help us spread the word and boost our motivation. We would greatly appreciate if you would do so :)<br/>~ Adtribes.io support team<br><ul><li><span class="ui-icon ui-icon-caret-1-e" style="display: inline-block;"></span><a href="https://wordpress.org/support/plugin/woo-product-feed-pro/reviews?rate=5#new-post" target="_blank" class="dismiss-review-notification">Ok, you deserve it</a></li><li><span class="ui-icon ui-icon-caret-1-e" style="display: inline-block;"></span><a href="#" class="dismiss-review-notification">Nope, maybe later</a></li><li><span class="ui-icon ui-icon-caret-1-e" style="display: inline-block;"></span><a href="#" class="dismiss-review-notification">I already did</a></li></ul></p></font></td></tr></table>';
859
  echo '</div>';
860
  }
@@ -3833,7 +3833,7 @@ function woosea_license_valid(){
3833
 
3834
  if(!empty($license_information['license_key'])){
3835
  $curl = curl_init();
3836
- $url = "https://www.adtribes.io/check/license.php?key=$license_information[license_key]&email=$license_information[license_email]&domain=$domain&version=7.4.7";
3837
 
3838
  curl_setopt_array($curl, array(
3839
  CURLOPT_RETURNTRANSFER => 1,
1
  <?php
2
  /**
3
  * Plugin Name: Product Feed PRO for WooCommerce
4
+ * Version: 7.4.8
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', '7.4.8' );
52
  define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
53
  define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
54
 
854
  // if (preg_match("/woo-product-feed-pro|woosea_manage_feed|woosea_manage_settings/i",$page)){
855
 
856
  if(($nr_projects > 0) AND ($is_active > $show_after) AND ($notification_interaction != "yes")){
857
+ echo '<div class="notice notice-info review-notification">';
858
  echo '<table><tr><td></td><td><font color="green" style="font-weight:normal";><p>Hey, I noticed you have been using our plugin, <u>Product Feed PRO for WooCommerce by AdTribes.io</u>, for over a week now and have created product feed projects with it - that\'s awesome! Could you please do Eva and me a BIG favor and give it a 5-star rating on WordPress? Just to help us spread the word and boost our motivation. We would greatly appreciate if you would do so :)<br/>~ Adtribes.io support team<br><ul><li><span class="ui-icon ui-icon-caret-1-e" style="display: inline-block;"></span><a href="https://wordpress.org/support/plugin/woo-product-feed-pro/reviews?rate=5#new-post" target="_blank" class="dismiss-review-notification">Ok, you deserve it</a></li><li><span class="ui-icon ui-icon-caret-1-e" style="display: inline-block;"></span><a href="#" class="dismiss-review-notification">Nope, maybe later</a></li><li><span class="ui-icon ui-icon-caret-1-e" style="display: inline-block;"></span><a href="#" class="dismiss-review-notification">I already did</a></li></ul></p></font></td></tr></table>';
859
  echo '</div>';
860
  }
3833
 
3834
  if(!empty($license_information['license_key'])){
3835
  $curl = curl_init();
3836
+ $url = "https://www.adtribes.io/check/license.php?key=$license_information[license_key]&email=$license_information[license_email]&domain=$domain&version=7.4.8";
3837
 
3838
  curl_setopt_array($curl, array(
3839
  CURLOPT_RETURNTRANSFER => 1,