Product Feed PRO for WooCommerce - Version 7.6.3

Version Description

Fixed a conflict between the Yoast SEO WooCommerce plugin and our plugin with regards to the AggregateRating JSON-LD

Download this release

Release Info

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

Code changes from version 7.6.2 to 7.6.3

Files changed (3) hide show
  1. js/woosea_key.js +1 -1
  2. readme.txt +7 -1
  3. woocommerce-sea.php +59 -67
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.6.2',
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.6.3',
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.6.2
9
 
10
  == Description ==
11
 
@@ -312,6 +312,9 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
312
 
313
  === Changelog ===
314
 
 
 
 
315
  = 7.6.2 (2020-03-02) =
316
  * Fixed a minor WPML currency switcher issue
317
 
@@ -2426,6 +2429,9 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
2426
 
2427
  == Upgrade Notice ==
2428
 
 
 
 
2429
  = 7.6.2 =
2430
  * Fixed a minor WPML currency switcher issue
2431
 
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.6.3
9
 
10
  == Description ==
11
 
312
 
313
  === Changelog ===
314
 
315
+ = 7.6.3 (2020-03-02) =
316
+ * Fixed a conflict between the Yoast SEO WooCommerce plugin and our plugin with regards to the AggregateRating JSON-LD
317
+
318
  = 7.6.2 (2020-03-02) =
319
  * Fixed a minor WPML currency switcher issue
320
 
2429
 
2430
  == Upgrade Notice ==
2431
 
2432
+ = 7.6.3 =
2433
+ Fixed a conflict between the Yoast SEO WooCommerce plugin and our plugin with regards to the AggregateRating JSON-LD
2434
+
2435
  = 7.6.2 =
2436
  * Fixed a minor WPML currency switcher issue
2437
 
