diff --git a/src/CartManager/AbstractCart.php b/src/CartManager/AbstractCart.php index f3ba0f52..17c3de49 100644 --- a/src/CartManager/AbstractCart.php +++ b/src/CartManager/AbstractCart.php @@ -158,7 +158,9 @@ public function updateItem(string $itemKey, CheckoutableInterface $product, int $item->setSubItems($subItems); } - $item->setCustomProperties($params); + if (method_exists($item, 'setCustomProperties')) { + $item->setCustomProperties($params); + } $this->items[$itemKey] = $item; diff --git a/src/CartManager/CartItemInterface.php b/src/CartManager/CartItemInterface.php index d352ba82..2c1c8a62 100644 --- a/src/CartManager/CartItemInterface.php +++ b/src/CartManager/CartItemInterface.php @@ -112,6 +112,4 @@ public function setAddedDateTimestamp(int $time): void; * @return string */ public function getName(): string; - - public function setCustomProperties(array $params): void; }