You can add the same item with a different options object to a wishlist. But there is no way now to remove that item. Removing an item only checks the list and the element ID, but not the option signature.
This means that the first item with the ID is removed from the list, but that could be the wrong one.
There is also not an option signature to check if an item is in a wishlist (to change the layout). So whenever a certain element is in the wishlist, it returns true even if it has a different options object.
What's your proposed solution?
Add an optional options object to these functions similar to the add function.
What are you trying to do?
You can add the same item with a different options object to a wishlist. But there is no way now to remove that item. Removing an item only checks the list and the element ID, but not the option signature. This means that the first item with the ID is removed from the list, but that could be the wrong one.
There is also not an option signature to check if an item is in a wishlist (to change the layout). So whenever a certain element is in the wishlist, it returns
true
even if it has a different options object.What's your proposed solution?
Add an optional options object to these functions similar to the add function.
Additional context
No response