woocommerce-sea.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Plugin Name: Product Feed PRO for WooCommerce
4
- * Version: 7.6.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,7 +48,7 @@ if (!defined('ABSPATH')) {
48
  * Plugin versionnumber, please do not override.
49
  * Define some constants
50
  */
51
- define( 'WOOCOMMERCESEA_PLUGIN_VERSION', '7.6.2' );
52
  define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
53
  define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
54
 
@@ -1424,7 +1424,7 @@ function woosea_product_delete_meta_price( $product = null ) {
1424
 
1425
  }
1426
  } else {
1427
- // Workaround for price caching issues
1428
  // By default show prices including tax
1429
  $product_price = wc_get_price_including_tax($product);
1430
 
@@ -1544,17 +1544,6 @@ function woosea_product_delete_meta_price( $product = null ) {
1544
  }
1545
  //add_filter( 'woocommerce_structured_data_product_offer', 'woosea_product_delete_meta_price', 1000, 1 );
1546
 
1547
- /**
1548
- * Check if Yoast SEO WooCommerce plugin is enabled
1549
- * If so, remove their product schema filter as it breaks ours
1550
- */
1551
- function woosea_check_for_yoast_woocommerce(){
1552
- if ( class_exists( 'WPSEO_WooCommerce_Schema' ) ) {
1553
- // When neded we will use this function to remove pieces of Yoast's code
1554
- }
1555
- }
1556
- add_action('plugins_loaded', 'woosea_check_for_yoast_woocommerce');
1557
-
1558
 
1559
  /**
1560
  * Fix the WooCommerce schema markup bug for variation prices
@@ -1651,7 +1640,7 @@ function woosea_product_fix_structured_data( $product = null ) {
1651
  }
1652
 
1653
  // Get the offers structured data schema markup
1654
- $markup['offers'] = woosea_product_delete_meta_price($product);
1655
 
1656
  if ( $product->get_rating_count() && wc_review_ratings_enabled() ) {
1657
  $markup['aggregateRating'] = array(
@@ -1738,9 +1727,9 @@ function woosea_product_fix_structured_data( $product = null ) {
1738
  }
1739
 
1740
  // Get the offers structured data schema markup
1741
- $markup['offers'] = woosea_product_delete_meta_price($product);
1742
 
1743
- if(!class_exists('WPSEO_WooCommerce_Schema')){
1744
  if ( $product->get_rating_count() && wc_review_ratings_enabled() ) {
1745
  $markup['aggregateRating'] = array(
1746
  '@type' => 'AggregateRating',
@@ -1787,8 +1776,7 @@ function woosea_product_fix_structured_data( $product = null ) {
1787
  }
1788
  }
1789
  }
1790
- }
1791
-
1792
  }
1793
  } else {
1794
  // Structured data fix is not enabled
@@ -1813,58 +1801,62 @@ function woosea_product_fix_structured_data( $product = null ) {
1813
  }
1814
 
1815
  // Get the offers structured data schema markup
1816
- $markup['offers'] = woosea_product_delete_meta_price($product);
1817
-
1818
- if ( $product->get_rating_count() && wc_review_ratings_enabled() ) {
1819
- $markup['aggregateRating'] = array(
1820
- '@type' => 'AggregateRating',
1821
- 'ratingValue' => $product->get_average_rating(),
1822
- 'reviewCount' => $product->get_review_count(),
1823
- );
1824
-
1825
- // Markup 5 most recent rating/review.
1826
- $comments = get_comments(
1827
- array(
1828
- 'number' => 5,
1829
- 'post_id' => $product->get_id(),
1830
- 'status' => 'approve',
1831
- 'post_status' => 'publish',
1832
- 'post_type' => 'product',
1833
- 'parent' => 0,
1834
- 'meta_query' => array( // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query
1835
- array(
1836
- 'key' => 'rating',
1837
- 'type' => 'NUMERIC',
1838
- 'compare' => '>',
1839
- 'value' => 0,
1840
- ),
1841
- ),
1842
- )
1843
- );
1844
-
1845
- if ( $comments ) {
1846
- $markup['review'] = array();
1847
- foreach ( $comments as $comment ) {
1848
- $markup['review'][] = array(
1849
- '@type' => 'Review',
1850
- 'reviewRating' => array(
1851
- '@type' => 'Rating',
1852
- 'ratingValue' => get_comment_meta( $comment->comment_ID, 'rating', true ),
1853
- ),
1854
- 'author' => array(
1855
- '@type' => 'Person',
1856
- 'name' => get_comment_author( $comment ),
1857
- ),
1858
- 'reviewBody' => get_comment_text( $comment ),
1859
- 'datePublished' => get_comment_date( 'c', $comment ),
1860
- );
 
 
 
 
1861
  }
1862
  }
1863
- }
1864
  }
1865
  return $markup;
1866
  }
1867
- add_filter( 'woocommerce_structured_data_product', 'woosea_product_fix_structured_data', 11, 2 );
1868
 
1869
  /**
1870
  * Get the shipping zone countries and ID's
@@ -4158,7 +4150,7 @@ function woosea_license_valid(){
4158
 
4159
  if(!empty($license_information['license_key'])){
4160
  $curl = curl_init();
4161
- $url = "https://www.adtribes.io/check/license.php?key=$license_information[license_key]&email=$license_information[license_email]&domain=$domain&version=7.6.2";
4162
 
4163
  curl_setopt_array($curl, array(
4164
  CURLOPT_RETURNTRANSFER => 1,
1
  <?php
2
  /**
3
  * Plugin Name: Product Feed PRO for WooCommerce
4
+ * Version: 7.6.3
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.6.3' );
52
  define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
53
  define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
54
 
1424
 
1425
  }
1426
  } else {
1427
+ // This is a simple product
1428
  // By default show prices including tax
1429
  $product_price = wc_get_price_including_tax($product);
1430
 
1544
  }
1545
  //add_filter( 'woocommerce_structured_data_product_offer', 'woosea_product_delete_meta_price', 1000, 1 );
1546
 
 
 
 
 
 
 
 
 
 
 
 
1547
 
1548
  /**
1549
  * Fix the WooCommerce schema markup bug for variation prices
1640
  }
1641
 
1642
  // Get the offers structured data schema markup
1643
+ $markup['offers'][0] = woosea_product_delete_meta_price($product);
1644
 
1645
  if ( $product->get_rating_count() && wc_review_ratings_enabled() ) {
1646
  $markup['aggregateRating'] = array(
1727
  }
1728
 
1729
  // Get the offers structured data schema markup
1730
+ $markup['offers'][0] = woosea_product_delete_meta_price($product);
1731
 
1732
+ // if(!class_exists('WPSEO_WooCommerce_Schema')){
1733
  if ( $product->get_rating_count() && wc_review_ratings_enabled() ) {
1734
  $markup['aggregateRating'] = array(
1735
  '@type' => 'AggregateRating',
1776
  }
1777
  }
1778
  }
1779
+ // }
 
1780
  }
1781
  } else {
1782
  // Structured data fix is not enabled
1801
  }
1802
 
1803
  // Get the offers structured data schema markup
1804
+ $markup['offers'][0] = woosea_product_delete_meta_price($product);
1805
+
1806
+ // Check if Yoast SEO WooCommerce plugin is enabled
1807
+ // if(!class_exists('WPSEO_WooCommerce_Schema')){
1808
+
1809
+ if ( $product->get_rating_count() && wc_review_ratings_enabled() ) {
1810
+ $markup['aggregateRating'] = array(
1811
+ '@type' => 'AggregateRating',
1812
+ 'ratingValue' => $product->get_average_rating(),
1813
+ 'reviewCount' => $product->get_review_count(),
1814
+ );
1815
+
1816
+ // Markup 5 most recent rating/review.
1817
+ $comments = get_comments(
1818
+ array(
1819
+ 'number' => 5,
1820
+ 'post_id' => $product->get_id(),
1821
+ 'status' => 'approve',
1822
+ 'post_status' => 'publish',
1823
+ 'post_type' => 'product',
1824
+ 'parent' => 0,
1825
+ 'meta_query' => array( // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query
1826
+ array(
1827
+ 'key' => 'rating',
1828
+ 'type' => 'NUMERIC',
1829
+ 'compare' => '>',
1830
+ 'value' => 0,
1831
+ ),
1832
+ ),
1833
+ )
1834
+ );
1835
+
1836
+ if ( $comments ) {
1837
+ $markup['review'] = array();
1838
+ foreach ( $comments as $comment ) {
1839
+ $markup['review'][] = array(
1840
+ '@type' => 'Review',
1841
+ 'reviewRating' => array(
1842
+ '@type' => 'Rating',
1843
+ 'ratingValue' => get_comment_meta( $comment->comment_ID, 'rating', true ),
1844
+ ),
1845
+ 'author' => array(
1846
+ '@type' => 'Person',
1847
+ 'name' => get_comment_author( $comment ),
1848
+ ),
1849
+ 'reviewBody' => get_comment_text( $comment ),
1850
+ 'datePublished' => get_comment_date( 'c', $comment ),
1851
+ );
1852
+ }
1853
  }
1854
  }
1855
+ //}
1856
  }
1857
  return $markup;
1858
  }
1859
+ add_filter( 'woocommerce_structured_data_product', 'woosea_product_fix_structured_data', 9, 2 );
1860
 
1861
  /**
1862
  * Get the shipping zone countries and ID's
4150
 
4151
  if(!empty($license_information['license_key'])){
4152
  $curl = curl_init();
4153
+ $url = "https://www.adtribes.io/check/license.php?key=$license_information[license_key]&email=$license_information[license_email]&domain=$domain&version=7.6.3";
4154
 
4155
  curl_setopt_array($curl, array(
4156
  CURLOPT_RETURNTRANSFER => 1,