From ff2b124e6b2d7785ef28e3c2d585d8101ddae224 Mon Sep 17 00:00:00 2001 From: Patrick Date: Sat, 5 Feb 2022 17:35:48 +0100 Subject: [PATCH] Update CanBeBought.php --- src/CanBeBought.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CanBeBought.php b/src/CanBeBought.php index a5cbd44..cb529d0 100644 --- a/src/CanBeBought.php +++ b/src/CanBeBought.php @@ -37,8 +37,8 @@ trait CanBeBought */ public function getBuyablePrice(): Money { - if (($price = $this->getAttribute('price'))) { - return new Money($price); + if (($price = $this->getAttribute('price')) && ($currency = $this->getAttribute('currency'))) { + return new Money($price, $currency); } }