Product Feed PRO for WooCommerce - Version 7.3.0

Version Description

Filters on primary (Yoast) categories now also work on the non primary categories

Download this release

Release Info

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

Code changes from version 7.2.9 to 7.3.0

classes/class-get-products.php CHANGED
@@ -1887,123 +1887,52 @@ class WooSEA_Get_Products {
1887
  }
1888
 
1889
  // Check if the Yoast plugin is installed and active
1890
- if ( class_exists('WPSEO_Primary_Term') ){
1891
- $product_id = $product_data['id'];
1892
- $primary_cat_id=get_post_meta($product_id ,'_yoast_wpseo_primary_product_cat',true);
1893
- $category_path = $this->woosea_get_term_parents( $primary_cat_id, 'product_cat', $link = false, $project_taxonomy = $project_config['taxonomy'], $nicename = false, $visited = array() );
1894
-
1895
- if(!is_object($category_path)){
1896
- $product_data['category_path'] = $category_path;
1897
- }
1898
-
1899
- if(($primary_cat_id) AND ($primary_cat_id > 0)){
1900
- $product_cat = get_term($primary_cat_id, 'product_cat');
1901
- $category_path = $this->woosea_get_term_parents( $primary_cat_id, 'product_cat', $link = false, $project_taxonomy = $project_config['taxonomy'], $nicename = false, $visited = array() );
1902
- if(!is_object($category_path)){
1903
- $product_data['category_path'] = $category_path;
1904
- }
1905
-
1906
- if(isset($product_cat->name)) {
1907
- $catname = $product_cat->name;
1908
- $catlink = get_category_link($product_cat->term_id);
1909
- $one_category = $catname;
1910
- } else {
1911
- foreach ($categories as $key => $value){
1912
- if (!$catname){
1913
- $product_cat = get_term($value, 'product_cat');
1914
-
1915
- if(isset($product_cat->name)) {
1916
- $catname = $product_cat->name;
1917
- $catlink = get_term_link($value,'product_cat');
1918
- $one_category = $catname;
1919
- }
1920
- } else {
1921
- $product_cat = get_term($value, 'product_cat');
1922
- if(isset($product_cat->name)) {
1923
- $catname_concat = $product_cat->name;
1924
- $catlink_concat = get_term_link($value,'product_cat');
1925
- }
1926
- $one_category = $catname_concat;
1927
- $catname .= "||".$catname_concat;
1928
- $catlink .= "||".$catlink_concat;
1929
- }
1930
- }
1931
- }
1932
- } else {
1933
- foreach ($categories as $key => $value){
1934
- $category_path = $this->woosea_get_term_parents( $value, 'product_cat', $link = false, $project_taxonomy = $project_config['taxonomy'], $nicename = false, $visited = array() );
1935
- if(!is_object($category_path)){
1936
- $product_data['category_path'] = $category_path;
1937
- }
1938
-
1939
- if (!$catname){
1940
- $product_cat = get_term($value, 'product_cat');
1941
-
1942
- if(isset($product_cat->name)) {
1943
- $catname = $product_cat->name;
1944
- $catlink = get_term_link($value,'product_cat');
1945
- $one_category = $catname;
1946
- }
1947
- } else {
1948
- $product_cat = get_term($value, 'product_cat');
1949
- if(isset($product_cat->name)) {
1950
- $catname_concat = $product_cat->name;
1951
- $catlink_concat = get_term_link($value,'product_cat');
1952
- }
1953
- $one_category = $catname_concat;
1954
- $catname .= "||".$catname_concat;
1955
- $catlink .= "||".$catlink_concat;
1956
- }
1957
- }
1958
- }
1959
- } else {
1960
- foreach ($categories as $key => $value){
1961
 
1962
- if (!$catname){
1963
- $product_cat = get_term($value, 'product_cat');
1964
 
1965
- // Check if there are mother categories
1966
- $parent_categories = get_ancestors($product_cat->term_id, 'product_cat');
1967
- $category_path = $this->woosea_get_term_parents( $product_cat->term_id, 'product_cat', $link = false, $project_taxonomy = $project_config['taxonomy'], $nicename = false, $visited = array() );
1968
 
1969
- if(!is_object($category_path)){
1970
- $product_data['category_path'] = $category_path;
1971
- }
1972
 
1973
- foreach ($parent_categories as $category_id){
1974
- $parent = get_term_by('id', $category_id, 'product_cat');
1975
- $parent_name = $parent->name;
1976
- }
1977
 
1978
- if(isset($product_cat->name)) {
1979
- $catname = $product_cat->name;
1980
- $catlink = get_term_link($value,'product_cat');
1981
- $one_category = $catname;
1982
- }
1983
- } else {
1984
- $product_cat = get_term($value, 'product_cat');
1985
 
1986
- $category_path = $this->woosea_get_term_parents( $product_cat->term_id, 'product_cat', $link = false, $project_taxonomy = $project_config['taxonomy'], $nicename = false, $visited = array() );
1987
- if(!is_object($category_path)){
1988
- $product_data['category_path'] = $category_path;
1989
- }
1990
 
1991
- // Check if there are mother categories
1992
- $parent_categories = get_ancestors($product_cat->term_id, 'product_cat');
1993
 
1994
- foreach ($parent_categories as $category_id){
1995
- $parent = get_term_by('id', $category_id, 'product_cat');
1996
- $parent_name = "||".$parent->name;
1997
- }
1998
-
1999
- if(isset($product_cat->name)) {
2000
- $catname_concat = $product_cat->name;
2001
- $catlink_concat = get_term_link($value,'product_cat');
2002
- }
2003
- $one_category = $catname_concat;
2004
- $catname .= "||".$catname_concat;
2005
- $catlink .= "||".$catlink_concat;
2006
  }
 
 
 
 
 
 
 
 
2007
  }
2008
  }
