From c13c459d357df80412a89e893301e2db50520151 Mon Sep 17 00:00:00 2001 From: Conrado Galli Date: Wed, 31 Mar 2021 08:50:57 -0300 Subject: [PATCH] Update class-wc-woomercadopago-hook-abstract.php changed from SUBTOTAL to TOTAL to apply commission and discounts in a proper way --- .../payments/hooks/class-wc-woomercadopago-hook-abstract.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/payments/hooks/class-wc-woomercadopago-hook-abstract.php b/includes/payments/hooks/class-wc-woomercadopago-hook-abstract.php index 9914c7e64..8ce2a5b49 100755 --- a/includes/payments/hooks/class-wc-woomercadopago-hook-abstract.php +++ b/includes/payments/hooks/class-wc-woomercadopago-hook-abstract.php @@ -161,7 +161,7 @@ public function get_payment_method_title( $title, $id ) { return $title; } - $total = (float) WC()->cart->subtotal; + $total = (float) WC()->cart->total; $price_discount = $total * ( $this->payment->gateway_discount / 100 ); $price_commission = $total * ( $this->payment->commission / 100 );