Product Feed PRO for WooCommerce - Version 7.0.6

Version Description

Increased performance and speed of processing product feeds Increased performance of field mapping page

Download this release

Release Info

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

Code changes from version 7.0.5 to 7.0.6

classes/class-attributes.php CHANGED
@@ -78,12 +78,18 @@ private function get_custom_attributes() {
78
  global $wpdb;
79
  $list = array();
80
 
81
- //$sql = "SELECT meta.meta_id, meta.meta_key as name, meta.meta_value as type FROM " . $wpdb->prefix . "postmeta" . " AS meta, " . $wpdb->prefix . "posts" . " AS posts WHERE meta.post_id = posts.id AND posts.post_type LIKE '%product%' AND meta.meta_key NOT LIKE 'pyre%' AND meta.meta_key NOT LIKE 'sbg_%' AND meta.meta_key NOT LIKE 'rp_%' AND (meta.meta_key NOT LIKE '\_%' OR meta.meta_key LIKE '\_woosea%' OR meta.meta_key LIKE '\_yoast%' OR meta.meta_key='_product_attributes') GROUP BY meta.meta_key ORDER BY meta.meta_key ASC;";
82
-
83
- //$sql = "SELECT meta.meta_id, meta.meta_key as name, meta.meta_value as type FROM " . $wpdb->prefix . "postmeta" . " AS meta, " . $wpdb->prefix . "posts" . " AS posts WHERE meta.post_id = posts.id AND posts.post_type LIKE '%product%' AND meta.meta_key NOT LIKE 'pyre%' AND meta.meta_key NOT LIKE 'sbg_%' AND meta.meta_key NOT LIKE 'rp_%' AND (meta.meta_key NOT LIKE '\_%' OR meta.meta_key LIKE '\_woosea%' OR meta.meta_key LIKE '\_yoast%' OR meta.meta_key LIKE '_unit%' OR meta.meta_key='_product_attributes') GROUP BY meta.meta_key ORDER BY meta.meta_key ASC;";
84
-
85
- $sql = "SELECT meta.meta_id, meta.meta_key as name, meta.meta_value as type FROM " . $wpdb->prefix . "postmeta" . " AS meta, " . $wpdb->prefix . "posts" . " AS posts WHERE meta.post_id = posts.id AND posts.post_type LIKE '%product%' AND meta.meta_key NOT LIKE 'pyre%' AND meta.meta_key NOT LIKE 'sbg_%' AND meta.meta_key NOT LIKE 'rp_%' GROUP BY meta.meta_key ORDER BY meta.meta_key ASC;";
86
-
 
 
 
 
 
 
87
  $data = $wpdb->get_results($sql);
88
 
89
  if (count($data)) {
78
  global $wpdb;
79
  $list = array();
80
 
81
+ // $sql = "SELECT meta.meta_id, meta.meta_key as name, meta.meta_value as type FROM " . $wpdb->prefix . "postmeta" . " AS meta, " . $wpdb->prefix . "posts" . " AS posts WHERE meta.post_id = posts.id AND posts.post_type LIKE '%product%' AND meta.meta_key NOT LIKE 'pyre%' AND meta.meta_key NOT LIKE 'sbg_%' AND meta.meta_key NOT LIKE 'rp_%' GROUP BY meta.meta_key ORDER BY meta.meta_key ASC;";
82
+
83
+ $sql = "SELECT
84
+ meta.meta_id,
85
+ meta.meta_key as name,
86
+ meta.meta_value as type
87
+ FROM " . $wpdb->prefix . "postmeta" . " AS meta, " . $wpdb->prefix . "posts" . " AS posts
88
+ WHERE
89
+ meta.post_id = posts.id AND
90
+ posts.post_type LIKE 'product_%'
91
+ GROUP BY meta.meta_key
92
+ ORDER BY meta.meta_key ASC;";
93
  $data = $wpdb->get_results($sql);
94
 
95
  if (count($data)) {
classes/class-get-products.php CHANGED
@@ -1712,6 +1712,11 @@ class WooSEA_Get_Products {
1712
  }
1713
  $xml_piece = "";
1714
 
 
 
 
 
 
1715
  // Check if we need to get just products or also product variations
1716
  if(isset($project_config['product_variations'])){
1717
  $post_type = array('product', 'product_variation');
@@ -1849,7 +1854,7 @@ class WooSEA_Get_Products {
1849
  }
1850
  }
1851
  $categories = $cat_alt;
1852
-
1853
  // This is a category fix for Yandex, probably needed for all channels
1854
  // When Yoast is not installed and a product is linked to multiple categories
1855
  // The ancestor categoryId does not need to be in the feed
@@ -2159,17 +2164,6 @@ class WooSEA_Get_Products {
2159
  $product_data['sale_price'] = "";
2160
  }
2161
 
2162
- // Log some information to the WooCommerce logs
2163
- // $add_woosea_logging = get_option ('add_woosea_logging');
2164
- // if($add_woosea_logging == "yes"){
2165
- // $logger = new WC_Logger();
2166
- // $logger->add('Product Feed Pro by AdTribes.io','<!-- Start processing new product -->');
2167
- // $logger->add('Product Feed Pro by AdTribes.io',$product_data['id']);
2168
- // $logger->add('Product Feed Pro by AdTribes.io',$product_data['title']);
2169
- // $logger->add('Product Feed Pro by AdTribes.io',$product->get_type());
2170
- // $logger->add('Product Feed Pro by AdTribes.io','<!-- End processing product -->');
2171
- //}
2172
-
2173
 
2174
  // Override price when bundled product
2175
  if(($product->get_type() == "bundle") OR ($product->get_type() == "composite")){
@@ -2415,22 +2409,19 @@ class WooSEA_Get_Products {
2415
  }
2416
  }
2417
 
2418
- $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");
2419
- $taxonomies = get_taxonomies();
2420
-
2421
- $diff_taxonomies = array_diff($taxonomies, $no_taxonomies);
2422
-
2423
  foreach($diff_taxonomies as $taxo){
2424
- $term_value = get_the_terms($product_data['id'], $taxo);
 
2425
 
2426
- if(is_array($term_value)){
2427
- foreach($term_value as $term){
2428
- $product_data[$taxo] = $term->name;
 
2429
  }
2430
  }
2431
  }
2432
 
2433
- /**
2434
  * Add product tags to the product data array
2435
  */
2436
  $product_tags = get_the_terms($product_data['id'], "product_tag");
@@ -2452,7 +2443,7 @@ class WooSEA_Get_Products {
2452
  }
2453
 
2454
  /**
2455
- * Get Custom Attributes for Single and Bundled products
2456
  */
2457
  if (($product->is_type('simple')) OR ($product->is_type('external')) OR ($product->is_type('bundle')) OR ($product->is_type('composite'))){
2458
 
@@ -2514,7 +2505,7 @@ class WooSEA_Get_Products {
2514
  }
2515
  }
2516
  }
2517
-
2518
  /**
2519
  * Get Product Attributes for Single products
2520
  */
@@ -2646,16 +2637,17 @@ class WooSEA_Get_Products {
2646
  * Although this is a product variation we also need to grap the Dynamic attributes belonging to the simple mother prodict
2647
  */
2648
  foreach($diff_taxonomies as $taxo){
2649
- $term_value = get_the_terms($product_data['item_group_id'], $taxo);
2650
-
2651
- if(is_array($term_value)){
2652
- foreach($term_value as $term){
2653
- $product_data[$taxo] = $term->name;
2654
- }
2655
- }
 
 
2656
  }
2657
 
2658
-
2659
  /**
2660
  * Add product tags to the product data array
2661
  */
@@ -2673,8 +2665,6 @@ class WooSEA_Get_Products {
2673
  }
2674
 
2675
  // Add attribute values to the variation product names to make them unique
2676
-
2677
-
2678
  foreach($variations as $kk => $vv){
2679
  $custom_key = $kk;
2680
 
@@ -3036,7 +3026,6 @@ class WooSEA_Get_Products {
3036
  /**
3037
  * When product has passed the filter rules it can continue with the rest
3038
  */
3039
-
3040
  if(!empty($product_data)){
3041
  /**
3042
  * Determine what fields are allowed to make it to the csv and txt productfeed
1712
  }
1713
  $xml_piece = "";
1714
 
1715
+ // Get taxonomies
1716
+ $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");
1717
+ $taxonomies = get_taxonomies();
1718
+ $diff_taxonomies = array_diff($taxonomies, $no_taxonomies);
1719
+
1720
  // Check if we need to get just products or also product variations
1721
  if(isset($project_config['product_variations'])){
1722
  $post_type = array('product', 'product_variation');
1854
  }
1855
  }
1856
  $categories = $cat_alt;
1857
+
1858
  // This is a category fix for Yandex, probably needed for all channels
1859
  // When Yoast is not installed and a product is linked to multiple categories
1860
  // The ancestor categoryId does not need to be in the feed
2164
  $product_data['sale_price'] = "";
2165
  }
2166
 
 
 
 
 
 
 
 
 
 
 
 
2167
 
2168
  // Override price when bundled product
2169
  if(($product->get_type() == "bundle") OR ($product->get_type() == "composite")){
2409
  }
2410
  }
2411
 
 
 
 
 
 
2412
  foreach($diff_taxonomies as $taxo){
2413
+ if(strpos($taxo, "pa_") === 0){
2414
+ $term_value = get_the_terms($product_data['id'], $taxo);
2415
 
2416
+ if(is_array($term_value)){
2417
+ foreach($term_value as $term){
2418
+ $product_data[$taxo] = $term->name;
2419
+ }
2420
  }
2421
  }
2422
  }
2423
 
2424
+ /*r
2425
  * Add product tags to the product data array
2426
  */
2427
  $product_tags = get_the_terms($product_data['id'], "product_tag");
2443
  }
2444
 
2445
  /**
2446
+ * Get Custom Attributes for Single, Bundled and Composite products
2447
  */
2448
  if (($product->is_type('simple')) OR ($product->is_type('external')) OR ($product->is_type('bundle')) OR ($product->is_type('composite'))){
2449
 
2505
  }
2506
  }
2507
  }
2508
+
2509
  /**
2510
  * Get Product Attributes for Single products
2511
  */
2637
  * Although this is a product variation we also need to grap the Dynamic attributes belonging to the simple mother prodict
2638
  */
2639
  foreach($diff_taxonomies as $taxo){
2640
+ if(strpos($taxo, "pa_") === 0){
2641
+ $term_value = get_the_terms($product_data['item_group_id'], $taxo);
2642
+
2643
+ if(is_array($term_value)){
2644
+ foreach($term_value as $term){
2645
+ $product_data[$taxo] = $term->name;
2646
+ }
2647
+ }
2648
+ }
2649
  }
2650
 
 
2651
  /**
2652
  * Add product tags to the product data array
2653
  */
2665
  }
2666
 
2667
  // Add attribute values to the variation product names to make them unique
 
 
2668
  foreach($variations as $kk => $vv){
2669
  $custom_key = $kk;
2670
 
3026
  /**
3027
  * When product has passed the filter rules it can continue with the rest
3028
  */
 
3029
  if(!empty($product_data)){
3030
  /**
3031
  * Determine what fields are allowed to make it to the csv and txt productfeed
js/woosea_key.js CHANGED
@@ -27,7 +27,7 @@ jQuery(document).ready(function($) {
27
  var license_key = $('#license-key').val();
28
 
29
  jQuery.ajax({
30
- url: 'https://www.adtribes.io/check/license.php?key=' + license_key + '&email=' + license_email + '&domain=' + root_domain + '&version=7.0.5',
31
  jsonp: 'callback',
32
  dataType: 'jsonp',
33
  type: 'GET',
27
  var license_key = $('#license-key').val();
28
 
29
  jQuery.ajax({
30
+ url: 'https://www.adtribes.io/check/license.php?key=' + license_key + '&email=' + license_email + '&domain=' + root_domain + '&version=7.0.6',
31
  jsonp: 'callback',
32
  dataType: 'jsonp',
33
  type: 'GET',
pages/admin/woosea-manage-feed.php CHANGED
@@ -340,7 +340,7 @@ if (!wp_next_scheduled( 'woosea_cron_hook' ) ) {
340
  <td>
341
  <?php
342
  printf(
343
- __( 'You currently have %1$s published products on your website out of which %2$s are simple products and %3$s and variable products','woo-product-feed-pro' ),
344
  $published_products,
345
  $published_single,
346
  $published_variation
340
  <td>
341
  <?php
342
  printf(
343
+ __( 'You currently have %1$s published products on your website out of which %2$s are simple products and %3$s variations.','woo-product-feed-pro' ),
344
  $published_products,
345
  $published_single,
346
  $published_variation
readme.txt CHANGED
@@ -5,7 +5,7 @@ License URI: http://www.gnu.org/licenses/gpl.html
5
  Tags: Product Feed, Google Shopping, Google Shopping Feed, WooCommerce Product Feed, WooCommerce Product Feed PRO, Bing Shopping, Bing product feed, Bing remarking, Google Merchant Feed, Google DRM Feed, Google Dynamic Remarketing Feed, Facebook feed, Google feed, Bing feed, Facebook Product Feed, Facebook Dynamic remarketing, Data Feed, WooCommerce Feed, XML product feed, CSV product feed, TSV, TXT product feed, comparison shopping engines, comparison shopping websites, vergelijk.nl, vergelijk.be, vertaa.fi, beslist.nl, kieskeurig.nl, bol.com, raketten, pricerunner, pricegrabber, Buy, leGuide, Kelkoo, Twenga, Yandex, Etsy, Dealtime, Shopzilla, Billiger, Google Product Review feed
6
  Requires at least: 4.5
7
  Tested up to: 5.3
8
- Stable tag: 7.0.5
9
 
10
  == Description ==
11
 
@@ -302,6 +302,10 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
302
 
303
  === Changelog ===
304
 
 
 
 
 
305
  = 7.0.5 (2019-12-17) =
306
  * Added support for the official WooCommerce Composite Products (https://woocommerce.com/products/composite-products/)
307
 
@@ -2225,6 +2229,10 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
2225
 
2226
  == Upgrade Notice ==
2227
 
 
 
 
 
2228
  = 7.0.5 =
2229
  Added support for the official WooCommerce Composite Products (https://woocommerce.com/products/composite-products/)
2230
 
5
  Tags: Product Feed, Google Shopping, Google Shopping Feed, WooCommerce Product Feed, WooCommerce Product Feed PRO, Bing Shopping, Bing product feed, Bing remarking, Google Merchant Feed, Google DRM Feed, Google Dynamic Remarketing Feed, Facebook feed, Google feed, Bing feed, Facebook Product Feed, Facebook Dynamic remarketing, Data Feed, WooCommerce Feed, XML product feed, CSV product feed, TSV, TXT product feed, comparison shopping engines, comparison shopping websites, vergelijk.nl, vergelijk.be, vertaa.fi, beslist.nl, kieskeurig.nl, bol.com, raketten, pricerunner, pricegrabber, Buy, leGuide, Kelkoo, Twenga, Yandex, Etsy, Dealtime, Shopzilla, Billiger, Google Product Review feed
6
  Requires at least: 4.5
7
  Tested up to: 5.3
8
+ Stable tag: 7.0.6
9
 
10
  == Description ==
11
 
302
 
303
  === Changelog ===
304
 
305
+ = 7.0.6 (2019-12-24) =
306
+ * Increased performance and speed of processing product feeds
307
+ * Increased performance of field mapping page
308
+
309
  = 7.0.5 (2019-12-17) =
310
  * Added support for the official WooCommerce Composite Products (https://woocommerce.com/products/composite-products/)
311
 
2229
 
2230
  == Upgrade Notice ==
2231
 
2232
+ = 7.0.6 =
2233
+ Increased performance and speed of processing product feeds
2234
+ Increased performance of field mapping page
2235
+
2236
  = 7.0.5 =
2237
  Added support for the official WooCommerce Composite Products (https://woocommerce.com/products/composite-products/)
2238
 
woocommerce-sea.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Plugin Name: Product Feed PRO for WooCommerce
4
- * Version: 7.0.5
5
  * Plugin URI: https://www.adtribes.io/support/?utm_source=wpadmin&utm_medium=plugin&utm_campaign=woosea_product_feed_pro
6
  * Description: Configure and maintain your WooCommerce product feeds for Google Shopping, Facebook, Remarketing, Bing, Yandex, Comparison shopping websites and over a 100 channels more.
7
  * Author: AdTribes.io
@@ -48,7 +48,7 @@ if (!defined('ABSPATH')) {
48
  * Plugin versionnumber, please do not override.
49
  * Define some constants
50
  */
51
- define( 'WOOCOMMERCESEA_PLUGIN_VERSION', '7.0.5' );
52
  define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
53
  define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
54
 
1
  <?php
2
  /**
3
  * Plugin Name: Product Feed PRO for WooCommerce
4
+ * Version: 7.0.6
5
  * Plugin URI: https://www.adtribes.io/support/?utm_source=wpadmin&utm_medium=plugin&utm_campaign=woosea_product_feed_pro
6
  * Description: Configure and maintain your WooCommerce product feeds for Google Shopping, Facebook, Remarketing, Bing, Yandex, Comparison shopping websites and over a 100 channels more.
7
  * Author: AdTribes.io
48
  * Plugin versionnumber, please do not override.
49
  * Define some constants
50
  */
51
+ define( 'WOOCOMMERCESEA_PLUGIN_VERSION', '7.0.6' );
52
  define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
53
  define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
54