Version Description
Fixed a bug with regards to Yoast's primary category. Renamed the "One Category" attribute to "Primary Category" Now also supporting category mappings for WooCommerce categories containing a > character
Download this release
Release Info
Developer | jorisverwater |
Plugin | Product Feed PRO for WooCommerce |
Version | 7.5.6 |
Comparing to | |
See all releases |
Code changes from version 7.5.5 to 7.5.6
- classes/class-attributes.php +2 -2
- classes/class-get-products.php +27 -10
- js/woosea_key.js +1 -1
- readme.txt +9 -1
- woocommerce-sea.php +3 -3
classes/class-attributes.php
CHANGED
@@ -236,7 +236,7 @@ public function get_mapping_attributes_dropdown() {
|
|
236 |
"category_path" => "Category path",
|
237 |
"category_path_short" => "Category path short",
|
238 |
"category_path_skroutz" => "Category path Skroutz",
|
239 |
-
"one_category" => "
|
240 |
"condition" => "Condition",
|
241 |
"availability" => "Availability",
|
242 |
"quantity" => "Quantity [Stock]",
|
@@ -409,7 +409,7 @@ public function get_mapping_attributes_dropdown() {
|
|
409 |
"category_path" => "Category path",
|
410 |
"category_path_short" => "Category path short",
|
411 |
"category_path_skroutz" => "Category path Skroutz",
|
412 |
-
"one_category" => "
|
413 |
"condition" => "Condition",
|
414 |
"availability" => "Availability",
|
415 |
"quantity" => "Quantity [Stock]",
|
236 |
"category_path" => "Category path",
|
237 |
"category_path_short" => "Category path short",
|
238 |
"category_path_skroutz" => "Category path Skroutz",
|
239 |
+
"one_category" => "Primary category",
|
240 |
"condition" => "Condition",
|
241 |
"availability" => "Availability",
|
242 |
"quantity" => "Quantity [Stock]",
|
409 |
"category_path" => "Category path",
|
410 |
"category_path_short" => "Category path short",
|
411 |
"category_path_skroutz" => "Category path Skroutz",
|
412 |
+
"one_category" => "Primary category",
|
413 |
"condition" => "Condition",
|
414 |
"availability" => "Availability",
|
415 |
"quantity" => "Quantity [Stock]",
|
classes/class-get-products.php
CHANGED
@@ -1969,11 +1969,10 @@ class WooSEA_Get_Products {
|
|
1969 |
|
1970 |
// Not in array so we can add it
|
1971 |
if(!in_array($value, $cat_order)){
|
1972 |
-
|
1973 |
$parent_cat = $product_cat->parent;
|
1974 |
// Check if parent is in array
|
1975 |
if(in_array($parent_cat, $cat_order)){
|
1976 |
-
|
1977 |
// Parent is in array, now determine position
|
1978 |
$position = array_search($parent_cat, $cat_order);
|
1979 |
|
@@ -1985,9 +1984,12 @@ class WooSEA_Get_Products {
|
|
1985 |
} else {
|
1986 |
// Parent is not in array
|
1987 |
if($parent_cat > 0){
|
|
|
|
|
|
|
1988 |
$cat_order[] = $value;
|
1989 |
} else {
|
1990 |
-
// This is the
|
1991 |
array_unshift($cat_order, $value);
|
1992 |
}
|
1993 |
}
|
@@ -2018,7 +2020,6 @@ class WooSEA_Get_Products {
|
|
2018 |
$categories = $cat_alt;
|
2019 |
}
|
2020 |
|
2021 |
-
// Check if the Yoast plugin is installed and active
|
2022 |
foreach ($categories as $key => $value){
|
2023 |
$product_cat = get_term($value, 'product_cat');
|
2024 |
|
@@ -2042,16 +2043,30 @@ class WooSEA_Get_Products {
|
|
2042 |
if(isset($product_cat->name)) {
|
2043 |
$catname .= "||".$product_cat->name;
|
2044 |
$catlink .= "||".get_term_link($value,'product_cat');
|
2045 |
-
$one_category = $catname;
|
2046 |
}
|
2047 |
}
|
2048 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2049 |
$product_data['category_path_short'] = str_replace("Home >","",$product_data['category_path']);
|
2050 |
$product_data['category_link'] = $catlink;
|
2051 |
$product_data['raw_categories'] = ltrim($catname,"||");
|
2052 |
-
if(!empty($one_category)){
|
2053 |
-
$product_data['one_category'] = $one_category;
|
2054 |
-
}
|
2055 |
$product_data['categories'] = $catname;
|
2056 |
$product_data['description'] = html_entity_decode((str_replace("\r", "", $post->post_content)), ENT_QUOTES | ENT_XML1, 'UTF-8');
|
2057 |
$product_data['short_description'] = html_entity_decode((str_replace("\r", "", $post->post_excerpt)), ENT_QUOTES | ENT_XML1, 'UTF-8');
|
@@ -3691,11 +3706,13 @@ class WooSEA_Get_Products {
|
|
3691 |
private function woocommerce_sea_mappings( $project_mappings, $product_data ){
|
3692 |
$original_cat = $product_data['categories'];
|
3693 |
$original_cat = preg_replace('/&/','&',$original_cat);
|
|
|
|
|
|
|
3694 |
$tmp_cat = "";
|
3695 |
$match = "false";
|
3696 |
|
3697 |
foreach ($project_mappings as $pm_key => $pm_array){
|
3698 |
-
|
3699 |
// Strip slashes
|
3700 |
$pm_array['criteria'] = str_replace("\\","",$pm_array['criteria']);
|
3701 |
$pm_array['criteria'] = str_replace("/","",$pm_array['criteria']);
|
1969 |
|
1970 |
// Not in array so we can add it
|
1971 |
if(!in_array($value, $cat_order)){
|
1972 |
+
|
1973 |
$parent_cat = $product_cat->parent;
|
1974 |
// Check if parent is in array
|
1975 |
if(in_array($parent_cat, $cat_order)){
|
|
|
1976 |
// Parent is in array, now determine position
|
1977 |
$position = array_search($parent_cat, $cat_order);
|
1978 |
|
1984 |
} else {
|
1985 |
// Parent is not in array
|
1986 |
if($parent_cat > 0){
|
1987 |
+
if(in_array($parent_cat, $categories)){
|
1988 |
+
$cat_order[] = $parent_cat;
|
1989 |
+
}
|
1990 |
$cat_order[] = $value;
|
1991 |
} else {
|
1992 |
+
// This is the MAIN cat so should be in front
|
1993 |
array_unshift($cat_order, $value);
|
1994 |
}
|
1995 |
}
|
2020 |
$categories = $cat_alt;
|
2021 |
}
|
2022 |
|
|
|
2023 |
foreach ($categories as $key => $value){
|
2024 |
$product_cat = get_term($value, 'product_cat');
|
2025 |
|
2043 |
if(isset($product_cat->name)) {
|
2044 |
$catname .= "||".$product_cat->name;
|
2045 |
$catlink .= "||".get_term_link($value,'product_cat');
|
|
|
2046 |
}
|
2047 |
}
|
2048 |
+
|
2049 |
+
// Get the Yoast primary category (if exists)
|
2050 |
+
if ( class_exists('WPSEO_Primary_Term') ) {
|
2051 |
+
|
2052 |
+
// Show the post's 'Primary' category, if this Yoast feature is available, & one is set
|
2053 |
+
$item_id = $product_data['id'];
|
2054 |
+
if($product_data['item_group_id'] > 0){
|
2055 |
+
$item_id = $product_data['item_group_id'];
|
2056 |
+
}
|
2057 |
+
$wpseo_primary_term = new WPSEO_Primary_Term( 'product_cat', $item_id );
|
2058 |
+
$prm_term = $wpseo_primary_term->get_primary_term();
|
2059 |
+
$prm_cat = get_term($prm_term, 'product_cat');
|
2060 |
+
if(!is_wp_error($prm_cat)){
|
2061 |
+
if(!empty($prm_cat->name)){
|
2062 |
+
$product_data['one_category'] = $prm_cat->name;
|
2063 |
+
}
|
2064 |
+
}
|
2065 |
+
}
|
2066 |
+
|
2067 |
$product_data['category_path_short'] = str_replace("Home >","",$product_data['category_path']);
|
2068 |
$product_data['category_link'] = $catlink;
|
2069 |
$product_data['raw_categories'] = ltrim($catname,"||");
|
|
|
|
|
|
|
2070 |
$product_data['categories'] = $catname;
|
2071 |
$product_data['description'] = html_entity_decode((str_replace("\r", "", $post->post_content)), ENT_QUOTES | ENT_XML1, 'UTF-8');
|
2072 |
$product_data['short_description'] = html_entity_decode((str_replace("\r", "", $post->post_excerpt)), ENT_QUOTES | ENT_XML1, 'UTF-8');
|
3706 |
private function woocommerce_sea_mappings( $project_mappings, $product_data ){
|
3707 |
$original_cat = $product_data['categories'];
|
3708 |
$original_cat = preg_replace('/&/','&',$original_cat);
|
3709 |
+
$original_cat = preg_replace('/>/','>',$original_cat);
|
3710 |
+
$original_cat = ltrim($original_cat,"||");
|
3711 |
+
|
3712 |
$tmp_cat = "";
|
3713 |
$match = "false";
|
3714 |
|
3715 |
foreach ($project_mappings as $pm_key => $pm_array){
|
|
|
3716 |
// Strip slashes
|
3717 |
$pm_array['criteria'] = str_replace("\\","",$pm_array['criteria']);
|
3718 |
$pm_array['criteria'] = str_replace("/","",$pm_array['criteria']);
|
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.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.5.6',
|
31 |
jsonp: 'callback',
|
32 |
dataType: 'jsonp',
|
33 |
type: 'GET',
|
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.5.
|
9 |
|
10 |
== Description ==
|
11 |
|
@@ -312,6 +312,10 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
|
|
312 |
|
313 |
=== Changelog ===
|
314 |
|
|
|
|
|
|
|
|
|
315 |
= 7.5.5 (2020-02-25) =
|
316 |
* Change in Google category taxonomy mapping: when a product belongs to multiple categories the plugin will use the lowest level category hierarchy mapping (instead of the last one it encounters)
|
317 |
* Removed the double pipes in front of the raw category attribute values
|
@@ -2401,6 +2405,10 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
|
|
2401 |
|
2402 |
== Upgrade Notice ==
|
2403 |
|
|
|
|
|
|
|
|
|
2404 |
= 7.5.5. =
|
2405 |
Change in Google category taxonomy mapping: when a product belongs to multiple categories the plugin will use the lowest level category hierarchy mapping (instead of the last one it encounters)
|
2406 |
Removed the double pipes in front of the raw category attribute values
|
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.5.6
|
9 |
|
10 |
== Description ==
|
11 |
|
312 |
|
313 |
=== Changelog ===
|
314 |
|
315 |
+
= 7.5.6 (2020-02-25) =
|
316 |
+
* Fixed a bug with regards to Yoast's primary category. Renamed the "One Category" attribute to "Primary Category"
|
317 |
+
* Now also supporting category mappings for WooCommerce categories containing a > character
|
318 |
+
|
319 |
= 7.5.5 (2020-02-25) =
|
320 |
* Change in Google category taxonomy mapping: when a product belongs to multiple categories the plugin will use the lowest level category hierarchy mapping (instead of the last one it encounters)
|
321 |
* Removed the double pipes in front of the raw category attribute values
|
2405 |
|
2406 |
== Upgrade Notice ==
|
2407 |
|
2408 |
+
= 7.5.6 =
|
2409 |
+
Fixed a bug with regards to Yoast's primary category. Renamed the "One Category" attribute to "Primary Category"
|
2410 |
+
Now also supporting category mappings for WooCommerce categories containing a > character
|
2411 |
+
|
2412 |
= 7.5.5. =
|
2413 |
Change in Google category taxonomy mapping: when a product belongs to multiple categories the plugin will use the lowest level category hierarchy mapping (instead of the last one it encounters)
|
2414 |
Removed the double pipes in front of the raw category attribute values
|
woocommerce-sea.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Product Feed PRO for WooCommerce
|
4 |
-
* Version: 7.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.5.
|
52 |
define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
|
53 |
define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
|
54 |
|
@@ -3833,7 +3833,7 @@ function woosea_license_valid(){
|
|
3833 |
|
3834 |
if(!empty($license_information['license_key'])){
|
3835 |
$curl = curl_init();
|
3836 |
-
$url = "https://www.adtribes.io/check/license.php?key=$license_information[license_key]&email=$license_information[license_email]&domain=$domain&version=7.5.
|
3837 |
|
3838 |
curl_setopt_array($curl, array(
|
3839 |
CURLOPT_RETURNTRANSFER => 1,
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Product Feed PRO for WooCommerce
|
4 |
+
* Version: 7.5.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.5.6' );
|
52 |
define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
|
53 |
define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
|
54 |
|
3833 |
|
3834 |
if(!empty($license_information['license_key'])){
|
3835 |
$curl = curl_init();
|
3836 |
+
$url = "https://www.adtribes.io/check/license.php?key=$license_information[license_key]&email=$license_information[license_email]&domain=$domain&version=7.5.6";
|
3837 |
|
3838 |
curl_setopt_array($curl, array(
|
3839 |
CURLOPT_RETURNTRANSFER => 1,
|