Product Feed PRO for WooCommerce - Version 9.5.1

Version Description

Dynamic attributes without values that are used for product details should be skipped which not always happened. This is fixed now.

Download this release

Release Info

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

Code changes from version 9.3.7 to 9.5.1

TODO.txt CHANGED
@@ -12,11 +12,9 @@ Priority issues:
12
  - Add support for Multisites
13
  - Add a filter on review score (and amount of reviews)
14
  - Make extra woosea fields available for front-end usage
15
- - Only update feed when changes to products have been made
16
  - Add header to extra fields on product edit pages
17
  - Add possibility to create OR rules
18
  - Add support for Google My Business product feeds
19
- - Build a better WP Cron check, current one is not good enough
20
  - AMAZON integration:
21
  - requires a professional seller account, 39 dollar a month, before being able to create a developer account
22
  - only than we can use their MWS service needed to connect our plugin
12
  - Add support for Multisites
13
  - Add a filter on review score (and amount of reviews)
14
  - Make extra woosea fields available for front-end usage
 
15
  - Add header to extra fields on product edit pages
16
  - Add possibility to create OR rules
17
  - Add support for Google My Business product feeds
 
18
  - AMAZON integration:
19
  - requires a professional seller account, 39 dollar a month, before being able to create a developer account
20
  - only than we can use their MWS service needed to connect our plugin
classes/channels/class-google_shopping.php CHANGED
@@ -356,6 +356,11 @@ class WooSEA_google_shopping {
356
  "feed_name" => "g:max_handling_time",
357
  "format" => "optional",
358
  ),
 
 
 
 
 
359
  ),
360
  "Tax" => array(
361
  "Tax" => array(
356
  "feed_name" => "g:max_handling_time",
357
  "format" => "optional",
358
  ),
359
+ "Ships from country" => array(
360
+ "name" => "ships_from_country",
361
+ "feed_name" => "g:ships_from_country",
362
+ "format" => "optional",
363
+ ),
364
  ),
