Skip to content

Commit

Permalink
Fix unsupported operand type on discounts (#1984)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmitchell authored Oct 21, 2024
1 parent 19858f3 commit b4418b8
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 b4418b8

Please sign in to comment.