Product Feed PRO for WooCommerce - Version 7.6.2

Version Description

  • Fixed a minor WPML currency switcher issue
Download this release

Release Info

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

Code changes from version 7.6.1 to 7.6.2

TODO.txt CHANGED
@@ -6,6 +6,7 @@ Tutorial / Blog posts:
6
 
7
  Priority issues:
8
  - Make category path primary (Yoast) category
 
9
  - Change XML header for Elite users (so it doesn't say its free for example)
10
  - Make extra woosea fields available for front-end usage
11
  - Only update feed when changes to products have been made
6
 
7
  Priority issues:
8
  - Make category path primary (Yoast) category
9
+ - Add possibility to copy feed configuration from one WooCommerce instance to the other instance
10
  - Change XML header for Elite users (so it doesn't say its free for example)
11
  - Make extra woosea fields available for front-end usage
12
  - Only update feed when changes to products have been made
classes/class-get-products.php CHANGED
@@ -724,7 +724,8 @@ class WooSEA_Get_Products {
724
 
725
  // Do we need to convert the shipping costs with the Aelia Currency Switcher
726
  if((isset($project_config['AELIA'])) AND (!empty($GLOBALS['woocommerce-aelia-currencyswitcher'])) AND (get_option ('add_aelia_support') == "yes")){
727
- if(!array_key_exists('base_currency', $project_config)){
 
728
  $from_currency = get_woocommerce_currency();
729
  } else {
730
  $from_currency = $project_config['base_currency'];
@@ -1894,13 +1895,15 @@ class WooSEA_Get_Products {
1894
  $product_data['add_to_cart_link'] = get_site_url()."/shop/?add-to-cart=".$product_data['id'];
1895
 
1896
  // Get product creation date
1897
- $product_data['product_creation_date'] = $product->get_date_created()->format('Y-m-d');
1898
- $today_date = date('Y-m-d');
1899
- $diff = abs(strtotime($today_date) - strtotime($product_data['product_creation_date']));
1900
- $diff_years = floor($diff / (365*60*60*24));
1901
- $diff_months = floor(($diff - $diff_years * 365*60*60*24) / (30*60*60*24));
1902
- $diff_days = floor(($diff - $diff_years * 365*60*60*24 - $diff_months*30*60*60*24)/ (60*60*24));
1903
- $product_data['days_back_created'] = $diff_days;
 
 
1904
 
1905
  // Start product visibility logic
1906
  $product_data['exclude_from_catalog'] = "no";
@@ -2302,10 +2305,14 @@ class WooSEA_Get_Products {
2302
  } else {
2303
  $from_currency = $project_config['base_currency'];
2304
  }
2305
-
2306
  //$set_country_base = add_filter('wc_aelia_cs_selected_currency', 'SEK', 0);
2307
  //$product_data['price'] = apply_filters('wc_aelia_cs_convert', $product_data['price'], $from_currency, $project_config['AELIA']);
2308
- $product_data['price'] = do_shortcode('[aelia_cs_product_price product_id="'.$product_data['id'].'" formatted="0" currency="'.$project_config['AELIA'].'"]');
 
 
 
 
 
2309
  $product_data['regular_price'] = apply_filters('wc_aelia_cs_convert', $product_data['regular_price'], $from_currency, $project_config['AELIA']);
2310
  $product_data['sale_price'] = apply_filters('wc_aelia_cs_convert', $product_data['sale_price'], $from_currency, $project_config['AELIA']);
2311
 
724
 
725
  // Do we need to convert the shipping costs with the Aelia Currency Switcher
726
  if((isset($project_config['AELIA'])) AND (!empty($GLOBALS['woocommerce-aelia-currencyswitcher'])) AND (get_option ('add_aelia_support') == "yes")){
727
+
728
+ if(!array_key_exists('base_currency', $project_config)){
729
  $from_currency = get_woocommerce_currency();
730
  } else {
731
  $from_currency = $project_config['base_currency'];
1895
  $product_data['add_to_cart_link'] = get_site_url()."/shop/?add-to-cart=".$product_data['id'];
1896
 
1897
  // Get product creation date
1898
+ if(!empty( $product->get_date_created() )){
1899
+ $product_data['product_creation_date'] = $product->get_date_created()->format('Y-m-d');
1900
+ $today_date = date('Y-m-d');
1901
+ $diff = abs(strtotime($today_date) - strtotime($product_data['product_creation_date']));
1902
+ $diff_years = floor($diff / (365*60*60*24));
1903
+ $diff_months = floor(($diff - $diff_years * 365*60*60*24) / (30*60*60*24));
1904
+ $diff_days = floor(($diff - $diff_years * 365*60*60*24 - $diff_months*30*60*60*24)/ (60*60*24));
1905
+ $product_data['days_back_created'] = $diff_days;
1906
+ }
1907
 
1908
  // Start product visibility logic
1909
  $product_data['exclude_from_catalog'] = "no";
2305
  } else {
2306
  $from_currency = $project_config['base_currency'];
2307
  }
 
2308
  //$set_country_base = add_filter('wc_aelia_cs_selected_currency', 'SEK', 0);
2309
  //$product_data['price'] = apply_filters('wc_aelia_cs_convert', $product_data['price'], $from_currency, $project_config['AELIA']);
2310
+ //$product_data['regular_price'] = apply_filters('wc_aelia_cs_convert', $product_data['regular_price'], $from_currency, $project_config['AELIA']);
2311
+ //$product_data['sale_price'] = apply_filters('wc_aelia_cs_convert', $product_data['sale_price'], $from_currency, $project_config['AELIA']);
2312
+
2313
+ //$product_data['price'] = do_shortcode('[aelia_cs_product_price product_id="'.$product_data['id'].'" formatted="0" currency="'.$project_config['AELIA'].'"]');
2314
+
2315
+ $product_data['price'] = apply_filters('wc_aelia_cs_convert', $product_data['price'], $from_currency, $project_config['AELIA']);
2316
  $product_data['regular_price'] = apply_filters('wc_aelia_cs_convert', $product_data['regular_price'], $from_currency, $project_config['AELIA']);
2317
  $product_data['sale_price'] = apply_filters('wc_aelia_cs_convert', $product_data['sale_price'], $from_currency, $project_config['AELIA']);
2318
 
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.0',
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.2',
31
  jsonp: 'callback',
32
  dataType: 'jsonp',
33
  type: 'GET',
pages/admin/woosea-generate-feed-step-0.php CHANGED
@@ -218,7 +218,7 @@ if (array_key_exists('project_hash', $_GET)){
218
  print "<tr>";
219
  print "<td><span>WCML Currency:</span></td>";
220
  print "<td>";
221
- print "<select name=\"WPML\" disabled>";
222
  foreach ($wcml_currencies as $key => $value){
223
  if($value == $project['WCML']){
224
  print "<option value=\"$value\" selected>$value</option>";
218
  print "<tr>";
219
  print "<td><span>WCML Currency:</span></td>";
220
  print "<td>";
221
+ print "<select name=\"WCML\" disabled>";
222
  foreach ($wcml_currencies as $key => $value){
223
  if($value == $project['WCML']){
224
  print "<option value=\"$value\" selected>$value</option>";
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.1
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.1 (2020-03-01) =
316
  * Added product days back created attribute. You can now create filters which enable you to only have the latest products in your feed.
317
 
@@ -2423,6 +2426,9 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
2423
 
2424
  == Upgrade Notice ==
2425
 
 
 
 
2426
  = 7.6.1 =
2427
  Added product days back created attribute. You can now create filters which enable you to only have the latest products in your feed.
2428
 
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
 
313
  === Changelog ===
314
 
315
+ = 7.6.2 (2020-03-02) =
316
+ * Fixed a minor WPML currency switcher issue
317
+
318
  = 7.6.1 (2020-03-01) =
319
  * Added product days back created attribute. You can now create filters which enable you to only have the latest products in your feed.
320
 
2426
 
2427
  == Upgrade Notice ==
2428
 
2429
+ = 7.6.2 =
2430
+ * Fixed a minor WPML currency switcher issue
2431
+
2432
  = 7.6.1 =
2433
  Added product days back created attribute. You can now create filters which enable you to only have the latest products in your feed.
2434
 
woocommerce-sea.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Plugin Name: Product Feed PRO for WooCommerce
4
- * Version: 7.6.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', '7.6.1' );
52
  define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
53
  define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
54
 
@@ -1449,6 +1449,7 @@ function woosea_product_delete_meta_price( $product = null ) {
1449
  'priceValidUntil' => $price_valid_until,
1450
  'priceCurrency' => $shop_currency,
1451
  'priceSpecification' => array(
 
1452
  'price' => $product_price,
1453
  'priceCurrency' => $shop_currency,
1454
  'valueAddedTaxIncluded' => wc_prices_include_tax() ? 'true' : 'false',
@@ -1649,6 +1650,9 @@ function woosea_product_fix_structured_data( $product = null ) {
1649
  $markup['sku'] = $variable_product->get_id();
1650
  }
1651
 
 
 
 
1652
  if ( $product->get_rating_count() && wc_review_ratings_enabled() ) {
1653
  $markup['aggregateRating'] = array(
1654
  '@type' => 'AggregateRating',
@@ -1733,49 +1737,54 @@ function woosea_product_fix_structured_data( $product = null ) {
1733
  $markup['sku'] = $product->get_id();
1734
  }
1735
 
1736
- if ( $product->get_rating_count() && wc_review_ratings_enabled() ) {
1737
- $markup['aggregateRating'] = array(
1738
- '@type' => 'AggregateRating',
1739
- 'ratingValue' => $product->get_average_rating(),
1740
- 'reviewCount' => $product->get_review_count(),
1741
- );
1742
-
1743
- // Markup 5 most recent rating/review.
1744
- $comments = get_comments(
1745
- array(
1746
- 'number' => 5,
1747
- 'post_id' => $product->get_id(),
1748
- 'status' => 'approve',
1749
- 'post_status' => 'publish',
1750
- 'post_type' => 'product',
1751
- 'parent' => 0,
1752
- 'meta_query' => array( // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query
1753
- array(
1754
- 'key' => 'rating',
1755
- 'type' => 'NUMERIC',
1756
- 'compare' => '>',
1757
- 'value' => 0,
1758
- ),
1759
- ),
1760
- )
1761
- );
1762
-
1763
- if ( $comments ) {
1764
- $markup['review'] = array();
1765
- foreach ( $comments as $comment ) {
1766
- $markup['review'][] = array(
1767
- '@type' => 'Review',
1768
- 'reviewRating' => array(
1769
- '@type' => 'Rating',
1770
- 'ratingValue' => get_comment_meta( $comment->comment_ID, 'rating', true ),
1771
- ),
1772
- 'author' => array(
1773
- '@type' => 'Person',
1774
- 'name' => get_comment_author( $comment ),
1775
- ),
1776
- 'reviewBody' => get_comment_text( $comment ),
1777
- 'datePublished' => get_comment_date( 'c', $comment ),
1778
- );
 
 
 
 
 
1779
  }
1780
  }
1781
  }
@@ -1802,60 +1811,60 @@ function woosea_product_fix_structured_data( $product = null ) {
1802
  } else {
1803
  $markup['sku'] = $product->get_id();
1804
  }
1805
- }
1806
 
1807
- // Get the offers structured data schema markup
1808
- $markup['offers'] = woosea_product_delete_meta_price($product);
1809
 
1810
- if ( $product->get_rating_count() && wc_review_ratings_enabled() ) {
1811
- $markup['aggregateRating'] = array(
1812
- '@type' => 'AggregateRating',
1813
- 'ratingValue' => $product->get_average_rating(),
1814
- 'reviewCount' => $product->get_review_count(),
1815
- );
1816
 
1817
- // Markup 5 most recent rating/review.
1818
- $comments = get_comments(
1819
- array(
1820
- 'number' => 5,
1821
- 'post_id' => $product->get_id(),
1822
- 'status' => 'approve',
1823
- 'post_status' => 'publish',
1824
- 'post_type' => 'product',
1825
- 'parent' => 0,
1826
- 'meta_query' => array( // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query
1827
- array(
1828
- 'key' => 'rating',
1829
- 'type' => 'NUMERIC',
1830
- 'compare' => '>',
1831
- 'value' => 0,
1832
- ),
1833
- ),
1834
- )
1835
- );
1836
-
1837
- if ( $comments ) {
1838
- $markup['review'] = array();
1839
- foreach ( $comments as $comment ) {
1840
- $markup['review'][] = array(
1841
- '@type' => 'Review',
1842
- 'reviewRating' => array(
1843
- '@type' => 'Rating',
1844
- 'ratingValue' => get_comment_meta( $comment->comment_ID, 'rating', true ),
1845
- ),
1846
- 'author' => array(
1847
- '@type' => 'Person',
1848
- 'name' => get_comment_author( $comment ),
1849
- ),
1850
- 'reviewBody' => get_comment_text( $comment ),
1851
- 'datePublished' => get_comment_date( 'c', $comment ),
1852
- );
1853
- }
1854
- }
 
1855
  }
1856
  return $markup;
1857
  }
1858
- add_filter( 'woocommerce_structured_data_product', 'woosea_product_fix_structured_data', 2000, 2 );
1859
 
1860
  /**
1861
  * Get the shipping zone countries and ID's
@@ -4149,7 +4158,7 @@ function woosea_license_valid(){
4149
 
4150
  if(!empty($license_information['license_key'])){
4151
  $curl = curl_init();
4152
- $url = "https://www.adtribes.io/check/license.php?key=$license_information[license_key]&email=$license_information[license_email]&domain=$domain&version=7.6.1";
4153
 
4154
  curl_setopt_array($curl, array(
4155
  CURLOPT_RETURNTRANSFER => 1,
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
  * 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
 
1449
  'priceValidUntil' => $price_valid_until,
1450
  'priceCurrency' => $shop_currency,
1451
  'priceSpecification' => array(
1452
+ '@type' => 'PriceSpecification',
1453
  'price' => $product_price,
1454
  'priceCurrency' => $shop_currency,
1455
  'valueAddedTaxIncluded' => wc_prices_include_tax() ? 'true' : 'false',
1650
  $markup['sku'] = $variable_product->get_id();
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(
1658
  '@type' => 'AggregateRating',
1737
  $markup['sku'] = $product->get_id();
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',
1747
+ 'ratingValue' => $product->get_average_rating(),
1748
+ 'reviewCount' => $product->get_review_count(),
1749
+ );
1750
+
1751
+ // Markup 5 most recent rating/review.
1752
+ $comments = get_comments(
1753
+ array(
1754
+ 'number' => 5,
1755
+ 'post_id' => $product->get_id(),
1756
+ 'status' => 'approve',
1757
+ 'post_status' => 'publish',
1758
+ 'post_type' => 'product',
1759
+ 'parent' => 0,
1760
+ 'meta_query' => array( // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query
1761
+ array(
1762
+ 'key' => 'rating',
1763
+ 'type' => 'NUMERIC',
1764
+ 'compare' => '>',
1765
+ 'value' => 0,
1766
+ ),
1767
+ ),
1768
+ )
1769
+ );
1770
+
1771
+ if ( $comments ) {
1772
+ $markup['review'] = array();
1773
+ foreach ( $comments as $comment ) {
1774
+ $markup['review'][] = array(
1775
+ '@type' => 'Review',
1776
+ 'reviewRating' => array(
1777
+ '@type' => 'Rating',
1778
+ 'ratingValue' => get_comment_meta( $comment->comment_ID, 'rating', true ),
1779
+ ),
1780
+ 'author' => array(
1781
+ '@type' => 'Person',
1782
+ 'name' => get_comment_author( $comment ),
1783
+ ),
1784
+ 'reviewBody' => get_comment_text( $comment ),
1785
+ 'datePublished' => get_comment_date( 'c', $comment ),
1786
+ );
1787
+ }
1788
  }
1789
  }
1790
  }
1811
  } else {
1812
  $markup['sku'] = $product->get_id();
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
 
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,