Skip to content

Commit

Permalink
Fix unsupported operand type on discounts
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmitchell committed Oct 8, 2024
1 parent 26d70d7 commit aeb3b6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/DiscountTypes/AbstractDiscountType.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ protected function checkDiscountConditions(Cart $cart): bool

$validCoupon = $cartCoupon ? ($cartCoupon === $conditionCoupon) : blank($conditionCoupon);

$minSpend = ($data['min_prices'][$cart->currency->code] ?? 0) / $cart->currency->factor;
$minSpend = (int) ($data['min_prices'][$cart->currency->code] ?? 0) / (int) $cart->currency->factor;
$minSpend = (int) bcmul($minSpend, $cart->currency->factor);

$lines = $this->getEligibleLines($cart);
Expand Down

0 comments on commit aeb3b6e

Please sign in to comment.