2009
 
@@ -2844,120 +2773,38 @@ class WooSEA_Get_Products {
2844
  }
2845
 
2846
  // Check if the Yoast plugin is installed and active
2847
- if ( class_exists('WPSEO_Primary_Term') ){
2848
- $product_id = $product_data['item_group_id'];
2849
- $primary_cat_id=get_post_meta($product_id ,'_yoast_wpseo_primary_product_cat',true);
2850
-
2851
- if($primary_cat_id){
2852
- $product_cat = get_term($primary_cat_id, 'product_cat');
2853
-
2854
- if(empty($product_cat)){
2855
-
2856
- // No primary category was set
2857
- foreach ($categories as $key => $value){
2858
- if (!$catname){
2859
- $product_cat = get_term($value, 'product_cat');
2860
- $category_path = $this->woosea_get_term_parents( $product_cat->term_id, 'product_cat', $project_taxonomy = $project_config['taxonomy'], $link = false, $nicename = false, $visited = array() );
2861
-
2862
- if(!is_object($category_path)){
2863
- $product_data['category_path'] = $category_path;
2864
- }
2865
-
2866
- if(isset($product_cat->name)) {
2867
- $catname = $product_cat->name;
2868
- $catlink = get_term_link($value,'product_cat');
2869
- }
2870
- } else {
2871
- $product_cat = get_term($value, 'product_cat');
2872
- $category_path = $this->woosea_get_term_parents( $product_cat->term_id, 'product_cat', $link = false, $project_taxonomy = $project_config['taxonomy'], $nicename = false, $visited = array() );
2873
- if(!is_object($category_path)){
2874
- $product_data['category_path'] = $category_path;
2875
- }
2876
-
2877
- if(isset($product_cat->name)) {
2878
- $catname_concat = $product_cat->name;
2879
- $catlink_concat = get_term_link($value,'product_cat');
2880
- }
2881
- $catname .= "||".$catname_concat;
2882
- $catlink .= "||".$catlink_concat;
2883
- }
2884
- }
2885
- } else {
2886
- $category_path = $this->woosea_get_term_parents( $product_cat->term_id, 'product_cat', $link = false, $project_taxonomy = $project_config['taxonomy'], $nicename = false, $visited = array() );
2887
- if(!is_object($category_path)){
2888
- $product_data['category_path'] = $category_path;
2889
- }
2890
-
2891
- if(isset($product_cat->name)) {
2892
- $catname = $product_cat->name;
2893
- $catlink = get_category_link($product_cat->term_id);
2894
- }
2895
  }
2896
- } else {
2897
- foreach ($categories as $key => $value){
2898
- if (!$catname){
2899
- $product_cat = get_term($value, 'product_cat');
2900
- $category_path = $this->woosea_get_term_parents( $product_cat->term_id, 'product_cat', $project_taxonomy = $project_config['taxonomy'], $link = false, $nicename = false, $visited = array() );
2901
-
2902
- if(!is_object($category_path)){
2903
- $product_data['category_path'] = $category_path;
2904
- }
2905
 
2906
- if(isset($product_cat->name)) {
2907
- $catname = $product_cat->name;
2908
- $catlink = get_term_link($value,'product_cat');
2909
- }
2910
- } else {
2911
- $product_cat = get_term($value, 'product_cat');
2912
- $category_path = $this->woosea_get_term_parents( $product_cat->term_id, 'product_cat', $link = false, $project_taxonomy = $project_config['taxonomy'], $nicename = false, $visited = array() );
2913
- if(!is_object($category_path)){
2914
- $product_data['category_path'] = $category_path;
2915
- }
2916
-
2917
- if(isset($product_cat->name)) {
2918
- $catname_concat = $product_cat->name;
2919
- $catlink_concat = get_term_link($value,'product_cat');
2920
- }
2921
- $catname .= "||".$catname_concat;
2922
- $catlink .= "||".$catlink_concat;
2923
- }
2924
- }
2925
- }
2926
- $product_data['raw_categories'] = $catname;
2927
- } else {
2928
- foreach ($categories as $key => $value){
2929
- if (!$catname){
2930
- $product_cat = get_term($value, 'product_cat');
2931
-
2932
- if($product_cat->parent > 0){
2933
- $set_parent = $product_cat->parent;
2934
- }
2935
 
2936
- $category_path = $this->woosea_get_term_parents( $product_cat->term_id, 'product_cat', $link = false, $project_taxonomy = $project_config['taxonomy'], $nicename = false, $visited = array() );
 
2937
  if(!is_object($category_path)){
2938
- $product_data['category_path'] = $category_path;
2939
- }
2940
  if(isset($product_cat->name)) {
2941
- $catname = $product_cat->name;
2942
- $catlink = get_term_link($value,'product_cat');
2943
  }
2944
- } else {
2945
- $product_cat = get_term($value, 'product_cat');
2946
-
2947
- if($product_cat->parent > 0){
2948
- $category_path = $this->woosea_get_term_parents( $product_cat->term_id, 'product_cat', $link = false, $project_taxonomy = $project_config['taxonomy'], $nicename = false, $visited = array() );
2949
- if(!is_object($category_path)){
2950
- $product_data['category_path'] = $category_path;
2951
- }
2952
- if(isset($product_cat->name)) {
2953
- $catname_concat = $product_cat->name;
2954
- $catlink_concat = get_term_link($value,'product_cat');
2955
- }
2956
- $one_category = $catname_concat;
2957
- $catname .= "||".$catname_concat;
2958
- $catlink .= "||".$catlink_concat;
2959
- }
2960
- }
2961
  }
2962
  }
