Skip to content

Commit

Permalink
Merge pull request #172 from BitBagCommerce/Create_new_wishlist_fix
Browse files Browse the repository at this point in the history
Fix for adding new wishlist
  • Loading branch information
milwoz authored Aug 24, 2022
2 parents 6d6b7fc + bf2b181 commit d0df601
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CommandHandler/Wishlist/CreateNewWishlistHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ public function __invoke(CreateNewWishlist $createNewWishlist): void
}

if ($user instanceof ShopUserInterface) {
$wishlists = $this->wishlistRepository->findAllByShopUser($user->getId());
$wishlists = $this->wishlistRepository->findAllByShopUser($wishlist->getShopUser()->getId());
} else {
$wishlists = $this->wishlistRepository->findAllByAnonymous($wishlistCookieToken);
$wishlists = $this->wishlistRepository->findAllByToken($wishlistCookieToken);
}

/** @var WishlistInterface $wishlist */
Expand Down

0 comments on commit d0df601

Please sign in to comment.