Update CanBeBought.php

This commit is contained in:
Patrick
2022-02-05 17:35:48 +01:00
committed by GitHub
parent 1f0df693a3
commit ff2b124e6b

View File

@@ -37,8 +37,8 @@ trait CanBeBought
*/ */
public function getBuyablePrice(): Money public function getBuyablePrice(): Money
{ {
if (($price = $this->getAttribute('price'))) { if (($price = $this->getAttribute('price')) && ($currency = $this->getAttribute('currency'))) {
return new Money($price); return new Money($price, $currency);
} }
} }