# smootify:wishlist:changed_product_state

> the visitor added (`active`) or removed a product

Status: Ready (Smootify 2.0)  
URL: https://www.smootify.io/docs/reference/api/events/wishlist-changed-product-state  
Updated: 2026-10-13

the visitor added (`active`) or removed a product Since 1.x.

Its 1.x name, `smootify_wishlist:changed_product_state`, is dispatched too, with the same payload, until 3.0.

## Listen

```js
window.Smootify = window.Smootify || [];
window.Smootify.push((api) => {
  api.on("wishlist:changed_product_state", (payload) => {
    // …
  });
});
```

## Payload

```ts
{ node: HTMLElement; product: Product; active: boolean }
```

### Product

```ts
export interface Product {
  /** `gid://shopify/Product/<id>` */
  id: string;
  title: string;
  handle: string;
  vendor: string;
  productType: string;
  descriptionHtml: string;
  tags: string[];
  isGiftCard: boolean;
  requiresSellingPlan: boolean;
  totalInventory: number | null;
  category: { name: string } | null;
  publishedAt: string;
  createdAt: string;
  metafields: (Metafield | null)[];
  collections: { nodes: { handle: string; title: string; image: { url: string } | null }[] };
  media: { nodes: ProductMedia[] };
  options: ProductOption[];
  sellingPlanGroups: { nodes: SellingPlanGroup[] };
  /** every variant on the product page; the first 250 elsewhere */
  variants: { nodes: ProductVariant[]; pageInfo: { hasNextPage: boolean; endCursor: string | null } };
}
```
