Product Feed PRO for WooCommerce - Version 9.6.1

Version Description

Added attribute that will allow you to uppercase every first character of a string in product names

Download this release

Release Info

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

Code changes from version 9.3.7 to 9.6.1

TODO.txt CHANGED
@@ -6,17 +6,16 @@ Tutorial / Blog posts:
6
 
7
  Priority issues:
8
  - License key input field needs to be a password field (asterixes)
 
9
  - Add a preview option so only 5-10 products are being generated
10
  - Own hosted plugin updating: https://rudrastyh.com/wordpress/self-hosted-plugin-update.html
11
  - Google local product feed inventory in XML format (not just TXT like it is now)
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
6
 
7
  Priority issues:
8
  - License key input field needs to be a password field (asterixes)
9
+ - A seperate FB pixel per WPML website / language
10
  - Add a preview option so only 5-10 products are being generated
11
  - Own hosted plugin updating: https://rudrastyh.com/wordpress/self-hosted-plugin-update.html
12
  - Google local product feed inventory in XML format (not just TXT like it is now)
13
  - Add support for Multisites
14
  - Add a filter on review score (and amount of reviews)
15
  - Make extra woosea fields available for front-end usage
 
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
  - AMAZON integration:
20
  - requires a professional seller account, 39 dollar a month, before being able to create a developer account
21
  - only than we can use their MWS service needed to connect our plugin
