Version Description
Simplified the SQL query that retrieved custom attribute names so it uses less memory
Download this release
Release Info
Developer | jorisverwater |
Plugin | Product Feed PRO for WooCommerce |
Version | 11.4.2 |
Comparing to | |
See all releases |
Code changes from version 11.4.1 to 11.4.2
- classes/class-attributes.php +18 -18
- js/woosea_key.js +1 -1
- readme.txt +7 -1
- woocommerce-sea.php +2 -2
classes/class-attributes.php
CHANGED
@@ -78,9 +78,6 @@ private function get_dynamic_attributes(){
|
|
78 |
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 |
-
//$data = $wpdb->get_results($sql);
|
84 |
|
85 |
if ( ! function_exists( 'woosea_get_meta_keys_for_post_type' ) ) :
|
86 |
|
@@ -101,14 +98,19 @@ private function get_custom_attributes() {
|
|
101 |
|
102 |
$post_type = "product";
|
103 |
$data = woosea_get_meta_keys_for_post_type($post_type);
|
104 |
-
|
105 |
if (count($data)) {
|
106 |
-
|
|
|
107 |
if (!preg_match("/_product_attributes/i",$value)){
|
108 |
$value_display = str_replace("_", " ",$value);
|
109 |
$list["custom_attributes_" . $value] = ucfirst($value_display);
|
110 |
-
|
111 |
-
$sql = "SELECT
|
|
|
|
|
|
|
|
|
112 |
$data = $wpdb->get_results($sql);
|
113 |
if (count($data)) {
|
114 |
foreach ($data as $key => $value) {
|
@@ -172,7 +174,6 @@ public function get_mapping_attributes_dropdown() {
|
|
172 |
* Create dropdown with product attributes
|
173 |
*/
|
174 |
$dropdown = "<option></option>";
|
175 |
-
|
176 |
$custom_attributes = $this->get_custom_attributes();
|
177 |
|
178 |
if ( class_exists( 'All_in_One_SEO_Pack' ) ) {
|
@@ -199,6 +200,7 @@ public function get_mapping_attributes_dropdown() {
|
|
199 |
}
|
200 |
|
201 |
public function get_special_attributes_clean(){
|
|
|
202 |
$custom_attributes = $this->get_custom_attributes();
|
203 |
return $custom_attributes;
|
204 |
}
|
@@ -375,7 +377,7 @@ public function get_mapping_attributes_dropdown() {
|
|
375 |
|
376 |
/**
|
377 |
* Create dropdown with custom attributes
|
378 |
-
|
379 |
$custom_attributes = $this->get_custom_attributes();
|
380 |
|
381 |
if ( class_exists( 'All_in_One_SEO_Pack' ) ) {
|
@@ -583,18 +585,16 @@ public function get_mapping_attributes_dropdown() {
|
|
583 |
$attributes = array_merge($attributes, $dynamic_attributes);
|
584 |
}
|
585 |
|
586 |
-
|
587 |
-
$custom_attributes = $this->get_custom_attributes();
|
588 |
-
|
589 |
-
if ( class_exists( 'All_in_One_SEO_Pack' ) ) {
|
590 |
-
$custom_attributes['custom_attributes__aioseop_title'] = "All in one seo pack title";
|
591 |
-
$custom_attributes['custom_attributes__aioseop_description'] = "All in one seo pack description";
|
592 |
-
}
|
593 |
|
594 |
-
|
595 |
-
|
|
|
596 |
}
|
597 |
|
|
|
|
|
|
|
598 |
$attributes = array_merge($attributes, $static);
|
599 |
|
600 |
// Did the user checked extra attributes
|
78 |
private function get_custom_attributes() {
|
79 |
global $wpdb;
|
80 |
$list = array();
|
|
|
|
|
|
|
81 |
|
82 |
if ( ! function_exists( 'woosea_get_meta_keys_for_post_type' ) ) :
|
83 |
|
98 |
|
99 |
$post_type = "product";
|
100 |
$data = woosea_get_meta_keys_for_post_type($post_type);
|
101 |
+
|
102 |
if (count($data)) {
|
103 |
+
|
104 |
+
foreach ($data as $key => $value) {
|
105 |
if (!preg_match("/_product_attributes/i",$value)){
|
106 |
$value_display = str_replace("_", " ",$value);
|
107 |
$list["custom_attributes_" . $value] = ucfirst($value_display);
|
108 |
+
} else {
|
109 |
+
$sql = "SELECT
|
110 |
+
meta.meta_id,
|
111 |
+
meta.meta_value as type
|
112 |
+
FROM " . $wpdb->prefix . "postmeta" . " AS meta, " . $wpdb->prefix . "posts" . " AS posts
|
113 |
+
WHERE meta.post_id = posts.id AND posts.post_type LIKE '%product%' AND meta.meta_key='_product_attributes' AND meta.meta_value NOT LIKE \"%{}\";";
|
114 |
$data = $wpdb->get_results($sql);
|
115 |
if (count($data)) {
|
116 |
foreach ($data as $key => $value) {
|
174 |
* Create dropdown with product attributes
|
175 |
*/
|
176 |
$dropdown = "<option></option>";
|
|
|
177 |
$custom_attributes = $this->get_custom_attributes();
|
178 |
|
179 |
if ( class_exists( 'All_in_One_SEO_Pack' ) ) {
|
200 |
}
|
201 |
|
202 |
public function get_special_attributes_clean(){
|
203 |
+
|
204 |
$custom_attributes = $this->get_custom_attributes();
|
205 |
return $custom_attributes;
|
206 |
}
|
377 |
|
378 |
/**
|
379 |
* Create dropdown with custom attributes
|
380 |
+
*/
|
381 |
$custom_attributes = $this->get_custom_attributes();
|
382 |
|
383 |
if ( class_exists( 'All_in_One_SEO_Pack' ) ) {
|
585 |
$attributes = array_merge($attributes, $dynamic_attributes);
|
586 |
}
|
587 |
|
588 |
+
$custom_attributes = $this->get_custom_attributes();
|
|
|
|
|
|
|
|
|
|
|
|
|
589 |
|
590 |
+
if ( class_exists( 'All_in_One_SEO_Pack' ) ) {
|
591 |
+
$custom_attributes['custom_attributes__aioseop_title'] = "All in one seo pack title";
|
592 |
+
$custom_attributes['custom_attributes__aioseop_description'] = "All in one seo pack description";
|
593 |
}
|
594 |
|
595 |
+
array_walk($custom_attributes, function(&$value, $key) { $value .= ' (Custom attribute)';});
|
596 |
+
$attributes = array_merge($attributes, $custom_attributes);
|
597 |
+
|
598 |
$attributes = array_merge($attributes, $static);
|
599 |
|
600 |
// Did the user checked extra attributes
|
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.4.
|
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.4.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.9
|
8 |
-
Stable tag: 11.4.
|
9 |
|
10 |
== Description ==
|
11 |
|
@@ -337,6 +337,9 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
|
|
337 |
|
338 |
=== Changelog ===
|
339 |
|
|
|
|
|
|
|
340 |
= 11.4.1 (2022-03-15) =
|
341 |
* Added 4 new Google Shopping fields in the template: product height, product length, product width and product weight
|
342 |
|
@@ -3646,6 +3649,9 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
|
|
3646 |
|
3647 |
== Upgrade Notice ==
|
3648 |
|
|
|
|
|
|
|
3649 |
= 11.4.1 =
|
3650 |
Added 4 new Google Shopping fields in the template: product height, product length, product width and product weight
|
3651 |
|
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.4.2
|
9 |
|
10 |
== Description ==
|
11 |
|
337 |
|
338 |
=== Changelog ===
|
339 |
|
340 |
+
= 11.4.2 (2022-03-16) =
|
341 |
+
* Simplified the SQL query that retrieved custom attribute names so it uses less memory
|
342 |
+
|
343 |
= 11.4.1 (2022-03-15) =
|
344 |
* Added 4 new Google Shopping fields in the template: product height, product length, product width and product weight
|
345 |
|
3649 |
|
3650 |
== Upgrade Notice ==
|
3651 |
|
3652 |
+
= 11.4.2 =
|
3653 |
+
Simplified the SQL query that retrieved custom attribute names so it uses less memory
|
3654 |
+
|
3655 |
= 11.4.1 =
|
3656 |
Added 4 new Google Shopping fields in the template: product height, product length, product width and product weight
|
3657 |
|
woocommerce-sea.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Product Feed PRO for WooCommerce
|
4 |
-
* Version: 11.4.
|
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.4.
|
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.4.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, 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.4.2' );
|
52 |
define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
|
53 |
define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
|
54 |
|