From 6709049cbcf8fe4472e35879efb27190aca4cefe Mon Sep 17 00:00:00 2001 From: Ron Rennick Date: Wed, 23 Jan 2019 14:04:04 -0400 Subject: [PATCH] round variation percentage price adjustments to decimal setting --- includes/class-wc-ajax.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-ajax.php b/includes/class-wc-ajax.php index 8b20ab0d13d..d0ea535f9f1 100644 --- a/includes/class-wc-ajax.php +++ b/includes/class-wc-ajax.php @@ -2242,7 +2242,7 @@ class WC_AJAX { if ( '%' === substr( $value, -1 ) ) { $percent = wc_format_decimal( substr( $value, 0, -1 ) ); - $field_value += ( ( $field_value / 100 ) * $percent ) * "{$operator}1"; + $field_value += round( ( $field_value / 100 ) * $percent, wc_get_price_decimals() ) * "{$operator}1"; } else { $field_value += $value * "{$operator}1"; }