Merge pull request #85 from woocommerce/issue-84-fix-number-format-defaults

do not use comma seperator when using number_format
This commit is contained in:
Emili Castells 2020-11-09 09:13:11 +01:00 committed by GitHub
commit d4d6e615f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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();

View file

@ -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, '.', '' ),
);
}
}