Skip to content

Commit

Permalink
Make sure Product::getProductPrice() always returns float
Browse files Browse the repository at this point in the history
  • Loading branch information
jissereitsma committed Jul 13, 2021
1 parent 120cae5 commit b6b18b1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.1.1] - 10 July 2021
### Fixed
- Make sure \Yireo\GoogleTagManager2\ViewModel\Product::getProductPrice() always returns float

## [2.1.0] - 10 July 2021
### Fixed
- Various styling issues (PHPCS, PHPStan)
Expand Down
2 changes: 1 addition & 1 deletion ViewModel/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,6 @@ public function mapProductAttributes(ProductInterface $product): array
*/
public function getProductPrice(ProductInterface $product): float
{
return $product->getFinalPrice();
return (float) $product->getFinalPrice();
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yireo/magento2-googletagmanager2",
"version": "2.1.0",
"version": "2.1.1",
"license": "OSL-3.0",
"type": "magento2-module",
"homepage": "https://www.yireo.com/software/magento-extensions/googletagmanager2",
Expand Down

0 comments on commit b6b18b1

Please sign in to comment.