Version Description
Solved a rounding issue for discount calculations on products that use a point as seperator
Download this release
Release Info
Developer | jorisverwater |
Plugin | Product Feed PRO for WooCommerce |
Version | 11.0.4 |
Comparing to | |
See all releases |
Code changes from version 11.0.3 to 11.0.4
- classes/class-get-products.php +15 -11
- js/woosea_key.js +1 -1
- readme.txt +7 -1
- woocommerce-sea.php +2 -2
classes/class-get-products.php
CHANGED
@@ -3109,15 +3109,17 @@ class WooSEA_Get_Products {
|
|
3109 |
$product_data['rounded_sale_price'] = round(number_format($float_sale_price, 2, '.', ''));
|
3110 |
}
|
3111 |
} else {
|
3112 |
-
|
3113 |
-
|
3114 |
-
|
|
|
|
|
3115 |
}
|
3116 |
|
3117 |
// Calculate discount percentage
|
3118 |
if(isset($product_data['rounded_sale_price'])){
|
3119 |
if($product_data['rounded_regular_price'] > 0){
|
3120 |
-
$disc = round(($product_data['rounded_sale_price'] * 100) / $product_data['rounded_regular_price'],
|
3121 |
$product_data['discount_percentage'] = 100-$disc;
|
3122 |
//$product_data['discount_percentage'] = round(100-(($product_data['sale_price']/$product_data['regular_price'])*100),2);
|
3123 |
}
|
@@ -4144,7 +4146,7 @@ class WooSEA_Get_Products {
|
|
4144 |
|
4145 |
foreach($variations_id as $var_id){
|
4146 |
$clr_variation = get_post_meta( $var_id, "attribute_".$clr_attribute, true );
|
4147 |
-
if ($sz_attribute) {
|
4148 |
$size_variation = get_post_meta( $var_id, "attribute_".$sz_attribute, true );
|
4149 |
}
|
4150 |
$stock_variation = get_post_meta( $var_id, "_stock_status", true );
|
@@ -4152,12 +4154,14 @@ class WooSEA_Get_Products {
|
|
4152 |
if($clr_variation == $clr_attr_value){
|
4153 |
if($stock_variation == "outofstock"){
|
4154 |
// Remove this size as it is not on stock
|
4155 |
-
if(
|
4156 |
-
$
|
4157 |
-
|
4158 |
-
|
4159 |
-
|
4160 |
-
|
|
|
|
|
4161 |
} else {
|
4162 |
// Add comma's in the size field and put availability on stock as at least one variation is on stock
|
4163 |
if(isset($size_variation)){
|
3109 |
$product_data['rounded_sale_price'] = round(number_format($float_sale_price, 2, '.', ''));
|
3110 |
}
|
3111 |
} else {
|
3112 |
+
//$product_data['rounded_price'] = round($float_price,0);
|
3113 |
+
//$product_data['rounded_regular_price'] = (string) round($float_regular_price,0);
|
3114 |
+
//$product_data['rounded_sale_price'] = round($float_sale_price,0);
|
3115 |
+
$product_data['rounded_regular_price'] = $float_regular_price;
|
3116 |
+
$product_data['rounded_sale_price'] = $float_sale_price;
|
3117 |
}
|
3118 |
|
3119 |
// Calculate discount percentage
|
3120 |
if(isset($product_data['rounded_sale_price'])){
|
3121 |
if($product_data['rounded_regular_price'] > 0){
|
3122 |
+
$disc = round(($product_data['rounded_sale_price'] * 100) / $product_data['rounded_regular_price'], 0);
|
3123 |
$product_data['discount_percentage'] = 100-$disc;
|
3124 |
//$product_data['discount_percentage'] = round(100-(($product_data['sale_price']/$product_data['regular_price'])*100),2);
|
3125 |
}
|
4146 |
|
4147 |
foreach($variations_id as $var_id){
|
4148 |
$clr_variation = get_post_meta( $var_id, "attribute_".$clr_attribute, true );
|
4149 |
+
if (isset($sz_attribute)) {
|
4150 |
$size_variation = get_post_meta( $var_id, "attribute_".$sz_attribute, true );
|
4151 |
}
|
4152 |
$stock_variation = get_post_meta( $var_id, "_stock_status", true );
|
4154 |
if($clr_variation == $clr_attr_value){
|
4155 |
if($stock_variation == "outofstock"){
|
4156 |
// Remove this size as it is not on stock
|
4157 |
+
if(isset($sz_attribute)){
|
4158 |
+
if(array_key_exists($sz_attribute, $product_data)){
|
4159 |
+
$product_data[$sz_attribute] = str_replace(ucfirst($size_variation),"",$product_data[$sz_attribute]);
|
4160 |
+
$product_data[$sz_attribute] = str_replace(", , ",",",$product_data[$sz_attribute]);
|
4161 |
+
$product_data[$sz_attribute] = rtrim($product_data[$sz_attribute], " ");
|
4162 |
+
$product_data[$sz_attribute] = trim($product_data[$sz_attribute], ",");
|
4163 |
+
}
|
4164 |
+
}
|
4165 |
} else {
|
4166 |
// Add comma's in the size field and put availability on stock as at least one variation is on stock
|
4167 |
if(isset($size_variation)){
|
js/woosea_key.js
CHANGED
@@ -26,7 +26,7 @@ jQuery(document).ready(function($) {
|
|
26 |
var license_key = $('#license-key').val();
|
27 |
|
28 |
jQuery.ajax({
|
29 |
-
url: 'https://www.adtribes.io/check/license.php?key=' + license_key + '&email=' + license_email + '&domain=' + root_domain + '&version=11.0.
|
30 |
jsonp: 'callback',
|
31 |
dataType: 'jsonp',
|
32 |
type: 'GET',
|
26 |
var license_key = $('#license-key').val();
|
27 |
|
28 |
jQuery.ajax({
|
29 |
+
url: 'https://www.adtribes.io/check/license.php?key=' + license_key + '&email=' + license_email + '&domain=' + root_domain + '&version=11.0.4',
|
30 |
jsonp: 'callback',
|
31 |
dataType: 'jsonp',
|
32 |
type: 'GET',
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ License URI: http://www.gnu.org/licenses/gpl.html
|
|
5 |
Tags: Google Shopping Feed, WooCommerce Product Feed, Facebook Product Feed, Bing Shopping Feed, Bing Product Feed, Google Merchant Feed, Skroutz, Google Product Feed, Pinterest, Idealo, Facebook Pixel, Facebook Conversion API
|
6 |
Requires at least: 4.5
|
7 |
Tested up to: 5.8
|
8 |
-
Stable tag: 11.0.
|
9 |
|
10 |
== Description ==
|
11 |
|
@@ -339,6 +339,9 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
|
|
339 |
|
340 |
=== Changelog ===
|
341 |
|
|
|
|
|
|
|
342 |
= 11.0.3 (2021-12-16) =
|
343 |
* Checked for compatibility with WooCommerce 6.0
|
344 |
* Solved a PHP warning that was showing in the logs when creating a Skroutz feed
|
@@ -3524,6 +3527,9 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
|
|
3524 |
|
3525 |
== Upgrade Notice ==
|
3526 |
|
|
|
|
|
|
|
3527 |
= 11.0.3 =
|
3528 |
Checked for compatibility with WooCommerce 6.0
|
3529 |
Solved a PHP warning that was showing in the logs when creating a Skroutz feed
|
5 |
Tags: Google Shopping Feed, WooCommerce Product Feed, Facebook Product Feed, Bing Shopping Feed, Bing Product Feed, Google Merchant Feed, Skroutz, Google Product Feed, Pinterest, Idealo, Facebook Pixel, Facebook Conversion API
|
6 |
Requires at least: 4.5
|
7 |
Tested up to: 5.8
|
8 |
+
Stable tag: 11.0.4
|
9 |
|
10 |
== Description ==
|
11 |
|
339 |
|
340 |
=== Changelog ===
|
341 |
|
342 |
+
= 11.0.4 (2021-12-18) =
|
343 |
+
* Solved a rounding issue for discount calculations on products that use a point as seperator
|
344 |
+
|
345 |
= 11.0.3 (2021-12-16) =
|
346 |
* Checked for compatibility with WooCommerce 6.0
|
347 |
* Solved a PHP warning that was showing in the logs when creating a Skroutz feed
|
3527 |
|
3528 |
== Upgrade Notice ==
|
3529 |
|
3530 |
+
= 11.0.4 =
|
3531 |
+
Solved a rounding issue for discount calculations on products that use a point as seperator
|
3532 |
+
|
3533 |
= 11.0.3 =
|
3534 |
Checked for compatibility with WooCommerce 6.0
|
3535 |
Solved a PHP warning that was showing in the logs when creating a Skroutz feed
|
woocommerce-sea.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Product Feed PRO for WooCommerce
|
4 |
-
* Version: 11.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,7 +48,7 @@ if (!defined('ABSPATH')) {
|
|
48 |
* Plugin versionnumber, please do not override.
|
49 |
* Define some constants
|
50 |
*/
|
51 |
-
define( 'WOOCOMMERCESEA_PLUGIN_VERSION', '11.0.
|
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: 11.0.4
|
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', '11.0.4' );
|
52 |
define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
|
53 |
define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
|
54 |
|