classes/channels/class-google_local_products.php CHANGED
@@ -12,8 +12,8 @@ class WooSEA_google_local_products {
12
  $google_local_products = array(
13
  "Local products fields" => array(
14
  "Itemid" => array(
15
- "name" => "Itemid",
16
- "feed_name" => "g:itemid",
17
  "format" => "required",
18
  "woo_suggest" => "id",
19
  ),
12
  $google_local_products = array(
13
  "Local products fields" => array(
14
  "Itemid" => array(
15
+ "name" => "Id",
16
+ "feed_name" => "g:id",
17
  "format" => "required",
18
  "woo_suggest" => "id",
19
  ),
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
 
@@ -208,10 +208,13 @@ public function get_mapping_attributes_dropdown() {
208
  "mother_title" => "Product name parent product",
209
  "title_hyphen" => "Product name hyphen",
210
  "title_lc" => "Product name lowercase",
 
211
  "description" => "Product description",
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",
@@ -247,7 +250,7 @@ public function get_mapping_attributes_dropdown() {
247
  "category_path" => "Category path",
248
  "category_path_short" => "Category path short",
249
  "category_path_skroutz" => "Category path Skroutz",
250
- "one_category" => "Primary category",
251
  "condition" => "Condition",
252
  "availability" => "Availability",
253
  "quantity" => "Quantity [Stock]",
@@ -267,7 +270,8 @@ public function get_mapping_attributes_dropdown() {
267
  "length" => "Length",
268
  "shipping" => "Shipping",
269
  "shipping_price" => "Shipping cost",
270
- "shipping_label" => "Shipping label",
 
271
  "visibility" => "Visibility",
272
  "rating_total" => "Total rating",
273
  "rating_average" => "Average rating",
@@ -350,9 +354,10 @@ public function get_mapping_attributes_dropdown() {
350
 
351
  foreach ($custom_attributes as $key => $value) {
352
  if (!preg_match("/pyre|sbg|fusion/i",$value)){
353
- if (strpos($value, 0, 1) !== "_") {
 
354
  $dropdown .= "<option value='$key'>" . ucfirst($value) . "</option>";
355
- }
356
  }
357
  }
358
 
@@ -402,11 +407,14 @@ public function get_mapping_attributes_dropdown() {
402
  "mother_title" => "Product name parent product",
403
  "title_hyphen" => "Product name hyphen",
404
  "title_lc" => "Product name lowercase",
 
405
  "description" => "Product description",
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",
@@ -429,7 +437,7 @@ public function get_mapping_attributes_dropdown() {
429
  "category_path" => "Category path",
430
  "category_path_short" => "Category path short",
431
  "category_path_skroutz" => "Category path Skroutz",
432
- "one_category" => "Primary category",
433
  "condition" => "Condition",
434
  "availability" => "Availability",
435
  "quantity" => "Quantity [Stock]",
@@ -464,7 +472,8 @@ public function get_mapping_attributes_dropdown() {
464
  "length" => "Length",
465
  "shipping" => "Shipping",
466
  "shipping_price" => "Shipping cost",
467
- "shipping_label" => "Shipping label",
 
468
  "visibility" => "Visibility",
469
  "rating_total" => "Total rating",
470
  "rating_average" => "Average rating",
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
 
208
  "mother_title" => "Product name parent product",
209
  "title_hyphen" => "Product name hyphen",
210
  "title_lc" => "Product name lowercase",
211
+ "title_lcw" => "Product name uppercase first characters",
212
  "description" => "Product description",
213
  "short_description" => "Product short description",
214
  "raw_description" => "Unfiltered product description",
215
  "raw_short_description" => "Unfiltered product short description",
216
+ "mother_description" => "Product description parent product",
217
+ "mother_short_description" => "Product short description parent product",
218
  "price" => "Price",
219
  "regular_price" => "Regular price",
220
  "sale_price" => "Sale price",
250
  "category_path" => "Category path",
251
  "category_path_short" => "Category path short",
252
  "category_path_skroutz" => "Category path Skroutz",
253
+ "one_category" => "Yoast primary category",
254
  "condition" => "Condition",
255
  "availability" => "Availability",
256
  "quantity" => "Quantity [Stock]",
270
  "length" => "Length",
271
  "shipping" => "Shipping",
272
  "shipping_price" => "Shipping cost",
273
+ "shipping_label" => "Shipping class slug",
274
+ "shipping_label_name" => "Shipping class name",
275
  "visibility" => "Visibility",
276
  "rating_total" => "Total rating",
277
  "rating_average" => "Average rating",
354
 
355
  foreach ($custom_attributes as $key => $value) {
356
  if (!preg_match("/pyre|sbg|fusion/i",$value)){
357
+ $value = ltrim($value);
358
+ if (!empty($value)){
359
  $dropdown .= "<option value='$key'>" . ucfirst($value) . "</option>";
360
+ }
361
  }
362
  }
363
 
407
  "mother_title" => "Product name parent product",
408
  "title_hyphen" => "Product name hyphen",
409
  "title_lc" => "Product name lowercase",
410
+ "title_lcw" => "Product name uppercase first characters",
411
  "description" => "Product description",
412
  "short_description" => "Product short description",
413
  "raw_description" => "Unfiltered product description",
414
  "raw_short_description" => "Unfiltered product short description",
415
+ "mother_description" => "Product description parent product",
416
+ "mother_short_description" => "Product short description parent product",
417
+ "link" => "Link",
418
  "variable_link" => "Product variable link",
419
  "add_to_cart_link" => "Add to cart link",
420
  "image" => "Main image",
437
  "category_path" => "Category path",
438
  "category_path_short" => "Category path short",
439
  "category_path_skroutz" => "Category path Skroutz",
440
+ "one_category" => "Yoast primary category",
441
  "condition" => "Condition",
442
  "availability" => "Availability",
443
  "quantity" => "Quantity [Stock]",
472
  "length" => "Length",
473
  "shipping" => "Shipping",
474
  "shipping_price" => "Shipping cost",
475
+ "shipping_label" => "Shipping class slug",
476
+ "shipping_label_name" => "Shipping class name",
477
  "visibility" => "Visibility",
478
  "rating_total" => "Total rating",
479
  "rating_average" => "Average rating",
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;
@@ -931,6 +937,16 @@ class WooSEA_Get_Products {
931
  unset($shipping_cost);
932
  }
933
  }
 
 
 
 
 
 
 
 
 
 
934
  }
935
 
936
  if(isset($zone_details)){
@@ -957,12 +973,9 @@ class WooSEA_Get_Products {
957
  $zone_details['price'] = trim($shipping_cost);
958
  }
959
  } else {
960
- // $shipping_cost = 0;
961
  if(isset($shipping_cost)){
962
  $zone_details['price'] = trim($currency." ".$shipping_cost);
963
  }
964
- //unset($zone_details);
965
- //unset($shipping_cost);
966
  }
967
  }
968
  }
@@ -992,12 +1005,19 @@ class WooSEA_Get_Products {
992
 
993
  // Remove other shipping classes when free shipping is relevant
994
  $free_check = "yes";
995
- //$free_check = get_option ('free_shipping');
996
 
997
  if(in_array($free_check, array_column($shipping_arr, 'free'))) { // search value in the array
998
  foreach($shipping_arr as $k => $v) {
999
  if(!in_array($free_check, $v)){
1000
- unset($shipping_arr[$k]);
 
 
 
 
 
 
 
 
1001
  }
1002
  }
1003
  }
@@ -1005,8 +1025,6 @@ class WooSEA_Get_Products {
1005
  // Fix empty services
1006
  foreach($shipping_arr as $k => $v){
1007
  if(empty($v['service'])){
1008
- // $lalala = get_option( 'woocommerce_default_country' );
1009
- // $shipping_arr[$k]['country'] = get_option( 'woocommerce_default_country' );
1010
  unset($shipping_arr[$k]);
1011
  }
1012
  }
@@ -1145,16 +1163,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 +2014,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 +2346,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
  */
@@ -2439,6 +2464,10 @@ class WooSEA_Get_Products {
2439
  }
2440
 
2441
  $product_data['shipping_label'] = $product->get_shipping_class();
 
 
 
 
2442
 
2443
  // Get product prices
2444
  $product_data['price'] = wc_get_price_including_tax($product, array('price'=> $product->get_price()));
@@ -2485,6 +2514,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 +2612,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 +2773,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
  }
@@ -2838,7 +2869,7 @@ class WooSEA_Get_Products {
2838
 
2839
  foreach($diff_taxonomies as $taxo){
2840
  $term_value = get_the_terms($product_data['id'], $taxo);
2841
- $product_data[$taxo] = "";
2842
 
2843
  if(is_array($term_value)){
2844
  // Do not add variation values to the feed when they are out of stock
@@ -2848,7 +2879,7 @@ class WooSEA_Get_Products {
2848
  $variations = $product_skroutz->get_available_variations();
2849
  $variations_id = wp_list_pluck( $variations, 'variation_id' );
2850
  $skroutz_att_array = array();
2851
-
2852
  foreach($variations_id as $var_id){
2853
  $stock_value = get_post_meta( $var_id, "_stock_status", true );
2854
  if($stock_value == "instock"){
@@ -2864,10 +2895,10 @@ class WooSEA_Get_Products {
2864
  }
2865
 
2866
  foreach($skroutz_att_array as $skrtz_value){
2867
- $product_data[$taxo] .= ",". $skrtz_value;
2868
  }
2869
- $product_data[$taxo] = ltrim($product_data[$taxo],',');
2870
- $product_data[$taxo] = rtrim($product_data[$taxo],',');
2871
  } else {
2872
  // Simple Skroutz product
2873
  foreach($term_value as $term){
@@ -2977,7 +3008,7 @@ class WooSEA_Get_Products {
2977
  $data = $wpdb->get_results($sql);
2978
  if (count($data)) {
2979
  foreach ($data as $key => $value) {
2980
- $value_display = str_replace("_", " ",$value->name);
2981
  if (preg_match("/_product_attributes/i",$value->name)){
2982
  $product_attr = unserialize($value->type);
2983
  if(!empty($product_attr)){
@@ -2995,14 +3026,14 @@ class WooSEA_Get_Products {
2995
 
2996
  /**
2997
  * Get Product Attributes for Single products
 
2998
  */
2999
- if (($product->is_type('simple')) OR ($product->is_type('external')) OR ($product->is_type('mix-and-match')) OR ($product->is_type('bundle')) OR ($product->is_type('composite')) OR ($product->is_type('auction') OR ($product->is_type('subscription')))){
3000
  $single_attributes = $product->get_attributes();
3001
-
3002
  foreach ($single_attributes as $attribute){
3003
- $attr_name = strtolower($attribute->get_name());
3004
- $attr_value = $product->get_attribute($attr_name);
3005
- $product_data[$attr_name] = $attr_value;
3006
  }
3007
  }
3008
 
@@ -3028,9 +3059,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
 
@@ -3440,6 +3471,8 @@ class WooSEA_Get_Products {
3440
  * we will add CDATA brackets to the title and description attributes
3441
  */
3442
  $product_data['title_lc'] = ucfirst(strtolower($product_data['title']));
 
 
3443
  //$product_data['description'] = $this->woosea_append_cdata ( $product_data['description'] );
3444
  //$product_data['short_description'] = $this->woosea_append_cdata ( $product_data['short_description'] );
3445
 
@@ -3448,6 +3481,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,16 +3557,19 @@ 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
  );
3519
 
3520
- if (!in_array($project_config['fields'], $allowed_channel_parents)){
3521
- if(($product->is_type('variable')) AND ($product_data['item_group_id'] == 0)){
3522
- $product_data = array();
3523
- $product_data = null;
3524
- }
3525
- }
 
 
3526
 
3527
  /**
3528
  * Remove variation products that are not THE default variation product
@@ -4926,7 +4973,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 +5072,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 +5177,12 @@ class WooSEA_Get_Products {
5132
  if($allowed <> 0){
5133
  $allowed = 1;
5134
  }
5135
- } else {
5136
- $allowed = 0;
 
 
 
 
5137
  }
5138
  }
5139
  break;
@@ -5316,7 +5365,7 @@ class WooSEA_Get_Products {
5316
  }
5317
  break;
5318
  case($pr_array['condition'] = "="):
5319
- if (($pr_array['criteria'] == "$pd_value") && ($pr_array['than'] == "exclude")){
5320
  $allowed = 0;
5321
  } elseif (($pr_array['criteria'] != "$pd_value") && ($pr_array['than'] == "include_only")){
5322
  $found = strpos($pd_value,$pr_array['criteria']);
@@ -5346,10 +5395,12 @@ class WooSEA_Get_Products {
5346
  $allowed = 1;
5347
  }
5348
  } elseif ((preg_match('/'.$pr_array['criteria'].'/', $pd_value)) && ($pr_array['than'] == "exclude")){
5349
- $allowed = 0;
5350
  } elseif ((preg_match('/'.$pr_array['criteria'].'/', $pd_value)) && ($pr_array['than'] == "include_only")){
5351
  $allowed = 1;
5352
- }
 
 
5353
  break;
5354
  case($pr_array['condition'] = "!="):
5355
  if (($pr_array['criteria'] == "$pd_value") && ($pr_array['than'] == "exclude")){
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;
937
  unset($shipping_cost);
938
  }
939
  }
940
+
941
+ // User do not want to have free shipping in their feed
942
+ $remove_free_shipping = "no";
943
+ $remove_free_shipping = get_option ('remove_free_shipping');
944
+
945
+ if($remove_free_shipping == "yes"){
946
+ unset($zone_details['service']);
947
+ unset($zone_details['price']);
948
+ unset($shipping_cost);
949
+ }
950
  }
951
 
952
  if(isset($zone_details)){
973
  $zone_details['price'] = trim($shipping_cost);
974
  }
975
  } else {
 
976
  if(isset($shipping_cost)){
977
  $zone_details['price'] = trim($currency." ".$shipping_cost);
978
  }
 
 
979
  }
980
  }
981
  }
1005
 
1006
  // Remove other shipping classes when free shipping is relevant
1007
  $free_check = "yes";
 
1008
 
1009
  if(in_array($free_check, array_column($shipping_arr, 'free'))) { // search value in the array
1010
  foreach($shipping_arr as $k => $v) {
1011
  if(!in_array($free_check, $v)){
1012
+
1013
+ // User do not want to have free shipping in their feed
1014
+ // Only remove the other shipping classes when free shipping is not being removed
1015
+ $remove_free_shipping = "no";
1016
+ $remove_free_shipping = get_option ('remove_free_shipping');
1017
+
1018
+ if($remove_free_shipping == "no"){
1019
+ unset($shipping_arr[$k]);
1020
+ }
1021
  }
1022
  }
1023
  }
1025
  // Fix empty services
1026
  foreach($shipping_arr as $k => $v){
1027
  if(empty($v['service'])){
 
 
1028
  unset($shipping_arr[$k]);
1029
  }
1030
  }
1163
  } elseif (preg_match("/g:product_detail/i",$k)){
1164
  if(!empty($v)){
1165
  $product_detail_split = explode("#", $v);
1166
+ $detail_complete = count($product_detail_split);
1167
+ if($detail_complete == 2){
1168
+ $product_detail = $product->addChild('g:product_detail', '', $namespace['g']);
1169
+ $name = str_replace("_", " ", $product_detail_split[0]);
1170
+
1171
+ $section_name = explode(":", $name);
1172
+ $section_name_start = ucfirst($section_name[0]);
1173
+ $name = ucfirst(trim($section_name[1]));
1174
+
1175
+ $section_name = $product_detail->addChild('g:section_name', "General", $namespace['g']);
1176
+ $product_detail_name = $product_detail->addChild('g:attribute_name', $section_name_start, $namespace['g']);
1177
+ $product_detail_value = $product_detail->addChild('g:attribute_value', $product_detail_split[1], $namespace['g']);
1178
+ }
1179
  }
1180
  } elseif ($k == "g:installment"){
1181
  if(!empty($v)){
2014
  $xml_piece = "";
2015
 
2016
  // Get taxonomies
2017
+ $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");
2018
  $taxonomies = get_taxonomies();
2019
  $diff_taxonomies = array_diff($taxonomies, $no_taxonomies);
2020
 
2346
  $product_data['raw_description'] = substr($product_data['raw_description'], 0, 5000);
2347
  $product_data['raw_short_description'] = substr($product_data['raw_short_description'], 0, 5000);
2348
 
2349
+ // Parent variable description
2350
+ $product_data['mother_description'] = $product_data['description'];
2351
+ $product_data['mother_short_description'] = $product_data['short_description'];
2352
+
2353
  /**
2354
  * Check of we need to add Google Analytics UTM parameters
2355
  */
2464
  }
2465
 
2466
  $product_data['shipping_label'] = $product->get_shipping_class();
2467
+ $term = get_term_by( 'slug', $product->get_shipping_class(), 'product_shipping_class' );
2468
+ if(is_object($term)){
2469
+ $product_data['shipping_label_name'] = $term->name;
2470
+ }
2471
 
2472
  // Get product prices
2473
  $product_data['price'] = wc_get_price_including_tax($product, array('price'=> $product->get_price()));
2514
  if($product->get_type() == "bundle"){
2515
  if ($this->woosea_is_plugin_active('woocommerce-product-bundles/woocommerce-product-bundles.php')){
2516
  $product_data['price'] = get_post_meta($product_data['id'], '_price', true);
2517
+ $product_data['sale_price'] = get_post_meta($product_data['id'], '_sale_price', true);
2518
  if(is_numeric($tax_rates[1]['rate'])){
2519
  $product_data['price_forced'] = round(get_post_meta($product_data['id'], '_price', true) * (100+$tax_rates[1]['rate'])/100,2);
2520
  $product_data['regular_price'] = round(get_post_meta($product_data['id'], '_regular_price', true) * (100+$tax_rates[1]['rate'])/100,2);
2612
  $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);
2613
  if($discount !== false){
2614
  $product_data['sale_price'] = $discount;
2615
+ $product_data['price'] = $discount;
2616
  $price_incl_tax = get_option( 'woocommerce_prices_include_tax' );
2617
  if($price_incl_tax == "yes"){
2618
  $product_data['price_forced'] = $product_data['price']*($fullrate/100);
2773
  }
2774
  }
2775
 
2776
+ 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")){
2777
  $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']);
2778
  $shipping_str = $product_data['shipping'];
2779
  }
2869
 
2870
  foreach($diff_taxonomies as $taxo){
2871
  $term_value = get_the_terms($product_data['id'], $taxo);
2872
+ $product_data["$taxo"] = "";
2873
 
2874
  if(is_array($term_value)){
2875
  // Do not add variation values to the feed when they are out of stock
2879
  $variations = $product_skroutz->get_available_variations();
2880
  $variations_id = wp_list_pluck( $variations, 'variation_id' );
2881
  $skroutz_att_array = array();
2882
+
2883
  foreach($variations_id as $var_id){
2884
  $stock_value = get_post_meta( $var_id, "_stock_status", true );
2885
  if($stock_value == "instock"){
2895
  }
2896
 
2897
  foreach($skroutz_att_array as $skrtz_value){
2898
+ $product_data["$taxo"] .= ",". $skrtz_value;
2899
  }
2900
+ $product_data["$taxo"] = ltrim($product_data[$taxo],',');
2901
+ $product_data["$taxo"] = rtrim($product_data[$taxo],',');
2902
  } else {
2903
  // Simple Skroutz product
2904
  foreach($term_value as $term){
3008
  $data = $wpdb->get_results($sql);
3009
  if (count($data)) {
3010
  foreach ($data as $key => $value) {
3011
+ $value_display = str_replace("_", " ",$value->name);
3012
  if (preg_match("/_product_attributes/i",$value->name)){
3013
  $product_attr = unserialize($value->type);
3014
  if(!empty($product_attr)){
3026
 
3027
  /**
3028
  * Get Product Attributes for Single products
3029
+ * These are the attributes users create themselves in WooCommerce
3030
  */
3031
+ if (($product->is_type('simple')) OR ($product->is_type('external')) OR ($product->is_type('mix-and-match')) OR ($product->is_type('bundle')) OR ($product->is_type('composite')) OR ($product->is_type('auction') OR ($product->is_type('subscription')) OR ($product->is_type('variable')))){
3032
  $single_attributes = $product->get_attributes();
 
3033
  foreach ($single_attributes as $attribute){
3034
+ $attr_name = strtolower($attribute->get_name());
3035
+ $attr_value = $product->get_attribute($attr_name);
3036
+ $product_data[$attr_name] = $attr_value;
3037
  }
3038
  }
3039
 
3059
  $product_variations = new WC_Product_Variation( $product_data['id'] );
3060
  $variations = $product_variations->get_variation_attributes();
3061
 
3062
+ // For Skroutz and Bestprice apparal products we can only append colours to the product name
3063
  // When a product has both a size and color attribute we assume its an apparal product
3064
+ if(($project_config['fields'] == "skroutz") OR ($project_config['fields'] == "bestprice")){
3065
  $size_found = "no";
3066
  $color_found = "no";
3067
 
3471
  * we will add CDATA brackets to the title and description attributes
3472
  */
3473
  $product_data['title_lc'] = ucfirst(strtolower($product_data['title']));
3474
+ $product_data['title_lcw'] = ucwords(strtolower($product_data['title']));
3475
+
3476
  //$product_data['description'] = $this->woosea_append_cdata ( $product_data['description'] );
3477
  //$product_data['short_description'] = $this->woosea_append_cdata ( $product_data['short_description'] );
3478
 
3481
  */
3482
  $product_data['reviews'] = $this->woosea_get_reviews( $product_data, $product );
3483
 
3484
+ /**
3485
+ * Filter out reviews that do not have text
3486
+ */
3487
+ if(!empty($product_data['reviews'])){
3488
+ foreach($product_data['reviews'] as $review_id => $review_details){
3489
+ if(empty($review_details['content'])){
3490
+ unset($product_data['reviews'][$review_id]);
3491
+ }
3492
+ }
3493
+ }
3494
+
3495
  /**
3496
  * Check if individual products need to be excluded
3497
  */
3557
  // For these channels parent products are allowed
3558
  $allowed_channel_parents = array(
3559
  "skroutz",
3560
+ "bestprice",
3561
  "google_dsa",
3562
  "google_product_review",
3563
  );
3564
 
3565
+ if(array_key_exists('fields', $project_config)){
3566
+ if (!in_array($project_config['fields'], $allowed_channel_parents)){
3567
+ if(($product->is_type('variable')) AND ($product_data['item_group_id'] == 0)){
3568
+ $product_data = array();
3569
+ $product_data = null;
3570
+ }
3571
+ }
3572
+ }
3573
 
3574
  /**
3575
  * Remove variation products that are not THE default variation product
4973
 
4974
  foreach ($product_data as $pd_key => $pd_value){
4975
  // Check is there is a rule on specific attributes
 
4976
  if(in_array($pd_key, $pr_array, TRUE)){
4977
 
4978
  if($pd_key == "price"){
5072
  $in_tag_array = "yes";
5073
  }
5074
  }
5075
+
5076
  if($in_tag_array == "yes"){
5077
  //if(in_array($pr_array['criteria'], $pd_value, TRUE)) {
5078
  $v = $pr_array['criteria'];
 
5079
  switch ($pr_array['condition']) {
5080
  case($pr_array['condition'] = "contains"):
5081
  if ((preg_match('/'.$pr_array['criteria'].'/', $v))){
5177
  if($allowed <> 0){
5178
  $allowed = 1;
5179
  }
5180
+ } else {
5181
+ if(!empty($pt_value)){
5182
+ $allowed = 1;
5183
+ } else {
5184
+ $allowed = 0;
5185
+ }
5186
  }
5187
  }
5188
  break;
5365
  }
5366
  break;
5367
  case($pr_array['condition'] = "="):
5368
+ if (($pr_array['criteria'] == "$pd_value") AND ($pr_array['than'] == "exclude")){
5369
  $allowed = 0;
5370
  } elseif (($pr_array['criteria'] != "$pd_value") && ($pr_array['than'] == "include_only")){
5371
  $found = strpos($pd_value,$pr_array['criteria']);
5395
  $allowed = 1;
5396
  }
5397
  } elseif ((preg_match('/'.$pr_array['criteria'].'/', $pd_value)) && ($pr_array['than'] == "exclude")){
5398
+ // $allowed = 0;
5399
  } elseif ((preg_match('/'.$pr_array['criteria'].'/', $pd_value)) && ($pr_array['than'] == "include_only")){
5400
  $allowed = 1;
5401
+ } else {
5402
+ $allowed = 1;
5403
+ }
5404
  break;
5405
  case($pr_array['condition'] = "!="):
5406
  if (($pr_array['criteria'] == "$pd_value") && ($pr_array['than'] == "exclude")){
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.6.1',
31
  jsonp: 'callback',
32
  dataType: 'jsonp',
33
  type: 'GET',
js/woosea_manage.js CHANGED
@@ -256,6 +256,26 @@ jQuery(function($) {
256
  }
257
  })
258
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
259
  // Check if user would like to enable debug logging
260
  $('#add_woosea_logging').on('change', function(){ // on change of state
261
  if(this.checked){
256
  }
257
  })
258
 
259
+ // Check if user would like the plugin to remove the free shipping class
260
+ $('#remove_free_shipping').on('change', function(){ // on change of state
261
+ if(this.checked){
262
+
263
+ // Checkbox is on
264
+ jQuery.ajax({
265
+ method: "POST",
266
+ url: ajaxurl,
267
+ data: { 'action': 'woosea_remove_free_shipping', 'status': "on" }
268
+ })
269
+ } else {
270
+ // Checkbox is off
271
+ jQuery.ajax({
272
+ method: "POST",
273
+ url: ajaxurl,
274
+ data: { 'action': 'woosea_remove_free_shipping', 'status': "off" }
275
+ })
276
+ }
277
+ })
278
+
279
  // Check if user would like to enable debug logging
280
  $('#add_woosea_logging').on('change', function(){ // on change of state
281
  if(this.checked){
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">
@@ -290,6 +304,24 @@ if(isset($_GET["tab"])) {
290
  </label>
291
  </td>
292
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
293
  <tr>
294
  <td>
295
  <span><?php _e( 'Remove the local pickup shipping zone from feed (Google Shopping / Facebook only)', 'woo-product-feed-pro');?></span>
@@ -440,11 +472,11 @@ if(isset($_GET["tab"])) {
440
  $external_path_tsv = $external_base . "/woo-product-feed-pro/";
441
  $external_path_logs = $external_base . "/woo-product-feed-pro/";
442
  $test_file = $external_path . "/tesfile.txt";
443
- $test_file_xml = $external_path . "/xml/tesfile.txt";
444
- $test_file_csv = $external_path . "/csv/tesfile.txt";
445
- $test_file_txt = $external_path . "/txt/tesfile.txt";
446
- $test_file_tsv = $external_path . "/tsv/tesfile.txt";
447
- $test_file_logs = $external_path . "/logs/tesfile.txt";
448
 
449
  if (is_writable($external_path)) {
450
  // Normal root category
@@ -515,6 +547,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">
304
  </label>
305
  </td>
306
  </tr>
307
+ <tr>
308
+ <td>
309
+ <span><?php _e( 'Remove the free shipping zone from feed (Google Shopping / Facebook only)', 'woo-product-feed-pro');?></span>
310
+ </td>
311
+ <td>
312
+ <label class="woo-product-feed-pro-switch">
313
+ <?php
314
+ $remove_free_shipping = get_option ('remove_free_shipping');
315
+ if($remove_free_shipping == "yes"){
316
+ print "<input type=\"checkbox\" id=\"remove_free_shipping\" name=\"remove_free_shipping\" class=\"checkbox-field\" checked>";
317
+ } else {
318
+ print "<input type=\"checkbox\" id=\"remove_free_shipping\" name=\"remove_free_shipping\" class=\"checkbox-field\">";
319
+ }
320
+ ?>
321
+ <div class="woo-product-feed-pro-slider round"></div>
322
+ </label>
323
+ </td>
324
+ </tr>
325
  <tr>
326
  <td>
327
  <span><?php _e( 'Remove the local pickup shipping zone from feed (Google Shopping / Facebook only)', 'woo-product-feed-pro');?></span>
472
  $external_path_tsv = $external_base . "/woo-product-feed-pro/";
473
  $external_path_logs = $external_base . "/woo-product-feed-pro/";
474
  $test_file = $external_path . "/tesfile.txt";
475
+ $test_file_xml = $external_path . "xml/tesfile.txt";
476
+ $test_file_csv = $external_path . "csv/tesfile.txt";
477
+ $test_file_txt = $external_path . "txt/tesfile.txt";
478
+ $test_file_tsv = $external_path . "tsv/tesfile.txt";
479
+ $test_file_logs = $external_path . "logs/tesfile.txt";
480
 
481
  if (is_writable($external_path)) {
482
  // Normal root category
547
  $cron_enabled = "True";
548
  }
549
 
550
+ if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) {
551
+ $cron_enabled = "<strong>False</strong>";
552
+ }
553
+
554
  print "<table class=\"woo-product-feed-pro-table\">";
555
  print "<tr><td><strong>System check</strong></td><td><strong>Status</strong></td></tr>";
556
  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,81 @@ 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 +3064,81 @@ 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.6.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.6.1 (2021-02-19) =
327
+ * Added attribute that will allow you to uppercase every first character of a string in product names
328
+
329
+ = 9.6.0 (2021-02-19) =
330
+ * Changed g:itemid to g:id for the Google Local Product Feeds
331
+
332
+ = 9.5.9 (2021-02-19) =
333
+ * Added a fail-safe when users do not select a marketing channel which let to PHP notices in logs
334
+
335
+ = 9.5.8 (2021-02-18) =
336
+ * Added shipping class name attribute
337
+
338
+ = 9.5.7 (2021-02-17) =
339
+ * Dynamic attribute values are now also added to parent variable products for Skroutz feeds
340
+
341
+ = 9.5.6 (2021-02-17) =
342
+ * Changed attribute name primary category to Yoast primary category as it caused lots of confussion
343
+
344
+ = 9.5.5 (2021-02-11) =
345
+ * Fixed a PHP notice that showed when creating a new rule
346
+ * Tested for compatibility with WooCommerce 5.0
347
+
348
+ = 9.5.4 (2021-02-09) =
349
+ * When free shipping zones are removed do not remove the other shipping zones
350
+
351
+ = 9.5.3 (2021-02-08) =
352
+ * Added a feature to remove free shipping zones from Google and Facebook feeds
353
+
354
+ = 9.5.2 (2021-02-08) =
355
+ * Fixed a minor issue in exclude rules for WooCommerce category names
356
+
357
+ = 9.5.1 (2021-02-02) =
358
+ * Dynamic attributes without values that are used for product details should be skipped which not always happened. This is fixed now.
359
+
360
+ = 9.5.0 (2021-02-01) =
361
+ * Discount rules created with the FlyCart plugin did not make it to Skroutz feeds. This has been solved now
362
+
363
+ = 9.4.9 (2021-01-31) =
364
+ * Added a seperate sale price attribute for bundled products
365
+ * Reviews for parent variable products are removed, the reviews are attached to its variations
366
+
367
+ = 9.4.8 (2021-01-30) =
368
+ * Fixed an issue with the ecomm_prodid on the cart page
369
+
370
+ = 9.4.7 (2021-01-29) =
371
+ * Solved an issue that shipping costs to the first product in a custom feed where empty
372
+
373
+ = 9.4.6 (2021-01-28) =
374
+ * Added a new attribute: product description parent product
375
+
376
+ = 9.4.5 (2021-01-28) =
377
+ * Added a Google Shopping field to their template: g:ship_from_country
378
+ * Stripping & characters from review names as it breaks the review feeds
379
+
380
+ = 9.4.4 (2021-01-27) =
381
+ * 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.
382
+
383
+ = 9.4.3 (2021-01-27) =
384
+ * Fixed an issue with an undefined ecomm_price variable on product variable pages
385
+
386
+ = 9.4.2 (2021-01-26) =
387
+ * Added the Dutch Boetiek.nl template
388
+
389
+ = 9.4.1 (2021-01-19) =
390
+ * Fixed a bug: exclude filters on empty product tags were broken. This is fixed now.
391
+
392
+ = 9.4.0 (2021-01-14) =
393
+ * Added a WP-cron check and notifications
394
+
395
+ = 9.3.9 (2021-01-14) =
396
+ * Bestprice.gr apparel products are now grouped by color
397
+
398
+ = 9.3.8 (2021-01-13) =
399
+ * Tested for compatibility with WooCommerce 4.9
400
+
401
  = 9.3.7 (2021-01-12) =
402
  * Added the Bestprice.gr template
403
 
3064
 
3065
  == Upgrade Notice ==
3066
 
3067
+ = 9.6.1 =
3068
+ Added attribute that will allow you to uppercase every first character of a string in product names
3069
+
3070
+ = 9.6.0 =
3071
+ Changed g:itemid to g:id for the Google Local Product Feeds
3072
+
3073
+ = 9.5.9 =
3074
+ * Added a fail-safe when users do not select a marketing channel which let to PHP notices in logs
3075
+
3076
+ = 9.5.8 =
3077
+ Added shipping class name attribute
3078
+
3079
+ = 9.5.7 =
3080
+ Dynamic attribute values are now also added to parent variable products for Skroutz feeds
3081
+
3082
+ = 9.5.6 =
3083
+ Changed attribute name primary category to Yoast primary category as it caused lots of confussion
3084
+
3085
+ = 9.5.5 =
3086
+ Fixed a PHP notice that showed when creating a new rule
3087
+ Tested for compatibility with WooCommerce 5.0
3088
+
3089
+ = 9.5.4 =
3090
+ When free shipping zones are removed do not remove the other shipping zones
3091
+
3092
+ = 9.5.3 =
3093
+ Added a feature to remove free shipping zones from Google and Facebook feeds
3094
+
3095
+ = 9.5.2 =
3096
+ Fixed a minor issue in exclude rules for WooCommerce category names
3097
+
3098
+ = 9.5.1 =
3099
+ Dynamic attributes without values that are used for product details should be skipped which not always happened. This is fixed now.
3100
+
3101
+ = 9.5.0 =
3102
+ Discount rules created with the FlyCart plugin did not make it to Skroutz feeds. This has been solved now
3103
+
3104
+ = 9.4.9 =
3105
+ Added a seperate sale price attribute for bundled products
3106
+ Reviews for parent variable products are removed, the reviews are attached to its variations
3107
+
3108
+ = 9.4.8 =
3109
+ Fixed an issue with the ecomm_prodid on the cart page
3110
+
3111
+ = 9.4.7 =
3112
+ Solved an issue that shipping costs to the first product in a custom feed where empty
3113
+
3114
+ = 9.4.6 =
3115
+ Added a new attribute: product description parent product
3116
+
3117
+ = 9.4.5 =
3118
+ Added a Google Shopping field to their template: g:ship_from_country
3119
+ Stripping & characters from review names as it breaks the review feeds
3120
+
3121
+ = 9.4.4 =
3122
+ 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.
3123
+
3124
+ = 9.4.3 =
3125
+ Fixed an issue with an undefined ecomm_price variable on product variable pages
3126
+
3127
+ = 9.4.2 =
3128
+ Added the Dutch Boetiek.nl template
3129
+
3130
+ = 9.4.1 =
3131
+ Fixed a bug: exclude filters on empty product tags were broken. This is fixed now.
3132
+
3133
+ = 9.4.0 =
3134
+ Added a WP-cron check and notifications
3135
+
3136
+ = 9.3.9 =
3137
+ Bestprice.gr apparel products are now grouped by color
3138
+
3139
+ = 9.3.8 =
3140
+ Tested for compatibility with WooCommerce 4.9
3141
+
3142
  = 9.3.7 =
3143
  Added the Bestprice.gr template
3144
 
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
  */
@@ -2285,6 +2291,21 @@ function woosea_local_pickup_shipping (){
2285
  }
2286
  add_action( 'wp_ajax_woosea_local_pickup_shipping', 'woosea_local_pickup_shipping' );
2287
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2288
  /**
2289
  * This function enables the setting to use
2290
  * logging
@@ -4623,8 +4644,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 +4657,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.6.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: 5.0
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.6.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
  */
2291
  }
2292
  add_action( 'wp_ajax_woosea_local_pickup_shipping', 'woosea_local_pickup_shipping' );
2293
 
2294
+ /**
2295
+ * This function enables the setting to remove
2296
+ * free shipping zones
2297
+ */
2298
+ function woosea_remove_free_shipping (){
2299
+ $status = sanitize_text_field($_POST['status']);
2300
+
2301
+ if ($status == "off"){
2302
+ update_option( 'remove_free_shipping', 'no', 'yes');
2303
+ } else {
2304
+ update_option( 'remove_free_shipping', 'yes', 'yes');
2305
+ }
2306
+ }
2307
+ add_action( 'wp_ajax_woosea_remove_free_shipping', 'woosea_remove_free_shipping' );
2308
+
2309
  /**
2310
  * This function enables the setting to use
2311
  * logging
4644
  /**
4645
  * Creates the RSS metabox
4646
  */
4647
+ function woosea_feed_interval( $seconds ) {
4648
+ return 172800; // Cache the feed for 2 days
4649
+ }
4650
+
4651
  function woosea_my_rss_box() {
 
4652
  // Get RSS Feed(s)
4653
  include_once(ABSPATH . WPINC . '/feed.php');
4654
  $domain = $_SERVER['HTTP_HOST'];
4657
  $my_feeds = array(
4658
  'https://www.adtribes.io/feed/'
4659
  );
4660
+
4661
+ add_filter( 'wp_feed_cache_transient_lifetime' , 'woosea_feed_interval' );
4662
 
4663
  // Loop through Feeds
4664
  foreach ( $my_feeds as $feed) :