---
title: How to Refresh the Wishlist with JavaScript Events
description: Keep WooCommerce wishlist buttons in sync with AJAX filters by refreshing on JavaScript events.
url: "https://wpfactory.com/docs/wishlist-javascript-update-events/"
updated: "2026-09-27"
category: Developers
---

# How to Refresh the Wishlist with JavaScript Events

Some themes and AJAX filter plugins reload product listings without a full page refresh, which can leave the wishlist buttons out of sync. [Wishlist for WooCommerce](https://wpfactory.com/item/wish-list-woocommerce/) can re-scan the page when specific JavaScript events fire, so the buttons update automatically.

### Before you start

- WooCommerce, active.
- The JavaScript update events feature requires [Wishlist for WooCommerce](https://wpfactory.com/item/wish-list-woocommerce/) Pro. The toggle events settings below are available in the free version.

### JavaScript update events (Pro)

1. Go to **WPFactory > Wishlist** (also reachable at **WooCommerce > Settings > Wishlist**) and open the **Advanced** tab.
2. In the **Javascript update events** section, enable the feature (`alg_wc_wl_updater_events_enable`).
3. In **Events** (`alg_wc_wl_updater_events`), list one JavaScript event per line. The built-in defaults are `prdctfltr-reload`, `yith_infs_added_elem`, and `wpfAjaxSuccess`.
4. Add the event your theme or filter plugin triggers after it swaps in new products, then save.

### JavaScript toggle events

The same tab controls which browser events add or remove an item when a button is clicked. This is useful if taps are not registering on some devices.

| Label | Option ID | Default |
| --- | --- | --- |
| Default toggle events | `alg_wc_wl_default_js_toggle_events` | mouseup,touchend |
| Mobile events | `alg_wc_wl_mobile_js_toggle_events` | mouseup,touchend |

Common click-related events you can use include `click`, `dblclick`, `mouseup`, and `touchend`. Separate multiple events with commas.

![Javascript update events option on the Wishlist Advanced tab](https://wpfactory.com/wp-content/uploads/Javascript-update-events.png)

### Need a hand?

Our team answers every ticket on the [Wishlist for WooCommerce support forum](https://wpfactory.com/support/item/wish-list-woocommerce/).

Related articles

- [Wishlist for WooCommerce Developer Hooks and Filters Reference](https://wpfactory.com/docs/wishlist-developer-hooks-filters/)
- [Wishlist for WooCommerce Settings Reference](https://wpfactory.com/docs/wishlist-settings-reference/)
- [How to Import Wishlists from a CSV File](https://wpfactory.com/docs/import-wishlists-csv/)
- [How to Configure Guest Wishlists and Their Expiration](https://wpfactory.com/docs/guest-wishlist-expiration/)
- [How to Let Customers Copy a Wishlist](https://wpfactory.com/docs/duplicate-copy-wishlist/)
