Product Feed PRO for WooCommerce - Version 11.3.1

Version Description

Added three Pinterest / Vivino / TikTok price attributes excluding VAT

Download this release

Release Info

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

Code changes from version 11.2.9 to 11.3.1

classes/class-attributes.php CHANGED
@@ -249,6 +249,9 @@ public function get_mapping_attributes_dropdown() {
249
  "vivino_price" => "Pinterest / TikTok / Vivino price",
250
  "vivino_sale_price" => "Pinterest / TikTok / Vivino sale price",
251
  "vivino_regular_price" => "Pinterest / TikTok / Vivino regular price",
 
 
 
252
  "non_geo_wcml_price" => "Non GEO WCML price",
253
  "mm_min_price" => "Mix & Match minimum price",
254
  "mm_min_regular_price" => "Mix & Match minimum regular price",
@@ -511,6 +514,9 @@ public function get_mapping_attributes_dropdown() {
511
  "vivino_price" => "Pinterest / TikTok / Vivino price",
512
  "vivino_sale_price" => "Pinterest / TikTok / Vivino sale price",
513
  "vivino_regular_price" => "Pinterest / TikTok / Vivino regular price",
 
 
 
514
  "non_geo_wcml_price" => "Non GEO WCML price",
515
  "mm_min_price" => "Mix & Match minimum price",
516
  "mm_min_regular_price" => "Mix & Match minimum regular price",
249
  "vivino_price" => "Pinterest / TikTok / Vivino price",
250
  "vivino_sale_price" => "Pinterest / TikTok / Vivino sale price",
251
  "vivino_regular_price" => "Pinterest / TikTok / Vivino regular price",
252
+ "vivino_net_price" => "Pinterest / TikTok / Vivino price excl. VAT",
253
+ "vivino_net_regular_price" => "Pinterest / TikTok / Vivino regular price excl. VAT",
254
+ "vivino_net_sale_price" => "Pinterest / TikTok / Vivino sale price excl. VAT",
255
  "non_geo_wcml_price" => "Non GEO WCML price",
256
  "mm_min_price" => "Mix & Match minimum price",
257
  "mm_min_regular_price" => "Mix & Match minimum regular price",
514
  "vivino_price" => "Pinterest / TikTok / Vivino price",
515
  "vivino_sale_price" => "Pinterest / TikTok / Vivino sale price",
516
  "vivino_regular_price" => "Pinterest / TikTok / Vivino regular price",
517
+ "vivino_net_price" => "Pinterest / TikTok / Vivino price excl. VAT",
518
+ "vivino_net_regular_price" => "Pinterest / TikTok / Vivino regular price excl. VAT",
519
+ "vivino_net_sale_price" => "Pinterest / TikTok / Vivino sale price excl. VAT",
520
  "non_geo_wcml_price" => "Non GEO WCML price",
521
  "mm_min_price" => "Mix & Match minimum price",
522
  "mm_min_regular_price" => "Mix & Match minimum regular price",
classes/class-get-products.php CHANGED
@@ -2382,6 +2382,15 @@ class WooSEA_Get_Products {
2382
  $logger->add('Product Feed Pro by AdTribes.io','<!-- START new QUERY -->');
2383
  }
2384
 
 
 
 
 
 
 
 
 
 
2385
  while ($prods->have_posts()) : $prods->the_post();
2386
  global $product;
2387
  $attr_line = "";
@@ -2399,7 +2408,15 @@ class WooSEA_Get_Products {
2399
  if($status != "publish") { continue; }
2400
 
2401
  $product_data['id'] = get_the_ID();
2402
-
 
 
 
 
 
 
 
 
2403
  // Only products that have been sold are allowed to go through
2404
  if(isset($project_config['total_product_orders_lookback'])){
2405
  if($project_config['total_product_orders_lookback'] > 0){
@@ -3342,6 +3359,9 @@ class WooSEA_Get_Products {
3342
  $product_data['vivino_price'] = $product_data['price'];
3343
  $product_data['vivino_sale_price'] = $product_data['sale_price'];
3344
  $product_data['vivino_regular_price'] = $product_data['regular_price'];
 
 
 
3345
  }
3346
  }
3347
 
@@ -3350,7 +3370,10 @@ class WooSEA_Get_Products {
3350
  $product_data['vivino_regular_price'] = floatval(str_replace(',', '.', str_replace(',', '.', $product_data['regular_price'])));
3351
  if($product_data['sale_price'] > 0){
3352
  $product_data['vivino_sale_price'] = floatval(str_replace(',', '.', str_replace(',', '.', $product_data['sale_price'])));
 
3353
  }
 
 
3354
 
3355
  $product_data['installment'] = $this->woosea_get_installment($project_config, $product_data['id']);
3356
  $product_data['weight'] = ($product->get_weight()) ? $product->get_weight() : false;
@@ -4072,14 +4095,6 @@ class WooSEA_Get_Products {
4072
  $product_data['title_lc'] = ucfirst(strtolower($product_data['title']));
4073
  $product_data['title_lcw'] = ucwords(strtolower($product_data['title']));
4074
 
4075
- // Add CDATA to title and descriptions
4076
- //$add_woosea_cdata = get_option ('add_woosea_cdata');
4077
- //if($add_woosea_cdata == "yes"){
4078
- // $product_data['title'] = $this->woosea_append_cdata ( $product_data['title'] );
4079
- // $product_data['description'] = $this->woosea_append_cdata ( $product_data['description'] );
4080
- // $product_data['short_description'] = $this->woosea_append_cdata ( $product_data['short_description'] );
4081
- //}
4082
-
4083
  /**
4084
  * Get product reviews for Google Product Review Feeds
4085
  */
@@ -4778,10 +4793,10 @@ class WooSEA_Get_Products {
4778
  endwhile;
4779
  wp_reset_query();
4780
 
4781
- /**
4782
- * Update processing status of project
4783
- */
4784
- //$project_updated = $this->woosea_project_update($project_config['project_hash'], $offset_step_size, $xml_piece);
4785
 
4786
  /**
4787
  * Write row to CSV/TXT or XML file
@@ -4894,6 +4909,9 @@ class WooSEA_Get_Products {
4894
  // Feed should only refresh when product details have changed
4895
  update_option('woosea_allow_update', 'no');
4896
 
 
 
 
4897
  // In 2 minutes from now check the amount of products in the feed and update the history count
4898
  wp_schedule_single_event( time() + 120, 'woosea_update_project_stats', array($val['project_hash']) );
4899
  } else {
@@ -4901,6 +4919,11 @@ class WooSEA_Get_Products {
4901
  $feed_config[$key]['running'] = "processing";
4902
  $feed_config[$key]['nr_products'] = $published_products;
4903
 
 
 
 
 
 
4904
  // Set new scheduled event for next batch in 2 seconds
4905
  if($offset_step_size < $published_products){
4906
  if (! wp_next_scheduled ( 'woosea_create_batch_event', array($feed_config[$key]['project_hash']) ) ) {
@@ -4938,6 +4961,9 @@ class WooSEA_Get_Products {
4938
  // Make sure this option is set to no again
4939
  // Feed should only refresh when product details have changed
4940
  update_option('woosea_allow_update', 'no');
 
 
 
4941
 
4942
  // In 2 minutes from now check the amount of products in the feed and update the history count
4943
  wp_schedule_single_event( time() + 120, 'woosea_update_project_stats', array($val['project_hash']) );
2382
  $logger->add('Product Feed Pro by AdTribes.io','<!-- START new QUERY -->');
2383
  }
2384
 
2385
+ // Make sure we do not process duplicate products that are already feed
2386
+ $prevent_duplicates = get_option('woosea_duplicates');
2387
+ if(empty($prevent_duplicates)){
2388
+ $prevent_duplicates = array();
2389
+ $fake_id = 99999999;
2390
+ array_push($prevent_duplicates, $fake_id);
2391
+ update_option('woosea_duplicates', $prevent_duplicates, 'no');
2392
+ }
2393
+
2394
  while ($prods->have_posts()) : $prods->the_post();
2395
  global $product;
2396
  $attr_line = "";
2408
  if($status != "publish") { continue; }
2409
 
2410
  $product_data['id'] = get_the_ID();
2411
+
2412
+ // Add to the prevent duplication array
2413
+ if(!in_array($product_data['id'], $prevent_duplicates)){
2414
+ array_push($prevent_duplicates, $product_data['id']);
2415
+ } else {
2416
+ // duplicate product, do not add
2417
+ continue;
2418
+ }
2419
+
2420
  // Only products that have been sold are allowed to go through
2421
  if(isset($project_config['total_product_orders_lookback'])){
2422
  if($project_config['total_product_orders_lookback'] > 0){
3359
  $product_data['vivino_price'] = $product_data['price'];
3360
  $product_data['vivino_sale_price'] = $product_data['sale_price'];
3361
  $product_data['vivino_regular_price'] = $product_data['regular_price'];
3362
+ $product_data['vivino_net_price'] = $product_data['net_price'];
3363
+ $product_data['vivino_net_sale_price'] = $product_data['net_sale_price'];
3364
+ $product_data['vivino_net_regular_price'] = $product_data['net_regular_price'];
3365
  }
3366
  }
3367
 
3370
  $product_data['vivino_regular_price'] = floatval(str_replace(',', '.', str_replace(',', '.', $product_data['regular_price'])));
3371
  if($product_data['sale_price'] > 0){
3372
  $product_data['vivino_sale_price'] = floatval(str_replace(',', '.', str_replace(',', '.', $product_data['sale_price'])));
3373
+ $product_data['vivino_net_sale_price'] = floatval(str_replace(',', '.', str_replace(',', '.', $product_data['sale_price'])));
3374
  }
3375
+ $product_data['vivino_net_price'] = floatval(str_replace(',', '.', str_replace(',', '.', $product_data['price'])));
3376
+ $product_data['vivino_net_regular_price'] = floatval(str_replace(',', '.', str_replace(',', '.', $product_data['regular_price'])));
3377
 
3378
  $product_data['installment'] = $this->woosea_get_installment($project_config, $product_data['id']);
3379
  $product_data['weight'] = ($product->get_weight()) ? $product->get_weight() : false;
4095
  $product_data['title_lc'] = ucfirst(strtolower($product_data['title']));
4096
  $product_data['title_lcw'] = ucwords(strtolower($product_data['title']));
4097
 
 
 
 
 
 
 
 
 
4098
  /**
4099
  * Get product reviews for Google Product Review Feeds
4100
  */
4793
  endwhile;
4794
  wp_reset_query();
4795
 
4796
+ // Add processed products to array
4797
+ if(get_option('woosea_duplicates')){
4798
+ update_option('woosea_duplicates', $prevent_duplicates, 'no');
4799
+ }
4800
 
4801
  /**
4802
  * Write row to CSV/TXT or XML file
4909
  // Feed should only refresh when product details have changed
4910
  update_option('woosea_allow_update', 'no');
4911
 
4912
+ // Delete processed product array for preventing duplicates
4913
+ delete_option('woosea_duplicates');
4914
+
4915
  // In 2 minutes from now check the amount of products in the feed and update the history count
4916
  wp_schedule_single_event( time() + 120, 'woosea_update_project_stats', array($val['project_hash']) );
4917
  } else {
4919
  $feed_config[$key]['running'] = "processing";
4920
  $feed_config[$key]['nr_products'] = $published_products;
4921
 
4922
+ // Update current processing status and numbers
4923
+ $val['nr_products_processed'] = $nr_prods_processed;
4924
+ $val['running'] = "processing";
4925
+ $val['nr_products'] = $published_products;
4926
+
4927
  // Set new scheduled event for next batch in 2 seconds
4928
  if($offset_step_size < $published_products){
4929
  if (! wp_next_scheduled ( 'woosea_create_batch_event', array($feed_config[$key]['project_hash']) ) ) {
4961
  // Make sure this option is set to no again
4962
  // Feed should only refresh when product details have changed
4963
  update_option('woosea_allow_update', 'no');
4964
+
4965
+ // Delete processed product array for preventing duplicates
4966
+ delete_option('woosea_duplicates');
4967
 
4968
  // In 2 minutes from now check the amount of products in the feed and update the history count
4969
  wp_schedule_single_event( time() + 120, 'woosea_update_project_stats', array($val['project_hash']) );
js/woosea_key.js CHANGED
@@ -26,7 +26,7 @@ jQuery(document).ready(function($) {
26
  var license_key = $('#license-key').val();
27
 
28
  jQuery.ajax({
29
- url: 'https://www.adtribes.io/check/license.php?key=' + license_key + '&email=' + license_email + '&domain=' + root_domain + '&version=11.2.9',
30
  jsonp: 'callback',
31
  dataType: 'jsonp',
32
  type: 'GET',
26
  var license_key = $('#license-key').val();
27
 
28
  jQuery.ajax({
29
+ url: 'https://www.adtribes.io/check/license.php?key=' + license_key + '&email=' + license_email + '&domain=' + root_domain + '&version=11.3.1',
30
  jsonp: 'callback',
31
  dataType: 'jsonp',
32
  type: 'GET',
readme.txt CHANGED
@@ -5,7 +5,7 @@ License URI: http://www.gnu.org/licenses/gpl.html
5
  Tags: Google Shopping Feed, WooCommerce Product Feed, Facebook Product Feed, Bing Shopping Feed, Bing Product Feed, Google Merchant Feed, Skroutz, Google Product Feed, Pinterest, Idealo, Facebook Pixel, Facebook Conversion API
6
  Requires at least: 4.5
7
  Tested up to: 5.9
8
- Stable tag: 11.2.9
9
 
10
  == Description ==
11
 
@@ -337,6 +337,13 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
337
 
338
  === Changelog ===
339
 
 
 
 
 
 
 
 
340
  = 11.2.9 (2022-02-14) =
341
  * Solved a Call to a member function addChild() on null issue
342
 
@@ -3606,6 +3613,13 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
3606
 
3607
  == Upgrade Notice ==
3608
 
 
 
 
 
 
 
 
3609
  = 11.2.9 =
3610
  Solved a Call to a member function addChild() on null issue
3611
 
5
  Tags: Google Shopping Feed, WooCommerce Product Feed, Facebook Product Feed, Bing Shopping Feed, Bing Product Feed, Google Merchant Feed, Skroutz, Google Product Feed, Pinterest, Idealo, Facebook Pixel, Facebook Conversion API
6
  Requires at least: 4.5
7
  Tested up to: 5.9
8
+ Stable tag: 11.3.1
9
 
10
  == Description ==
11
 
337
 
338
  === Changelog ===
339
 
340
+ = 11.3.1 (2022-02-20) =
341
+ * Added three Pinterest / Vivino / TikTok price attributes excluding VAT
342
+
343
+ = 11.3.0 (2022-02-17) =
344
+ * Considerable performance increase of the plugin. For WooCommerce shops with less than 750 processing speed doubled
345
+ * Build-in a check that prevents duplicate products from being added to feeds
346
+
347
  = 11.2.9 (2022-02-14) =
348
  * Solved a Call to a member function addChild() on null issue
349
 
3613
 
3614
  == Upgrade Notice ==
3615
 
3616
+ = 11.3.1 =
3617
+ Added three Pinterest / Vivino / TikTok price attributes excluding VAT
3618
+
3619
+ = 11.3.0 =
3620
+ Considerable performance increase of the plugin. For WooCommerce shops with less than 750 processing speed doubled
3621
+ Build-in a check that prevents duplicate products from being added to feeds
3622
+
3623
  = 11.2.9 =
3624
  Solved a Call to a member function addChild() on null issue
3625
 
woocommerce-sea.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Plugin Name: Product Feed PRO for WooCommerce
4
- * Version: 11.2.9
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, Skroutz, Yandex, Comparison shopping websites and over a 100 channels more.
7
  * Author: AdTribes.io
@@ -48,7 +48,7 @@ if (!defined('ABSPATH')) {
48
  * Plugin versionnumber, please do not override.
49
  * Define some constants
50
  */
51
- define( 'WOOCOMMERCESEA_PLUGIN_VERSION', '11.2.9' );
52
  define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
53
  define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
54
 
@@ -2050,6 +2050,9 @@ function woosea_project_cancel(){
2050
  // Set processing status on ready
2051
  $feed_config[$key]['running'] = "stopped";
2052
  $feed_config[$key]['last_updated'] = date("d M Y H:i");
 
 
 
2053
 
2054
  // In 1 minute from now check the amount of products in the feed and update the history count
2055
  wp_schedule_single_event( time() + 60, 'woosea_update_project_stats', array($val['project_hash']) );
@@ -4543,10 +4546,10 @@ function woosea_last_updated($project_hash){
4543
  function woosea_continue_batch($project_hash){
4544
  $batch_project = "batch_project_".$project_hash;
4545
  $val = get_option( $batch_project );
4546
-
4547
  if ((!empty($val)) AND (is_array($val))){
4548
  $line = new WooSEA_Get_Products;
4549
- $final_creation = $line->woosea_get_products( $val );
4550
  $last_updated = woosea_last_updated( $val['project_hash'] );
4551
 
4552
  // Clean up the single event project configuration
1
  <?php
2
  /**
3
  * Plugin Name: Product Feed PRO for WooCommerce
4
+ * Version: 11.3.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, Skroutz, Yandex, Comparison shopping websites and over a 100 channels more.
7
  * Author: AdTribes.io
48
  * Plugin versionnumber, please do not override.
49
  * Define some constants
50
  */
51
+ define( 'WOOCOMMERCESEA_PLUGIN_VERSION', '11.3.1' );
52
  define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
53
  define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
54
 
2050
  // Set processing status on ready
2051
  $feed_config[$key]['running'] = "stopped";
2052
  $feed_config[$key]['last_updated'] = date("d M Y H:i");
2053
+
2054
+ // Delete processed product array for preventing duplicates
2055
+ delete_option('woosea_duplicates');
2056
 
2057
  // In 1 minute from now check the amount of products in the feed and update the history count
2058
  wp_schedule_single_event( time() + 60, 'woosea_update_project_stats', array($val['project_hash']) );
4546
  function woosea_continue_batch($project_hash){
4547
  $batch_project = "batch_project_".$project_hash;
4548
  $val = get_option( $batch_project );
4549
+
4550
  if ((!empty($val)) AND (is_array($val))){
4551
  $line = new WooSEA_Get_Products;
4552
+ $final_creation = $line->woosea_get_products( $val );
4553
  $last_updated = woosea_last_updated( $val['project_hash'] );
4554
 
4555
  // Clean up the single event project configuration