Skip to content

Commit

Permalink
fix/OP-565 [Wishlist] Issue with multiple wishlists using the same token
Browse files Browse the repository at this point in the history
  • Loading branch information
Paweł Piórkowski committed Jan 30, 2025
1 parent a0223b8 commit ab20668
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/CommandHandler/Wishlist/CreateNewWishlistHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ public function __invoke(CreateNewWishlist $createNewWishlist): int
$token = $this->tokenStorage->getToken();
$user = $this->tokenUserResolver->resolve($token);

$wishlistCookieToken = $user instanceof ShopUserInterface
? $this->wishlistCookieTokenResolver->resolve()
: $this->wishlistCookieTokenResolver->new();
// $wishlistCookieToken = $user instanceof ShopUserInterface
// ? $this->wishlistCookieTokenResolver->resolve()
// : $this->wishlistCookieTokenResolver->new();

$wishlistCookieToken = $this->wishlistCookieTokenResolver->resolve();

if ($user instanceof ShopUserInterface) {
/** @var WishlistInterface $wishlist */
Expand Down

0 comments on commit ab20668

Please sign in to comment.