You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
ankhy-dev
added a commit
to ankhy-dev/yith-woocommerce-wishlist
that referenced
this issue
Jun 9, 2023
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 addsuser_id
to records in the table without checking if the current product already assigned to userCase:
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
The text was updated successfully, but these errors were encountered: