Merge pull request #22537 from woocommerce/fix/22450

round variation percentage price adjustments to decimal setting
This commit is contained in:
Mike Jolley 2019-01-23 20:15:12 +00:00 committed by GitHub
commit 467681c788
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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";
}