=== Demfilz Wishlist for WooCommerce ===
Contributors: demfilz
Tags: woocommerce, wishlist, save for later, favorites, product table
Requires at least: 5.6
Tested up to: 7.1
Requires PHP: 7.2
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

One-click wishlist hearts on product tables, quick view popups, product pages and shop archives. Works for guests, no accounts needed.

== Description ==

**Demfilz Wishlist** adds a heart button everywhere your customers browse, so they can save products for later with one click:

* **Product tables** - if you use the Demfilz Product Table plugin, a wishlist heart column is added to every table automatically, and the quick-view popup gets a wishlist button too. No configuration needed.
* **Single product pages** - a wishlist button next to add to cart (and still shown when a product is out of stock, where saving for later matters most).
* **Shop and archive pages** - a heart on every product card.
* **A ready-made wishlist page** - created automatically at activation, with an "Added to wishlist - View wishlist" toast pointing shoppers to it. The `[dwlw_wishlist]` shortcode works on any page, showing image, price, one-click add-to-cart and remove controls.
* **My Account tab** - logged-in customers get a Wishlist tab in My Account automatically.
* **Live count badge** - show the number of saved items anywhere with `[dwlw_count]` (links to the wishlist page; or give any element the class `dwlw-count`).

= Built for real stores =

* **Works for guests.** The wishlist lives in the visitor's browser, so nobody is forced to register.
* **Follows logged-in customers.** For logged-in users the list is also mirrored to their account, so it syncs across devices.
* **Cache friendly.** Everything a guest does works on fully page-cached sites (W3 Total Cache, WP Rocket, LiteSpeed, Cloudflare and friends) - no nonce breakage, no stale pages.
* **Everything stays in sync.** Toggle a heart anywhere and every other heart for that product updates instantly - table rows, popup, product page, count badges, even across browser tabs.
* **Accessible.** Real buttons with pressed state and labels announced to assistive tech.
* **Light.** One small JavaScript file and one small stylesheet, vanilla JS, no jQuery.

= Using it with Demfilz Product Table =

Nothing to set up: with both plugins active, every `[product_table]` gets a "Wishlist" heart column and the quick-view popup gets a wishlist button. If you would rather place the column yourself, switch off the automatic column in WooCommerce > Wishlist and add the column key `Wishlist:wishlist-heart` to your table's columns setting.

== Installation ==

1. Install and activate the plugin (WooCommerce must be active).
2. A "Wishlist" page containing the `[dwlw_wishlist]` shortcode is created for you - add it to your menu so shoppers can find their saved items.
3. Visit WooCommerce > Wishlist to choose which surfaces show the heart (product tables, quick view, product pages, shop archives, My Account tab) and to change the wishlist page.
4. Optionally add `[dwlw_count]` to a menu or header to show a live count of saved items.

== Frequently Asked Questions ==

= Do customers need an account? =

No. The wishlist is stored in the visitor's browser and works for guests. Logged-in customers additionally get their list mirrored to their account so it follows them across devices.

= Where do I put the wishlist page? =

One is created for you at activation ("Wishlist"). Add it to your menu, or pick a different page at WooCommerce > Wishlist - any page containing the `[dwlw_wishlist]` shortcode works. Logged-in customers can also use the Wishlist tab in My Account.

= How does cross-device sync behave? =

Additions follow a logged-in customer everywhere: each device merges the account list into its own on page load. Removing an item removes it on the device where it happens and on the account; another device that still holds the item locally can re-add it on its next visit. In short: additions always win. Guests are per-browser only.

= Does it work with full-page caching? =

Yes. Saving and viewing the wishlist uses no nonces for guests, so cached pages keep working. The list itself lives in the browser, never in the page HTML.

= Does it work with variable products? =

Yes. Hearts on variation rows in a product table save the parent product.

= The Demfilz Product Table plugin has its own wishlist setting. Which should I use? =

Use this plugin - it covers more surfaces (shop archives, My Account, count badges, account sync). If the table plugin's built-in wishlist is switched on, this plugin pauses its own buttons to avoid showing two wishlists at once, and the settings page tells you so. Anything customers saved with the built-in wishlist is picked up automatically the first time this plugin runs in their browser.

= What data does the plugin store? =

For guests: nothing on the server - the list of saved product IDs stays in the visitor's browser (localStorage). For logged-in customers: the same list of product IDs is saved to their user profile so it can sync across devices. No personal data, no tracking, no external requests.

= Can I show how many items are saved in my menu? =

Yes. Use the `[dwlw_count]` shortcode, or add the CSS class `dwlw-count` to any element (for example a menu badge) and the number is kept up to date.

== Screenshots ==

1. The wishlist heart column in a Demfilz Product Table, with the "Added to wishlist" toast.
2. The wishlist button inside the product table quick-view popup.
3. The wishlist button on a single product page, next to add to cart.
4. The saved-items page: image, price, add to cart and remove controls.
5. Settings: one toggle per surface, plus the wishlist page picker.

== Changelog ==

= 1.0.0 =
* Initial release: heart buttons on Demfilz Product Table rows and quick view, single product pages and shop archives; auto-created wishlist page with saved-items shortcode, one-click AJAX add-to-cart and My Account tab; "View wishlist" toast and live count badge; guest (browser) storage with logged-in account sync; automatic pickup of lists saved by the table plugin's built-in wishlist.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
