Product Feed PRO for WooCommerce - Version 9.2.8

Version Description

Added a discount percentage attribute calculating the percentage discount between the sale and regular price

Download this release

Release Info

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

Code changes from version 9.2.7 to 9.2.8

classes/class-attributes.php CHANGED
@@ -234,6 +234,7 @@ public function get_mapping_attributes_dropdown() {
234
  "vivino_sale_price" => "Pinterest / Vivino sale price",
235
  "vivino_regular_price" => "Pinterest / Vivino regular price",
236
  "non_geo_wcml_price" => "Non GEO WCML price",
 
237
  "link" => "Link",
238
  "variable_link" => "Product variable link",
239
  "add_to_cart_link" => "Add to cart link",
@@ -453,7 +454,8 @@ public function get_mapping_attributes_dropdown() {
453
  "vivino_sale_price" => "Pinterest / Vivino sale price",
454
  "vivino_regular_price" => "Pinterest / Vivino regular price",
455
  "non_geo_wcml_price" => "Non GEO WCML price",
456
- "item_group_id" => "Item group ID",
 
457
  "weight" => "Weight",
458
  "width" => "Width",
459
  "height" => "Height",
234
  "vivino_sale_price" => "Pinterest / Vivino sale price",
235
  "vivino_regular_price" => "Pinterest / Vivino regular price",
236
  "non_geo_wcml_price" => "Non GEO WCML price",
237
+ "discount_percentage" => "Discount percentage",
238
  "link" => "Link",
239
  "variable_link" => "Product variable link",
240
  "add_to_cart_link" => "Add to cart link",
454
  "vivino_sale_price" => "Pinterest / Vivino sale price",
455
  "vivino_regular_price" => "Pinterest / Vivino regular price",
456
  "non_geo_wcml_price" => "Non GEO WCML price",
457
+ "discount_percentage" => "Discount percentage",
458
+ "item_group_id" => "Item group ID",
459
  "weight" => "Weight",
460
  "width" => "Width",
461
  "height" => "Height",
classes/class-get-products.php CHANGED
@@ -2705,6 +2705,11 @@ class WooSEA_Get_Products {
2705
  $product_data['rounded_regular_price'] = round($product_data['regular_price']);
2706
  $product_data['rounded_sale_price'] = round($product_data['sale_price']);
2707
 
 
 
 
 
 
2708
  foreach($project_config['attributes'] as $attr_key => $attr_arr){
2709
  if(is_array($attr_arr)){
2710
  if($attr_arr['attribute'] == "g:shipping"){
@@ -2997,7 +3002,6 @@ class WooSEA_Get_Products {
2997
  $variation_pass = "true";
2998
 
2999
  if( ($product_data['item_group_id'] > 0) AND (is_object(wc_get_product( $product_data['item_group_id']))) AND (($product_data['product_type'] == "variation") OR ($product_data['product_type'] == "subscription_variation"))){
3000
-
3001
  $product_variations = new WC_Product_Variation( $product_data['id'] );
3002
  $variations = $product_variations->get_variation_attributes();
3003
 
2705
  $product_data['rounded_regular_price'] = round($product_data['regular_price']);
2706
  $product_data['rounded_sale_price'] = round($product_data['sale_price']);
2707
 
2708
+ // Calculate discount percentage
2709
+ if($product_data['sale_price'] > 0){
2710
+ $product_data['discount_percentage'] = round(100-(((float)$product_data['sale_price']/(float)$product_data['regular_price'])*100),2);
2711
+ }
2712
+
2713
  foreach($project_config['attributes'] as $attr_key => $attr_arr){
2714
  if(is_array($attr_arr)){
2715
  if($attr_arr['attribute'] == "g:shipping"){
3002
  $variation_pass = "true";
3003
 
3004
  if( ($product_data['item_group_id'] > 0) AND (is_object(wc_get_product( $product_data['item_group_id']))) AND (($product_data['product_type'] == "variation") OR ($product_data['product_type'] == "subscription_variation"))){
 
3005
  $product_variations = new WC_Product_Variation( $product_data['id'] );
3006
  $variations = $product_variations->get_variation_attributes();
3007
 
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=9.2.7',
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=9.2.8',
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.6
8
- Stable tag: 9.2.7
9
 
10
  == Description ==
11
 
@@ -321,6 +321,9 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
321
 
322
  === Changelog ===
323
 
 
 
 
324
  = 9.2.7 (2020-12-18) =
325
  * Fixed an issue for Skroutz feeds where the lowest priced variation feature was not working
326
 
@@ -2957,6 +2960,9 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
2957
 
2958
  == Upgrade Notice ==
2959
 
 
 
 
2960
  = 9.2.7 =
2961
  Fixed an issue for Skroutz feeds where the lowest priced variation feature was not working
2962
 
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.6
8
+ Stable tag: 9.2.8
9
 
10
  == Description ==
11
 
321
 
322
  === Changelog ===
323
 
324
+ = 9.2.8 (2020-12-21) =
325
+ * Added a discount percentage attribute calculating the percentage discount between the sale and regular price
326
+
327
  = 9.2.7 (2020-12-18) =
328
  * Fixed an issue for Skroutz feeds where the lowest priced variation feature was not working
329
 
2960
 
2961
  == Upgrade Notice ==
2962
 
2963
+ = 9.2.8 =
2964
+ Added a discount percentage attribute calculating the percentage discount between the sale and regular price
2965
+
2966
  = 9.2.7 =
2967
  Fixed an issue for Skroutz feeds where the lowest priced variation feature was not working
2968
 
woocommerce-sea.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Plugin Name: Product Feed PRO for WooCommerce
4
- * Version: 9.2.7
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', '9.2.7' );
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: 9.2.8
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', '9.2.8' );
52
  define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
53
  define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
54