[lightMode]
Toggle
This endpoint switches a product's addition or removal from the customer's wishlist. It simply calls the other endpoints Add and Remove as needed. A copy of the customer's wishlist is saved in the broswer local storage to speed the process of retrieving its content. Based on the content of the wishlist in the local storage, the items will be added or removed.
Payload authenticated
Response
Usage
To perform the action of switching a product's addition or removal from a wishlist, the method toggle()
may be called as below.
salla.wishlist.toggle({ id: 12345 }).then((response) => {
/* add your code here */
});
// TIP: short version
salla.wishlist.toggle(12345).then((response) => {
/* add your code here */
});
Events
This endpoint calls the add
and remove
endpoint, accordingly, all of their events are applicable.
[updatedIn] 10 months ago
Payload `authenticated`
Response
Usage
Events