Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Product duplicates in wishlist after user login #25

Open
ankhy-dev opened this issue Jun 8, 2023 · 0 comments
Open

Product duplicates in wishlist after user login #25

ankhy-dev opened this issue Jun 8, 2023 · 0 comments

Comments

@ankhy-dev
Copy link

After init hook, assign_to_user method converted all session’s wishlists to user wishlists, but if user had products in wishlist before (add to wishlist product X → logout → add to wishlist product X → login), then user got product duplicates in yith_wcwl table. Because this function adds user_id to records in the table without checking if the current product already assigned to user

Case:
If you already have a product in the wishlist (as registered user) and add the same product as a guest(user not logged in), then after login you will have 2 records of the same product in the database, and you need to click twice the “remove product from the wishlist” button

ankhy-dev added a commit to ankhy-dev/yith-woocommerce-wishlist that referenced this issue Jun 9, 2023
ankhy-dev added a commit to ankhy-dev/yith-woocommerce-wishlist that referenced this issue Jun 9, 2023
ankhy-dev added a commit to ankhy-dev/yith-woocommerce-wishlist that referenced this issue Jun 9, 2023
ankhy-dev added a commit to ankhy-dev/yith-woocommerce-wishlist that referenced this issue Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant