mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-19 05:45:20 +00:00
Update CanBeBought.php
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user