Skip to content

Commit

Permalink
Merge branch 'master' of github.com:vyskoczilova/woocommerce-payforpa…
Browse files Browse the repository at this point in the history
…yment
  • Loading branch information
vyskoczilova committed Aug 19, 2021
2 parents 7d50798 + 9bb9f1d commit 5ecddcf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ Either post it on [GitHub](https://github.com/vyskoczilova/woocommerce-payforpay

== Changelog ==

= 2.1.2 (2021-08-19) =

* Fix - cost rounding (use `wc_get_rounding_precision()`) - thanks to [morvy](https://github.com/morvy)

= 2.1.1 (2021-08-17) =

* Fix - check if array passe in gateway settings (fixes [Mercadopago error](https://wordpress.org/support/topic/fatal-error-mercado-pago-compatibility/))
Expand Down
2 changes: 1 addition & 1 deletion inc/class-pay4pay.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public function calculate_pay4payment() {
}

$cost = apply_filters( "woocommerce_pay4pay_{$current_gateway->id}_amount", $cost, $calculation_base, $current_gateway, $taxable, $include_taxes, $tax_class );
$cost = round($cost, \wc_get_price_decimals());
$cost = round($cost, \wc_get_rounding_precision());

$this->_fee = (object) array(
'fee_title' => $fee_title,
Expand Down

0 comments on commit 5ecddcf

Please sign in to comment.