2963
  $product_data['raw_categories'] = $catname;
1887
  }
1888
 
1889
  // Check if the Yoast plugin is installed and active
1890
+ foreach ($categories as $key => $value){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1891
 
1892
+ if (!$catname){
1893
+ $product_cat = get_term($value, 'product_cat');
1894
 
1895
+ // Check if there are mother categories
1896
+ $parent_categories = get_ancestors($product_cat->term_id, 'product_cat');
1897
+ $category_path = $this->woosea_get_term_parents( $product_cat->term_id, 'product_cat', $link = false, $project_taxonomy = $project_config['taxonomy'], $nicename = false, $visited = array() );
1898
 
1899
+ if(!is_object($category_path)){
1900
+ $product_data['category_path'] = $category_path;
1901
+ }
1902
 
1903
+ foreach ($parent_categories as $category_id){
1904
+ $parent = get_term_by('id', $category_id, 'product_cat');
1905
+ $parent_name = $parent->name;
1906
+ }
1907
 
1908
+ if(isset($product_cat->name)) {
1909
+ $catname = $product_cat->name;
1910
+ $catlink = get_term_link($value,'product_cat');
1911
+ $one_category = $catname;
1912
+ }
1913
+ } else {
1914
+ $product_cat = get_term($value, 'product_cat');
1915
 
1916
+ $category_path = $this->woosea_get_term_parents( $product_cat->term_id, 'product_cat', $link = false, $project_taxonomy = $project_config['taxonomy'], $nicename = false, $visited = array() );
1917
+ if(!is_object($category_path)){
1918
+ $product_data['category_path'] = $category_path;
1919
+ }
1920
 
1921
+ // Check if there are mother categories
1922
+ $parent_categories = get_ancestors($product_cat->term_id, 'product_cat');
1923
 
1924
+ foreach ($parent_categories as $category_id){
1925
+ $parent = get_term_by('id', $category_id, 'product_cat');
1926
+ $parent_name = "||".$parent->name;
 
 
 
 
 
 
 
 
 
1927
  }
1928
+
1929
+ if(isset($product_cat->name)) {
1930
+ $catname_concat = $product_cat->name;
1931
+ $catlink_concat = get_term_link($value,'product_cat');
1932
+ }
1933
+ $one_category = $catname_concat;
1934
+ $catname .= "||".$catname_concat;
1935
+ $catlink .= "||".$catlink_concat;
1936
  }
1937
  }
