From 4b14d5e4ba144a9f309adedf759e2a2793a258c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yusuf=20=C3=96zdemir?= Date: Thu, 31 Aug 2023 08:48:13 +0300 Subject: [PATCH] fix item condition storage --- src/Cart.php | 2 +- src/CartItem.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Cart.php b/src/Cart.php index 76d3cf6..1cb12f2 100644 --- a/src/Cart.php +++ b/src/Cart.php @@ -401,7 +401,7 @@ public function getMeta(string $key, mixed $default): mixed return $this->meta[$key] ?? $default; } - private function updateItemStorage() + public function updateItemStorage() { $this->updateConditionPrice(); diff --git a/src/CartItem.php b/src/CartItem.php index da88b46..7a14bd4 100644 --- a/src/CartItem.php +++ b/src/CartItem.php @@ -116,6 +116,8 @@ public function condition(Condition $condition) $this->calculateConditionPrices(); + app(config('cart.instance'))->updateItemStorage(); + return $this; }