365
  "Tax" => array(
366
  "Tax" => array(
classes/class-activate.php CHANGED
@@ -1112,6 +1112,13 @@ class WooSEA_Activation {
1112
  "taxonomy" => "none",
1113
  "utm_source" => "Tweakers.nl",
1114
  "type" => "Comparison shopping engine" ),
 
 
 
 
 
 
 
1115
  "Fashionchick.nl" => array (
1116
  "channel_hash" => md5("Fashionchick.nl"),
1117
  "name" => "Fashionchick.nl",
1112
  "taxonomy" => "none",
1113
  "utm_source" => "Tweakers.nl",
1114
  "type" => "Comparison shopping engine" ),
1115
+ "Boetiek.nl" => array (
1116
+ "channel_hash" => md5("Boetiek.nl"),
1117
+ "name" => "Boetiek.nl",
1118
+ "fields" => "boetiek",
1119
+ "taxonomy" => "none",
1120
+ "utm_source" => "Boetiek.nl",
1121
+ "type" => "Comparison shopping engine" ),
1122
  "Fashionchick.nl" => array (
1123
  "channel_hash" => md5("Fashionchick.nl"),
1124
  "name" => "Fashionchick.nl",
classes/class-attributes.php CHANGED
@@ -48,7 +48,7 @@ private function get_dynamic_attributes(){
48
  global $wpdb;
49
  $list = array();
50
 
51
- $no_taxonomies = array("portfolio_category","portfolio_skills","portfolio_tags","nav_menu","post_format","slide-page","element_category","template_category","portfolio_category","portfolio_skills","portfolio_tags","faq_category","slide-page","yst_prominent_words","category","post_tag","nav_menu","link_category","post_format","product_type","product_visibility","product_cat","product_shipping_class","product_tag");
52
  $taxonomies = get_taxonomies();
53
  $diff_taxonomies = array_diff($taxonomies, $no_taxonomies);
54
 
@@ -212,6 +212,8 @@ public function get_mapping_attributes_dropdown() {
212
  "short_description" => "Product short description",
213
  "raw_description" => "Unfiltered product description",
214
  "raw_short_description" => "Unfiltered product short description",
 
 
215
  "price" => "Price",
216
  "regular_price" => "Regular price",
217
  "sale_price" => "Sale price",
@@ -406,7 +408,9 @@ public function get_mapping_attributes_dropdown() {
406
  "short_description" => "Product short description",
407
  "raw_description" => "Unfiltered product description",
408
  "raw_short_description" => "Unfiltered product short description",
409
- "link" => "Link",
 
 
410
  "variable_link" => "Product variable link",
411
  "add_to_cart_link" => "Add to cart link",
412
  "image" => "Main image",
48
  global $wpdb;
49
  $list = array();
50
 
51
+ $no_taxonomies = array("portfolio_category","portfolio_skills","portfolio_tags","nav_menu","post_format","slide-page","element_category","template_category","portfolio_category","portfolio_skills","portfolio_tags","faq_category","slide-page","category","post_tag","nav_menu","link_category","post_format","product_type","product_visibility","product_cat","product_shipping_class","product_tag");
52
  $taxonomies = get_taxonomies();
53
  $diff_taxonomies = array_diff($taxonomies, $no_taxonomies);
54
 
212
  "short_description" => "Product short description",
213
  "raw_description" => "Unfiltered product description",
214
  "raw_short_description" => "Unfiltered product short description",
215
+ "mother_description" => "Product description parent product",
216
+ "mother_short_description" => "Product short description parent product",
217
  "price" => "Price",
218
  "regular_price" => "Regular price",
219
  "sale_price" => "Sale price",
408
  "short_description" => "Product short description",
409
  "raw_description" => "Unfiltered product description",
410
  "raw_short_description" => "Unfiltered product short description",
411
+ "mother_description" => "Product description parent product",
412
+ "mother_short_description" => "Product short description parent product",
413
+ "link" => "Link",
414
  "variable_link" => "Product variable link",
415
  "add_to_cart_link" => "Add to cart link",
416
  "image" => "Main image",
classes/class-get-products.php CHANGED
@@ -26,7 +26,6 @@ class WooSEA_Get_Products {
26
  return "<![CDATA[ $string ]]>";
27
  }
28
 
29
-
30
  /**
31
  * Check if a plugin is active
32
  */
@@ -57,6 +56,11 @@ class WooSEA_Get_Products {
57
  * Get all approved product review comments for Google's Product Review Feeds
58
  */
59
  public function woosea_get_reviews ( $product_data, $product ) {
 
 
 
 
 
60
  $approved_reviews = array();
61
  $prod_id = $product_data['id'];
62
 
@@ -84,8 +88,10 @@ class WooSEA_Get_Products {
84
  $cnt = 0;
85
  $name = "";
86
  foreach($name_pieces as $n_piece){
 
 
87
  if($cnt > 0){
88
- $n_piece = substr($n_piece, 0, 1);
89
  }
90
  $name .= $n_piece." ";
91
  $cnt++;
@@ -96,7 +102,7 @@ class WooSEA_Get_Products {
96
  $review['reviewer_name'] = html_entity_decode((str_replace("\r", "", $review['reviewer_name'])), ENT_QUOTES | ENT_XML1, 'UTF-8');
97
  $review['reviewer_name'] = preg_replace( '/\[(.*?)\]/', ' ', $review['reviewer_name'] );
98
  $review['reviewer_name'] = str_replace("&#xa0;", "", $review['reviewer_name']);
99
- $review['reviewer_name'] = $this->woosea_utf8_for_xml( $review['reviewer_name'] );
100
 
101
  $review['reviewer_id'] = $review_raw->user_id;
102
  $review['review_timestamp'] = $review_raw->comment_date;
@@ -1145,16 +1151,19 @@ class WooSEA_Get_Products {
1145
  } elseif (preg_match("/g:product_detail/i",$k)){
1146
  if(!empty($v)){
1147
  $product_detail_split = explode("#", $v);
1148
- $product_detail = $product->addChild('g:product_detail', '', $namespace['g']);
1149
- $name = str_replace("_", " ", $product_detail_split[0]);
1150
-
1151
- $section_name = explode(":", $name);
1152
- $section_name_start = ucfirst($section_name[0]);
1153
- $name = ucfirst(trim($section_name[1]));
1154
-
1155
- $section_name = $product_detail->addChild('g:section_name', "General", $namespace['g']);
1156
- $product_detail_name = $product_detail->addChild('g:attribute_name', $section_name_start, $namespace['g']);
1157
- $product_detail_value = $product_detail->addChild('g:attribute_value', $product_detail_split[1], $namespace['g']);
 
 
 
1158
  }
1159
  } elseif ($k == "g:installment"){
1160
  if(!empty($v)){
@@ -1993,7 +2002,7 @@ class WooSEA_Get_Products {
1993
  $xml_piece = "";
1994
 
1995
  // Get taxonomies
1996
- $no_taxonomies = array("element_category","template_category","portfolio_category","portfolio_skills","portfolio_tags","faq_category","slide-page","yst_prominent_words","category","post_tag","nav_menu","link_category","post_format","product_type","product_visibility","product_cat","product_shipping_class","product_tag");
1997
  $taxonomies = get_taxonomies();
1998
  $diff_taxonomies = array_diff($taxonomies, $no_taxonomies);
1999
 
@@ -2325,6 +2334,10 @@ class WooSEA_Get_Products {
2325
  $product_data['raw_description'] = substr($product_data['raw_description'], 0, 5000);
2326
  $product_data['raw_short_description'] = substr($product_data['raw_short_description'], 0, 5000);
2327
 
 
 
 
 
2328
  /**
2329
  * Check of we need to add Google Analytics UTM parameters
2330
  */
@@ -2485,6 +2498,7 @@ class WooSEA_Get_Products {
2485
  if($product->get_type() == "bundle"){
2486
  if ($this->woosea_is_plugin_active('woocommerce-product-bundles/woocommerce-product-bundles.php')){
2487
  $product_data['price'] = get_post_meta($product_data['id'], '_price', true);
 
2488
  if(is_numeric($tax_rates[1]['rate'])){
2489
  $product_data['price_forced'] = round(get_post_meta($product_data['id'], '_price', true) * (100+$tax_rates[1]['rate'])/100,2);
2490
  $product_data['regular_price'] = round(get_post_meta($product_data['id'], '_regular_price', true) * (100+$tax_rates[1]['rate'])/100,2);
@@ -2582,6 +2596,7 @@ class WooSEA_Get_Products {
2582
  $discount = apply_filters('advanced_woo_discount_rules_get_product_discount_price_from_custom_price', false, $product, 1, $product_data['sale_price'], 'discounted_price', true, true);
2583
  if($discount !== false){
2584
  $product_data['sale_price'] = $discount;
 
2585
  $price_incl_tax = get_option( 'woocommerce_prices_include_tax' );
2586
  if($price_incl_tax == "yes"){
2587
  $product_data['price_forced'] = $product_data['price']*($fullrate/100);
@@ -2742,7 +2757,7 @@ class WooSEA_Get_Products {
2742
  }
2743
  }
2744
 
2745
- if ((array_key_exists('shipping', $project_config['attributes'])) OR (array_key_exists('shipping_price', $project_config['attributes'])) OR ($project_config['fields'] == "trovaprezzi")){
2746
  $product_data['shipping'] = $this->woosea_get_shipping_cost($class_cost_id, $project_config, $product_data['price'], $tax_rates, $shipping_zones, $product_data['id'], $product_data['item_group_id']);
2747
  $shipping_str = $product_data['shipping'];
2748
  }
@@ -3028,9 +3043,9 @@ class WooSEA_Get_Products {
3028
  $product_variations = new WC_Product_Variation( $product_data['id'] );
3029
  $variations = $product_variations->get_variation_attributes();
3030
 
3031
- // For Skroutz apparal products we can only append colours to the product name
3032
  // When a product has both a size and color attribute we assume its an apparal product
3033
- if($project_config['fields'] == "skroutz"){
3034
  $size_found = "no";
3035
  $color_found = "no";
3036
 
@@ -3448,6 +3463,17 @@ class WooSEA_Get_Products {
3448
  */
3449
  $product_data['reviews'] = $this->woosea_get_reviews( $product_data, $product );
3450
 
 
 
 
 
 
 
 
 
 
 
 
3451
  /**
3452
  * Check if individual products need to be excluded
3453
  */
@@ -3513,6 +3539,7 @@ class WooSEA_Get_Products {
3513
  // For these channels parent products are allowed
3514
  $allowed_channel_parents = array(
3515
  "skroutz",
 
3516
  "google_dsa",
3517
  "google_product_review",
3518
  );
@@ -4926,7 +4953,6 @@ class WooSEA_Get_Products {
4926
 
4927
  foreach ($product_data as $pd_key => $pd_value){
4928
  // Check is there is a rule on specific attributes
4929
-
4930
  if(in_array($pd_key, $pr_array, TRUE)){
4931
 
4932
  if($pd_key == "price"){
@@ -5026,11 +5052,10 @@ class WooSEA_Get_Products {
5026
  $in_tag_array = "yes";
5027
  }
5028
  }
5029
-
5030
  if($in_tag_array == "yes"){
5031
  //if(in_array($pr_array['criteria'], $pd_value, TRUE)) {
5032
  $v = $pr_array['criteria'];
5033
-
5034
  switch ($pr_array['condition']) {
5035
  case($pr_array['condition'] = "contains"):
5036
  if ((preg_match('/'.$pr_array['criteria'].'/', $v))){
@@ -5132,8 +5157,12 @@ class WooSEA_Get_Products {
5132
  if($allowed <> 0){
5133
  $allowed = 1;
5134
  }
5135
- } else {
5136
- $allowed = 0;
 
 
 
 
5137
  }
5138
  }
5139
  break;
26
  return "<![CDATA[ $string ]]>";
27
  }
28
 
 
29
  /**
30
  * Check if a plugin is active
31
  */
56
  * Get all approved product review comments for Google's Product Review Feeds
57
  */
58
  public function woosea_get_reviews ( $product_data, $product ) {
59
+ // Rwviews for the parent variable product itself can be skipped, the review is added for the variation
60
+ if($product_data['product_type'] == "variable"){
61
+ return;
62
+ }
63
+
64
  $approved_reviews = array();
65
  $prod_id = $product_data['id'];
66
 
88
  $cnt = 0;
89
  $name = "";
90
  foreach($name_pieces as $n_piece){
91
+ $n_piece = str_replace("&amp;", "", $n_piece);
92
+
93
  if($cnt > 0){
94
+ $n_piece = ucfirst(substr($n_piece, 0, 1));
95
  }
96
  $name .= $n_piece." ";
97
  $cnt++;
102
  $review['reviewer_name'] = html_entity_decode((str_replace("\r", "", $review['reviewer_name'])), ENT_QUOTES | ENT_XML1, 'UTF-8');
103
  $review['reviewer_name'] = preg_replace( '/\[(.*?)\]/', ' ', $review['reviewer_name'] );
104
  $review['reviewer_name'] = str_replace("&#xa0;", "", $review['reviewer_name']);
105
+ $review['reviewer_name'] = $this->woosea_utf8_for_xml( $review['reviewer_name'] );
106
 
107
  $review['reviewer_id'] = $review_raw->user_id;
108
  $review['review_timestamp'] = $review_raw->comment_date;
1151
  } elseif (preg_match("/g:product_detail/i",$k)){
1152
  if(!empty($v)){
1153
  $product_detail_split = explode("#", $v);
1154
+ $detail_complete = count($product_detail_split);
1155
+ if($detail_complete == 2){
1156
+ $product_detail = $product->addChild('g:product_detail', '', $namespace['g']);
1157
+ $name = str_replace("_", " ", $product_detail_split[0]);
1158
+
1159
+ $section_name = explode(":", $name);
1160
+ $section_name_start = ucfirst($section_name[0]);
1161
+ $name = ucfirst(trim($section_name[1]));
1162
+
1163
+ $section_name = $product_detail->addChild('g:section_name', "General", $namespace['g']);
1164
+ $product_detail_name = $product_detail->addChild('g:attribute_name', $section_name_start, $namespace['g']);
1165
+ $product_detail_value = $product_detail->addChild('g:attribute_value', $product_detail_split[1], $namespace['g']);
1166
+ }
1167
  }
1168
  } elseif ($k == "g:installment"){
1169
  if(!empty($v)){
2002
  $xml_piece = "";
2003
 
2004
  // Get taxonomies
2005
+ $no_taxonomies = array("element_category","template_category","portfolio_category","portfolio_skills","portfolio_tags","faq_category","slide-page","category","post_tag","nav_menu","link_category","post_format","product_type","product_visibility","product_cat","product_shipping_class","product_tag");
2006
  $taxonomies = get_taxonomies();
2007
  $diff_taxonomies = array_diff($taxonomies, $no_taxonomies);
2008
 
2334
  $product_data['raw_description'] = substr($product_data['raw_description'], 0, 5000);
2335
  $product_data['raw_short_description'] = substr($product_data['raw_short_description'], 0, 5000);
2336
 
2337
+ // Parent variable description
2338
+ $product_data['mother_description'] = $product_data['description'];
2339
+ $product_data['mother_short_description'] = $product_data['short_description'];
2340
+
2341
  /**
2342
  * Check of we need to add Google Analytics UTM parameters
2343
  */
2498
  if($product->get_type() == "bundle"){
2499
  if ($this->woosea_is_plugin_active('woocommerce-product-bundles/woocommerce-product-bundles.php')){
2500
  $product_data['price'] = get_post_meta($product_data['id'], '_price', true);
2501
+ $product_data['sale_price'] = get_post_meta($product_data['id'], '_sale_price', true);
2502
  if(is_numeric($tax_rates[1]['rate'])){
2503
  $product_data['price_forced'] = round(get_post_meta($product_data['id'], '_price', true) * (100+$tax_rates[1]['rate'])/100,2);
2504
  $product_data['regular_price'] = round(get_post_meta($product_data['id'], '_regular_price', true) * (100+$tax_rates[1]['rate'])/100,2);
2596
  $discount = apply_filters('advanced_woo_discount_rules_get_product_discount_price_from_custom_price', false, $product, 1, $product_data['sale_price'], 'discounted_price', true, true);
2597
  if($discount !== false){
2598
  $product_data['sale_price'] = $discount;
2599
+ $product_data['price'] = $discount;
2600
  $price_incl_tax = get_option( 'woocommerce_prices_include_tax' );
2601
  if($price_incl_tax == "yes"){
2602
  $product_data['price_forced'] = $product_data['price']*($fullrate/100);
2757
  }
2758
  }
2759
 
2760
+ if ((array_key_exists('shipping', $project_config['attributes'])) OR (array_key_exists('shipping_price', $project_config['attributes'])) OR ($project_config['fields'] == "trovaprezzi") OR ($project_config['fields'] == "customfeed")){
2761
  $product_data['shipping'] = $this->woosea_get_shipping_cost($class_cost_id, $project_config, $product_data['price'], $tax_rates, $shipping_zones, $product_data['id'], $product_data['item_group_id']);
2762
  $shipping_str = $product_data['shipping'];
2763
  }
3043
  $product_variations = new WC_Product_Variation( $product_data['id'] );
3044
  $variations = $product_variations->get_variation_attributes();
3045
 
3046
+ // For Skroutz and Bestprice apparal products we can only append colours to the product name
3047
  // When a product has both a size and color attribute we assume its an apparal product
3048
+ if(($project_config['fields'] == "skroutz") OR ($project_config['fields'] == "bestprice")){
3049
  $size_found = "no";
3050
  $color_found = "no";
3051
 
3463
  */
3464
  $product_data['reviews'] = $this->woosea_get_reviews( $product_data, $product );
3465
 
3466
+ /**
3467
+ * Filter out reviews that do not have text
3468
+ */
3469
+ if(!empty($product_data['reviews'])){
3470
+ foreach($product_data['reviews'] as $review_id => $review_details){
3471
+ if(empty($review_details['content'])){
3472
+ unset($product_data['reviews'][$review_id]);
3473
+ }
3474
+ }
3475
+ }
3476
+
3477
  /**
3478
  * Check if individual products need to be excluded
3479
  */
3539
  // For these channels parent products are allowed
3540
  $allowed_channel_parents = array(
3541
  "skroutz",
3542
+ "bestprice",
3543
  "google_dsa",
3544
  "google_product_review",
3545
  );
4953
 
4954
  foreach ($product_data as $pd_key => $pd_value){
4955
  // Check is there is a rule on specific attributes
 
4956
  if(in_array($pd_key, $pr_array, TRUE)){
4957
 
4958
  if($pd_key == "price"){
5052
  $in_tag_array = "yes";
5053
  }
5054
  }
5055
+
5056
  if($in_tag_array == "yes"){
5057
  //if(in_array($pr_array['criteria'], $pd_value, TRUE)) {
5058
  $v = $pr_array['criteria'];
 
5059
  switch ($pr_array['condition']) {
5060
  case($pr_array['condition'] = "contains"):
5061
  if ((preg_match('/'.$pr_array['criteria'].'/', $v))){
5157
  if($allowed <> 0){
5158
  $allowed = 1;
5159
  }
5160
+ } else {
5161
+ if(!empty($pt_value)){
5162
+ $allowed = 1;
5163
+ } else {
5164
+ $allowed = 0;
5165
+ }
5166
  }
5167
  }
5168
  break;
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.3.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=9.5.1',
31
  jsonp: 'callback',
32
  dataType: 'jsonp',
33
  type: 'GET',
pages/admin/woosea-manage-feed.php CHANGED
@@ -67,6 +67,7 @@ if(!empty($license_information)){
67
  if (!wp_next_scheduled( 'woosea_cron_hook' ) ) {
68
  $notifications_box = $notifications_obj->get_admin_notifications ( '12', 'false' );
69
  }
 
70
  ?>
71
  <div class="wrap">
72
  <div class="woo-product-feed-pro-form-style-2">
@@ -124,6 +125,18 @@ if (!wp_next_scheduled( 'woosea_cron_hook' ) ) {
124
  <?php
125
  }
126
  }
 
 
 
 
 
 
 
 
 
 
 
 
127
  ?>
128
 
129
  <div class="woo-product-feed-pro-form-style-2-heading"><?php _e( 'Manage feeds','woo-product-feed-pro' );?></div>
67
  if (!wp_next_scheduled( 'woosea_cron_hook' ) ) {
68
  $notifications_box = $notifications_obj->get_admin_notifications ( '12', 'false' );
69
  }
70
+
71
  ?>
72
  <div class="wrap">
73
  <div class="woo-product-feed-pro-form-style-2">
125
  <?php
126
  }
127
  }
128
+
129
+
130
+ if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) {
131
+ ?>
132
+ <div class="notice notice-error is-dismissible">
133
+ <p>
134
+ <strong><?php _e( 'WARNING: Your WP-Cron is disabled', 'woo-product-feed-pro' );?></strong><br/></br/>
135
+ We detected that your WP-cron has been disabled in your wp-config.php file. Our plugin heavily depends on the WP-cron being active otherwise it cannot update and generate your product feeds. <a href="https://adtribes.io/help-my-feed-processing-is-stuck/?utm_source=<?php print"$host";?>&utm_medium=manage-feed&utm_campaign=cron-warning&utm_content=notification" target="_blank"><strong>Please enable your WP-cron first</strong></a>.
136
+ </p>
137
+ </div>
138
+ <?php
139
+ }
140
  ?>
141
 
142
  <div class="woo-product-feed-pro-form-style-2-heading"><?php _e( 'Manage feeds','woo-product-feed-pro' );?></div>
pages/admin/woosea-manage-settings.php CHANGED
@@ -101,6 +101,20 @@ if(isset($_GET["tab"])) {
101
  ?>
102
  </span>
103
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
 
105
  <!-- wordpress provides the styling for tabs. -->
106
  <h2 class="nav-tab-wrapper">
@@ -515,6 +529,10 @@ if(isset($_GET["tab"])) {
515
  $cron_enabled = "True";
516
  }
517
 
 
 
 
 
518
  print "<table class=\"woo-product-feed-pro-table\">";
519
  print "<tr><td><strong>System check</strong></td><td><strong>Status</strong></td></tr>";
520
  print "<tr><td>WP-Cron enabled</td><td>$cron_enabled</td></tr>";
101
  ?>
102
  </span>
103
  </div>
104
+
105
+ <?php
106
+ if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) {
107
+ ?>
108
+ <div class="notice notice-error is-dismissible">
109
+ <p>
110
+ <strong><?php _e( 'WARNING: Your WP-Cron is disabled', 'woo-product-feed-pro' );?></strong><br/></br/>
111
+ We detected that your WP-cron has been disabled in your wp-config.php file. Our plugin heavily depends on the WP-cron being active for it to be able to update and generate your product feeds. More information on the inner workings of our plugin and instructions on how to enable your WP-Cron can be found here: <a href="https://adtribes.io/help-my-feed-processing-is-stuck/?utm_source=<?php print"$host";?>&utm_medium=manage-feed&utm_campaign=cron-warning&utm_content=notification" target="_blank"><strong>My feed won't update or is stuck processing</strong></a>.
112
+ </p>
113
+ </div>
114
+ <?php
115
+ }
116
+ ?>
117
+
118
 
119
  <!-- wordpress provides the styling for tabs. -->
120
  <h2 class="nav-tab-wrapper">
529
  $cron_enabled = "True";
530
  }
531
 
532
+ if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) {
533
+ $cron_enabled = "<strong>False</strong>";
534
+ }
535
+
536
  print "<table class=\"woo-product-feed-pro-table\">";
537
  print "<tr><td><strong>System check</strong></td><td><strong>Status</strong></td></tr>";
538
  print "<tr><td>WP-Cron enabled</td><td>$cron_enabled</td></tr>";
readme.txt CHANGED
@@ -5,11 +5,11 @@ 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.6
8
- Stable tag: 9.3.7
9
 
10
  == Description ==
11
 
12
- Generate WooCommerce product feeds for all your marketing channels, such as Google Shopping (merchant center), Facebook Remarketing, Bing Ads, Billiger.de, Pricerunner, Vergelijk.nl and many more. Next to custom feeds there are over 100 pre-defined templates included for marketplaces, comparison shopping engines and search engines. This plugin provides high-quality product feed for Google Shopping and many many more.
13
 
14
  = Why choose this plugin? =
15
  Simply because this is the most complete plugin offering support for an unlimited number of products and feeds, including features such as category- & field-mapping and advanced, rule-based, filtering and product variables support.
@@ -175,6 +175,7 @@ Some of the above mentioned feature can only be used by users who upgraded to th
175
  * <a href="https://www.beslist.nl" target="_blank" rel="nofollow">Beslist.nl</a>
176
  * <a href="https://www.beslist.be" target="_blank" rel="nofollow">Beslist.be</a>
177
  * <a href="https://www.fashionchick.nl" target="_blank">Fashionchick.nl</a>
 
178
  * Bol.com
179
  * Stylight
180
  * Incurvy
@@ -322,6 +323,50 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
322
 
323
  === Changelog ===
324
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
325
  = 9.3.7 (2021-01-12) =
326
  * Added the Bestprice.gr template
327
 
@@ -2988,6 +3033,50 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
2988
 
2989
  == Upgrade Notice ==
2990
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2991
  = 9.3.7 =
2992
  Added the Bestprice.gr template
2993
 
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.6
8
+ Stable tag: 9.5.1
9
 
10
  == Description ==
11
 
12
+ Generate WooCommerce product feeds for all your marketing channels, such as Google Shopping (merchant center), Facebook Remarketing, Bing Ads, Billiger.de, Pricerunner, Skroutz and many more. Next to custom feeds there are over 100 pre-defined templates included for marketplaces, comparison shopping engines and search engines. This plugin provides high-quality product feed for Google Shopping and many many more.
13
 
14
  = Why choose this plugin? =
15
  Simply because this is the most complete plugin offering support for an unlimited number of products and feeds, including features such as category- & field-mapping and advanced, rule-based, filtering and product variables support.
175
  * <a href="https://www.beslist.nl" target="_blank" rel="nofollow">Beslist.nl</a>
176
  * <a href="https://www.beslist.be" target="_blank" rel="nofollow">Beslist.be</a>
177
  * <a href="https://www.fashionchick.nl" target="_blank">Fashionchick.nl</a>
178
+ * <a href="https://www.boetiek.nl" target="_blank">Boetiek.nl</a>
179
  * Bol.com
180
  * Stylight
181
  * Incurvy
323
 
324
  === Changelog ===
325
 
326
+ = 9.5.1 (2021-02-02) =
327
+ * Dynamic attributes without values that are used for product details should be skipped which not always happened. This is fixed now.
328
+
329
+ = 9.5.0 (2021-02-01) =
330
+ * Discount rules created with the FlyCart plugin did not make it to Skroutz feeds. This has been solved now
331
+
332
+ = 9.4.9 (2021-01-31) =
333
+ * Added a seperate sale price attribute for bundled products
334
+ * Reviews for parent variable products are removed, the reviews are attached to its variations
335
+
336
+ = 9.4.8 (2021-01-30) =
337
+ * Fixed an issue with the ecomm_prodid on the cart page
338
+
339
+ = 9.4.7 (2021-01-29) =
340
+ * Solved an issue that shipping costs to the first product in a custom feed where empty
341
+
342
+ = 9.4.6 (2021-01-28) =
343
+ * Added a new attribute: product description parent product
344
+
345
+ = 9.4.5 (2021-01-28) =
346
+ * Added a Google Shopping field to their template: g:ship_from_country
347
+ * Stripping & characters from review names as it breaks the review feeds
348
+
349
+ = 9.4.4 (2021-01-27) =
350
+ * Fixed an issue where reviews without review text caused the feed to be disapproved by Google. We now remove reviews from feeds that have no review texts.
351
+
352
+ = 9.4.3 (2021-01-27) =
353
+ * Fixed an issue with an undefined ecomm_price variable on product variable pages
354
+
355
+ = 9.4.2 (2021-01-26) =
356
+ * Added the Dutch Boetiek.nl template
357
+
358
+ = 9.4.1 (2021-01-19) =
359
+ * Fixed a bug: exclude filters on empty product tags were broken. This is fixed now.
360
+
361
+ = 9.4.0 (2021-01-14) =
362
+ * Added a WP-cron check and notifications
363
+
364
+ = 9.3.9 (2021-01-14) =
365
+ * Bestprice.gr apparel products are now grouped by color
366
+
367
+ = 9.3.8 (2021-01-13) =
368
+ * Tested for compatibility with WooCommerce 4.9
369
+
370
  = 9.3.7 (2021-01-12) =
371
  * Added the Bestprice.gr template
372
 
3033
 
3034
  == Upgrade Notice ==
3035
 
3036
+ = 9.5.1 =
3037
+ Dynamic attributes without values that are used for product details should be skipped which not always happened. This is fixed now.
3038
+
3039
+ = 9.5.0 =
3040
+ Discount rules created with the FlyCart plugin did not make it to Skroutz feeds. This has been solved now
3041
+
3042
+ = 9.4.9 =
3043
+ Added a seperate sale price attribute for bundled products
3044
+ Reviews for parent variable products are removed, the reviews are attached to its variations
3045
+
3046
+ = 9.4.8 =
3047
+ Fixed an issue with the ecomm_prodid on the cart page
3048
+
3049
+ = 9.4.7 =
3050
+ Solved an issue that shipping costs to the first product in a custom feed where empty
3051
+
3052
+ = 9.4.6 =
3053
+ Added a new attribute: product description parent product
3054
+
3055
+ = 9.4.5 =
3056
+ Added a Google Shopping field to their template: g:ship_from_country
3057
+ Stripping & characters from review names as it breaks the review feeds
3058
+
3059
+ = 9.4.4 =
3060
+ Fixed an issue where reviews without review text caused the feed to be disapproved by Google. We now remove reviews from feeds that have no review texts.
3061
+
3062
+ = 9.4.3 =
3063
+ Fixed an issue with an undefined ecomm_price variable on product variable pages
3064
+
3065
+ = 9.4.2 =
3066
+ Added the Dutch Boetiek.nl template
3067
+
3068
+ = 9.4.1 =
3069
+ Fixed a bug: exclude filters on empty product tags were broken. This is fixed now.
3070
+
3071
+ = 9.4.0 =
3072
+ Added a WP-cron check and notifications
3073
+
3074
+ = 9.3.9 =
3075
+ Bestprice.gr apparel products are now grouped by color
3076
+
3077
+ = 9.3.8 =
3078
+ Tested for compatibility with WooCommerce 4.9
3079
+
3080
  = 9.3.7 =
3081
  Added the Bestprice.gr template
3082
 
woocommerce-sea.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Plugin Name: Product Feed PRO for WooCommerce
4
- * Version: 9.3.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,7 +17,7 @@
17
  * Domain Path: /languages
18
  *
19
  * WC requires at least: 4.4
20
- * WC tested up to: 4.8
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
@@ -48,7 +48,7 @@ if (!defined('ABSPATH')) {
48
  * Plugin versionnumber, please do not override.
49
  * Define some constants
50
  */
51
- define( 'WOOCOMMERCESEA_PLUGIN_VERSION', '9.3.7' );
52
  define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
53
  define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
54
 
@@ -347,7 +347,6 @@ function woosea_add_facebook_pixel( $product = null ){
347
  $cats = str_replace("&amp;","&", $cats);
348
 
349
  if(!empty($fb_prodid)){
350
-
351
  if(!$product) {
352
  return -1;
353
  }
@@ -622,7 +621,7 @@ function woosea_add_remarketing_tags( $product = null ){
622
  // In that case we need to put in the AggregateOffer structured data
623
  $variation_id = woosea_find_matching_product_variation( $product, $_GET );
624
  $nr_get = count($_GET);
625
-
626
  if($nr_get > 0){
627
  $variable_product = wc_get_product($variation_id);
628
 
@@ -659,7 +658,9 @@ function woosea_add_remarketing_tags( $product = null ){
659
  $ecomm_price = wc_format_decimal( $lowest, wc_get_price_decimals());
660
  } else {
661
  $ecomm_lowprice = wc_format_decimal( $lowest, wc_get_price_decimals() );
662
- $ecomm_highprice = wc_format_decimal( $highest, wc_get_price_decimals() );
 
 
663
  }
664
  }
665
  } else {
@@ -671,14 +672,18 @@ function woosea_add_remarketing_tags( $product = null ){
671
  var google_tag_params = {
672
  ecomm_prodid: <?php print "$ecomm_prodid";?>,
673
  ecomm_pagetype: '<?php print "$ecomm_pagetype";?>',
674
- ecomm_totalvalue: '<?php print "$ecomm_price";?>',
675
  };
676
  </script>
677
 
678
  <?php
679
  }
680
  } elseif ($ecomm_pagetype == "cart"){
681
- $ecomm_prodid = get_the_id();
 
 
 
 
682
  ?>
683
  <script type="text/javascript">
684
  var google_tag_params = {
@@ -804,6 +809,7 @@ function woosea_request_review(){
804
  }
805
  add_action('admin_notices', 'woosea_request_review');
806
 
 
807
  /**
808
  * Create a seperate MySql table for saving conversion information
809
  */
@@ -4623,8 +4629,11 @@ add_action('wp_dashboard_setup', 'woosea_blog_widgets');
4623
  /**
4624
  * Creates the RSS metabox
4625
  */
 
 
 
 
4626
  function woosea_my_rss_box() {
4627
-
4628
  // Get RSS Feed(s)
4629
  include_once(ABSPATH . WPINC . '/feed.php');
4630
  $domain = $_SERVER['HTTP_HOST'];
@@ -4633,6 +4642,8 @@ function woosea_my_rss_box() {
4633
  $my_feeds = array(
4634
  'https://www.adtribes.io/feed/'
4635
  );
 
 
4636
 
4637
  // Loop through Feeds
4638
  foreach ( $my_feeds as $feed) :
1
  <?php
2
  /**
3
  * Plugin Name: Product Feed PRO for WooCommerce
4
+ * Version: 9.5.1
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.9
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
48
  * Plugin versionnumber, please do not override.
49
  * Define some constants
50
  */
51
+ define( 'WOOCOMMERCESEA_PLUGIN_VERSION', '9.5.1' );
52
  define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
53
  define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
54
 
347
  $cats = str_replace("&amp;","&", $cats);
348
 
349
  if(!empty($fb_prodid)){
 
350
  if(!$product) {
351
  return -1;
352
  }
621
  // In that case we need to put in the AggregateOffer structured data
622
  $variation_id = woosea_find_matching_product_variation( $product, $_GET );
623
  $nr_get = count($_GET);
624
+
625
  if($nr_get > 0){
626
  $variable_product = wc_get_product($variation_id);
627
 
658
  $ecomm_price = wc_format_decimal( $lowest, wc_get_price_decimals());
659
  } else {
660
  $ecomm_lowprice = wc_format_decimal( $lowest, wc_get_price_decimals() );
661
+ $ecomm_highprice = wc_format_decimal( $highest, wc_get_price_decimals() );
662
+ $ecomm_price = $ecomm_lowprice;
663
+
664
  }
665
  }
666
  } else {
672
  var google_tag_params = {
673
  ecomm_prodid: <?php print "$ecomm_prodid";?>,
674
  ecomm_pagetype: '<?php print "$ecomm_pagetype";?>',
675
+ ecomm_totalvalue: <?php print "$ecomm_price";?>,
676
  };
677
  </script>
678
 
679
  <?php
680
  }
681
  } elseif ($ecomm_pagetype == "cart"){
682
+ // Get the first product from cart and use that product ID
683
+ foreach( WC()->cart->get_cart() as $cart_item ){
684
+ $ecomm_prodid = $cart_item['product_id'];
685
+ break;
686
+ }
687
  ?>
688
  <script type="text/javascript">
689
  var google_tag_params = {
809
  }
810
  add_action('admin_notices', 'woosea_request_review');
811
 
812
+
813
  /**
814
  * Create a seperate MySql table for saving conversion information
815
  */
4629
  /**
4630
  * Creates the RSS metabox
4631
  */
4632
+ function woosea_feed_interval( $seconds ) {
4633
+ return 172800; // Cache the feed for 2 days
4634
+ }
4635
+
4636
  function woosea_my_rss_box() {
 
4637
  // Get RSS Feed(s)
4638
  include_once(ABSPATH . WPINC . '/feed.php');
4639
  $domain = $_SERVER['HTTP_HOST'];
4642
  $my_feeds = array(
4643
  'https://www.adtribes.io/feed/'
4644
  );
4645
+
4646
+ add_filter( 'wp_feed_cache_transient_lifetime' , 'woosea_feed_interval' );
4647
 
4648
  // Loop through Feeds
4649
  foreach ( $my_feeds as $feed) :