Skip to content

Commit

Permalink
fix: Fixed Payment amount for QR code
Browse files Browse the repository at this point in the history
  • Loading branch information
seebeen committed Nov 12, 2023
1 parent 294a07f commit 91e52dd
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/WooCommerce/Gateway/Payment_Slip_Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ protected function get_slip_data( $order ) {
'company' => $this->get_company_data(),
'code' => $this->get_payment_code( $order ),
'currency' => $this->get_currency( $order ),
'total' => $this->get_total( $order ),
'total' => $this->get_total( $order, '.' ),
'account' => $this->get_bank_account(),
'model' => $this->get_payment_model( $order ),
'reference' => $this->get_payment_reference( $order ),
Expand Down Expand Up @@ -504,11 +504,12 @@ protected function get_currency( $order ) {
/**
* Get the total for the order
*
* @param WC_Order $order Order object.
* @return string The total.
* @param WC_Order $order Order object.
* @param string $sep The thousand separator.
* @return string The total.
*/
protected function get_total( $order ) {
return number_format( $order->get_total(), 2, wc_get_price_decimal_separator(), wc_get_price_thousand_separator() );
protected function get_total( $order, $sep = '' ) {
return number_format( $order->get_total( 'edit' ), 2, wc_get_price_decimal_separator(), $sep );
}

/**
Expand Down

0 comments on commit 91e52dd

Please sign in to comment.