diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d16257b..4cd61550 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/ViewModel/Product.php b/ViewModel/Product.php index dee184fd..997a1d37 100644 --- a/ViewModel/Product.php +++ b/ViewModel/Product.php @@ -94,6 +94,6 @@ public function mapProductAttributes(ProductInterface $product): array */ public function getProductPrice(ProductInterface $product): float { - return $product->getFinalPrice(); + return (float) $product->getFinalPrice(); } } diff --git a/composer.json b/composer.json index 4abf1cc3..e201e118 100644 --- a/composer.json +++ b/composer.json @@ -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",