From b4418b854fa7a24910d77e10f39a0cc11bfbd11a Mon Sep 17 00:00:00 2001 From: Ryan Mitchell Date: Mon, 21 Oct 2024 08:10:49 +0100 Subject: [PATCH] Fix unsupported operand type on discounts (#1984) --- packages/core/src/DiscountTypes/AbstractDiscountType.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/DiscountTypes/AbstractDiscountType.php b/packages/core/src/DiscountTypes/AbstractDiscountType.php index 8e0d3305b5..868313bb49 100644 --- a/packages/core/src/DiscountTypes/AbstractDiscountType.php +++ b/packages/core/src/DiscountTypes/AbstractDiscountType.php @@ -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);