1938
 
2773
  }
2774
 
2775
  // Check if the Yoast plugin is installed and active
2776
+ foreach ($categories as $key => $value){
2777
+ if (!$catname){
2778
+ $product_cat = get_term($value, 'product_cat');
2779
+
2780
+ if($product_cat->parent > 0){
2781
+ $set_parent = $product_cat->parent;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2782
  }
 
 
 
 
 
 
 
 
 
2783
 
2784
+ $category_path = $this->woosea_get_term_parents( $product_cat->term_id, 'product_cat', $link = false, $project_taxonomy = $project_config['taxonomy'], $nicename = false, $visited = array() );
2785
+ if(!is_object($category_path)){
2786
+ $product_data['category_path'] = $category_path;
2787
+ }
2788
+ if(isset($product_cat->name)) {
2789
+ $catname = $product_cat->name;
2790
+ $catlink = get_term_link($value,'product_cat');
2791
+ }
2792
+ } else {
2793
+ $product_cat = get_term($value, 'product_cat');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2794
 
2795
+ if($product_cat->parent > 0){
2796
+ $category_path = $this->woosea_get_term_parents( $product_cat->term_id, 'product_cat', $link = false, $project_taxonomy = $project_config['taxonomy'], $nicename = false, $visited = array() );
2797
  if(!is_object($category_path)){
2798
+ $product_data['category_path'] = $category_path;
2799
+ }
2800
  if(isset($product_cat->name)) {
2801
+ $catname_concat = $product_cat->name;
2802
+ $catlink_concat = get_term_link($value,'product_cat');
2803
  }
2804
+ $one_category = $catname_concat;
2805
+ $catname .= "||".$catname_concat;
2806
+ $catlink .= "||".$catlink_concat;
2807
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
2808
  }
2809
  }
2810
  $product_data['raw_categories'] = $catname;
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.2.9',
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.3.0',
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.2.9
9
 
10
  == Description ==
11
 
@@ -309,6 +309,9 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
309
 
310
  === Changelog ===
311
 
 
 
 
312
  = 7.2.9 (2020-01-23) =
313
  * Tested for compatibility WooCommerce 3.9
314
 
@@ -2312,6 +2315,9 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
2312
 
2313
  == Upgrade Notice ==
2314
 
 
 
 
2315
  = 7.2.9 =
2316
  Tested for compatibility WooCommerce 3.9
2317
 
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.3.0
9
 
10
  == Description ==
11
 
309
 
310
  === Changelog ===
311
 
312
+ = 7.3.0 (2020-01-25) =
313
+ * Filters on primary (Yoast) categories now also work on the non primary categories
314
+
315
  = 7.2.9 (2020-01-23) =
316
  * Tested for compatibility WooCommerce 3.9
317
 
2315
 
2316
  == Upgrade Notice ==
2317
 
2318
+ = 7.3.0 =
2319
+ Filters on primary (Yoast) categories now also work on the non primary categories
2320
+
2321
  = 7.2.9 =
2322
  Tested for compatibility WooCommerce 3.9
2323
 
woocommerce-sea.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Plugin Name: Product Feed PRO for WooCommerce
4
- * Version: 7.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, 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.2.9' );
52
  define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
53
  define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
54
 
@@ -3739,7 +3739,7 @@ function woosea_license_valid(){
3739
 
3740
  if(!empty($license_information['license_key'])){
3741
  $curl = curl_init();
3742
- $url = "https://www.adtribes.io/check/license.php?key=$license_information[license_key]&email=$license_information[license_email]&domain=$domain&version=7.2.9";
3743
 
3744
  curl_setopt_array($curl, array(
3745
  CURLOPT_RETURNTRANSFER => 1,
1
  <?php
2
  /**
3
  * Plugin Name: Product Feed PRO for WooCommerce
4
+ * Version: 7.3.0
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.3.0' );
52
  define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
53
  define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
54
 
3739
 
3740
  if(!empty($license_information['license_key'])){
3741
  $curl = curl_init();
3742
+ $url = "https://www.adtribes.io/check/license.php?key=$license_information[license_key]&email=$license_information[license_email]&domain=$domain&version=7.3.0";
3743
 
3744
  curl_setopt_array($curl, array(
3745
  CURLOPT_RETURNTRANSFER => 1,