fix: naprawiono crash przy składaniu zamówienia z kuponem rabatowym
Fatal Error: Call to undefined method stdClass::is_one_time() w OrderRepository:793. Zamieniono wywołania nieistniejących metod na stdClass na dostęp do właściwości + istniejącą metodę CouponRepository::markAsUsed(). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -790,8 +790,8 @@ class OrderRepository
|
||||
}
|
||||
}
|
||||
|
||||
if ($coupon && $coupon->is_one_time()) {
|
||||
$coupon->set_as_used();
|
||||
if ($coupon && (int)$coupon->one_time === 1) {
|
||||
(new \Domain\Coupon\CouponRepository($this->db))->markAsUsed((int)$coupon->id);
|
||||
}
|
||||
|
||||
$order = $this->orderDetailsFrontend($order_id);
|
||||
|
||||
Reference in New Issue
Block a user