Skip to content

Commit

Permalink
Remove method declaration from CartItemInterface
Browse files Browse the repository at this point in the history
  • Loading branch information
dblaichinger committed Dec 16, 2023
1 parent 3717738 commit 307258d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/CartManager/AbstractCart.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 0 additions & 2 deletions src/CartManager/CartItemInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,4 @@ public function setAddedDateTimestamp(int $time): void;
* @return string
*/
public function getName(): string;

public function setCustomProperties(array $params): void;
}

0 comments on commit 307258d

Please sign in to comment.