Product Feed PRO for WooCommerce - Version 11.0.2

Version Description

Solved a PHP warning that was showing in the logs when creating a Skroutz feed Solved a mysqli::real_connect() error

Download this release

Release Info

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

Code changes from version 11.0.1 to 11.0.2

classes/class-attributes.php CHANGED
@@ -79,25 +79,34 @@ private function get_custom_attributes() {
79
  global $wpdb;
80
  $list = array();
81
 
82
- $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;";
83
-
84
- // $sql = "SELECT
85
- // meta.meta_id,
86
- // meta.meta_key as name,
87
- // meta.meta_value as type
88
- // FROM " . $wpdb->prefix . "postmeta" . " AS meta, " . $wpdb->prefix . "posts" . " AS posts
89
- // WHERE
90
- // meta.post_id = posts.id AND
91
- // posts.post_type LIKE 'product_%'
92
- // GROUP BY meta.meta_key
93
- // ORDER BY meta.meta_key ASC;";
94
- $data = $wpdb->get_results($sql);
95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  if (count($data)) {
97
  foreach ($data as $key => $value) {
98
- if (!preg_match("/_product_attributes/i",$value->name)){
99
- $value_display = str_replace("_", " ",$value->name);
100
- $list["custom_attributes_" . $value->name] = ucfirst($value_display);
101
  } else {
102
  $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='_product_attributes';";
103
  $data = $wpdb->get_results($sql);
79
  global $wpdb;
80
  $list = array();
81
 
82
+ //$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;";
83
+ //$data = $wpdb->get_results($sql);
 
 
 
 
 
 
 
 
 
 
 
84
 
85
+ if ( ! function_exists( 'woosea_get_meta_keys_for_post_type' ) ) :
86
+
87
+ function woosea_get_meta_keys_for_post_type( $post_type, $sample_size = 5 ) {
88
+ $meta_keys = array();
89
+ $posts = get_posts( array( 'post_type' => $post_type, 'limit' => $sample_size ) );
90
+
91
+ foreach ( $posts as $post ) {
92
+ $post_meta_keys = get_post_custom_keys( $post->ID );
93
+ $meta_keys = array_merge( $meta_keys, $post_meta_keys );
94
+ }
95
+
96
+ // Use array_unique to remove duplicate meta_keys that we received from all posts
97
+ // Use array_values to reset the index of the array
98
+ return array_values( array_unique( $meta_keys ) );
99
+ }
100
+ endif;
101
+
102
+ $post_type = "product";
103
+ $data = woosea_get_meta_keys_for_post_type($post_type);
104
+
105
  if (count($data)) {
106
  foreach ($data as $key => $value) {
107
+ if (!preg_match("/_product_attributes/i",$value)){
108
+ $value_display = str_replace("_", " ",$value);
109
+ $list["custom_attributes_" . $value] = ucfirst($value_display);
110
  } else {
111
  $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='_product_attributes';";
112
  $data = $wpdb->get_results($sql);
classes/class-get-products.php CHANGED
@@ -4129,7 +4129,6 @@ class WooSEA_Get_Products {
4129
  }
4130
 
4131
  $stock_value = get_post_meta( $product_data['id'], "_stock_status", true );
4132
- $sz_attr_value = get_post_meta( $product_data['id'], $sz_attribute, true );
4133
 
4134
  if(!empty($clr_attribute)){
4135
  $clr_attr_value = get_post_meta( $product_data['id'], "attribute_".$clr_attribute, true );
4129
  }
4130
 
4131
  $stock_value = get_post_meta( $product_data['id'], "_stock_status", true );
 
4132
 
4133
  if(!empty($clr_attribute)){
4134
  $clr_attr_value = get_post_meta( $product_data['id'], "attribute_".$clr_attribute, true );
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.0.1',
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.0.2',
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.8
8
- Stable tag: 11.0.1
9
 
10
  == Description ==
11
 
@@ -339,6 +339,10 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
339
 
340
  === Changelog ===
341
 
 
 
 
 
342
  = 11.0.1 (2021-12-14) =
343
  * Reverted previous release as it lead to invalid header errors on new plugin installs
344
 
@@ -3516,6 +3520,10 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
3516
 
3517
  == Upgrade Notice ==
3518
 
 
 
 
 
3519
  = 11.0.1 =
3520
  Reverted previous release as it lead to invalid header errors on new plugin installs
3521
 
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.8
8
+ Stable tag: 11.0.2
9
 
10
  == Description ==
11
 
339
 
340
  === Changelog ===
341
 
342
+ = 11.0.2 (2021-12-15) =
343
+ * Solved a PHP warning that was showing in the logs when creating a Skroutz feed
344
+ * Solved a mysqli::real_connect() error
345
+
346
  = 11.0.1 (2021-12-14) =
347
  * Reverted previous release as it lead to invalid header errors on new plugin installs
348
 
3520
 
3521
  == Upgrade Notice ==
3522
 
3523
+ = 11.0.2 =
3524
+ Solved a PHP warning that was showing in the logs when creating a Skroutz feed
3525
+ Solved a mysqli::real_connect() error
3526
+
3527
  = 11.0.1 =
3528
  Reverted previous release as it lead to invalid header errors on new plugin installs
3529
 
woocommerce-sea.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Plugin Name: Product Feed PRO for WooCommerce
4
- * Version: 11.0.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
@@ -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.0.1' );
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: 11.0.2
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', '11.0.2' );
52
  define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
53
  define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
54