diff --git a/modules/ppcp-api-client/src/Entity/class-amount.php b/modules/ppcp-api-client/src/Entity/class-amount.php index 1af99f5ab..4867c230b 100644 --- a/modules/ppcp-api-client/src/Entity/class-amount.php +++ b/modules/ppcp-api-client/src/Entity/class-amount.php @@ -74,7 +74,7 @@ class Amount { public function to_array(): array { $amount = array( 'currency_code' => $this->currency_code(), - 'value' => number_format( $this->value(), 2 ), + 'value' => number_format( $this->value(), 2, '.', '' ), ); if ( $this->breakdown() && count( $this->breakdown()->to_array() ) ) { $amount['breakdown'] = $this->breakdown()->to_array(); diff --git a/modules/ppcp-api-client/src/Entity/class-money.php b/modules/ppcp-api-client/src/Entity/class-money.php index 699d53a12..d8fc8ad79 100644 --- a/modules/ppcp-api-client/src/Entity/class-money.php +++ b/modules/ppcp-api-client/src/Entity/class-money.php @@ -65,7 +65,7 @@ class Money { public function to_array(): array { return array( 'currency_code' => $this->currency_code(), - 'value' => number_format( $this->value(), 2 ), + 'value' => number_format( $this->value(), 2, '.', '' ), ); } }