=== WDA Wishlist and Quick View for WooCommerce ===
Contributors: wpdevart
Tags: woocommerce, wishlist, quick view, woocommerce wishlist, woocommerce quick view
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Wishlist and Quick View for WooCommerce in one lightweight plugin. Shareable wishlists for guests and users, plus an AJAX quick view modal.

== Description ==

WDA Wishlist and Quick View for WooCommerce combines the two most requested shop UX features in a single lightweight plugin..

**Wishlist**

* Add to wishlist buttons on shop/category listings and single product pages
* Click again to remove — the button is a true toggle (optional)
* Works for guests (cookie-based) and logged-in users — guest wishlists are merged into the account automatically on login *and* on registration during checkout
* Dedicated wishlist page (created automatically) with product image, price, stock status, date added, pagination and add-to-cart actions
* "Add all to cart" button with clear feedback about skipped products
* Share your wishlist via Facebook, X (Twitter), WhatsApp, Pinterest, email, a copyable link or the device's native share sheet
* Works with full page caching: button states, the counter and security tokens are refreshed live on page load
* Optional: require login, redirect after adding, auto-remove after add to cart
* Live wishlist counter shortcode for headers/menus
* Works without JavaScript too — buttons fall back to normal links

**Quick View**

* AJAX-powered quick view modal on product listings — no page reload, with hover prefetching for instant opens
* Previous/next arrows and keyboard navigation to browse the whole listing without leaving the modal — free, not paywalled
* Product gallery with thumbnail switching, sale badge, rating, price, stock status, short or full description, attributes, meta and add to cart
* Full support for simple, variable, grouped and external products — variation forms work inside the modal, including variation image switching
* Add to cart from the modal without leaving the page — updates the classic mini-cart *and* the Mini Cart block
* Optionally open the quick view by clicking the product image in listings
* Configurable modal content, button style/position, modal width and overlay
* Accessible: focus is trapped inside the dialog, restored on close, and all feedback is announced to screen readers

**Appearance**

* Accent color, wishlist icon (heart, star or bookmark), corner radius, modal width and overlay opacity — no CSS required
* All plugin colors exposed as CSS custom properties for theme developers
* RTL-ready layout and `prefers-reduced-motion` support

**Block themes & blocks**

* Three Gutenberg blocks: Add to Wishlist, Quick View Button and Wishlist Counter — drop them anywhere, including inside a Product Collection product template
* Automatic button placement works in Product Collection grids on block themes too (no shortcodes needed)
* The Mini Cart block updates when adding to the cart from the quick view

**Privacy-ready**

* Integrates with the WordPress personal data export and erasure tools
* Wishlist data is removed when a user account is deleted
* A daily cleanup removes expired guest wishlists automatically
* Optional complete data removal on uninstall

**Shortcodes**

* `[wda_wishlist]` — the wishlist table (added automatically to the wishlist page)
* `[wda_add_to_wishlist product_id=""]` — a wishlist button anywhere
* `[wda_wishlist_count]` — heart icon with a live item counter, linking to the wishlist page
* `[wda_quick_view_button product_id=""]` — a quick view button anywhere

**Developer friendly**

* REST API under `wda-wqv/v1`: read the wishlist and count, add and remove items
* Templates can be overridden in `yourtheme/wda-wishlist-and-quick-view-for-woocommerce/`, with action hooks inside the templates for surgical changes
* JS events on `document.body`: `wda_wqv_added_to_wishlist`, `wda_wqv_removed_from_wishlist`, `wda_wqv_wishlist_btn_click` (cancelable), `wda_wqv_quick_view_opened`, `wda_wqv_bind_variation_images` (cancelable), `wda_wqv_added_to_cart` — plus a `window.wdaWqv` helper API
* HPOS (custom order tables) compatible; multisite-aware activation and uninstall

== Installation ==

1. Upload the plugin to `/wp-content/plugins/` or install it via the Plugins screen.
2. Activate it. WooCommerce must be installed and active.
3. A "Wishlist" page containing `[wda_wishlist]` is created automatically.
4. Configure everything in the new "Wishlist & Quick View" admin menu.

== Frequently Asked Questions ==

= Do guests need an account to use the wishlist? =

No. Guest wishlists are stored with a cookie and are merged into the user's account when they log in or register — including when they create the account during checkout. You can also require login in the settings.

= Does the wishlist work with caching plugins? =

Yes. Button states, the wishlist counter and the security tokens are refreshed live on every page load with a single lightweight request, so cached pages always show the visitor's real wishlist and never break after the cache outlives a nonce.

= Does it work with block themes? =

Yes. On classic themes the buttons use the standard WooCommerce hooks; in Product Collection grids on block themes they are injected automatically in the same positions. You can also place the Add to Wishlist, Quick View Button and Wishlist Counter blocks anywhere — including inside a Product Collection product template — or keep using the shortcodes.

= What data does the plugin store, and is it GDPR-friendly? =

Wishlists are stored in their own database tables. Guests are identified only by a random token in a cookie — no personal data. Wishlists of registered users are included in the WordPress personal data export and erasure tools, removed when the account is deleted, and expired guest wishlists are cleaned up daily. Optionally all plugin data is deleted on uninstall.

= Will it slow my shop down? =

The plugin ships one small CSS and one small JavaScript file, loads them only on pages that need them, and adds no query per product in listings — wishlist states are resolved with a single query per page.

= Can I place the buttons manually? =

Yes. Set the button position to "Do not show automatically" and use the `[wda_add_to_wishlist]` / `[wda_quick_view_button]` shortcodes.

= Can I override the templates? =

Yes. Copy `templates/wishlist.php` or `templates/quick-view.php` into a `wda-wishlist-and-quick-view-for-woocommerce` folder inside your theme.

= How do I translate the plugin? =

The plugin is fully translation-ready with the text domain `wda-wishlist-and-quick-view-for-woocommerce`. Translations can be contributed on translate.wordpress.org once the plugin is listed.

== Screenshots ==

1. Wishlist and quick view buttons in a product listing.
2. The quick view modal with gallery, variations and add to cart.
3. The wishlist page with stock status, add-all-to-cart and sharing.
4. Share options: social networks and a copyable link.
5. The settings screen (Wishlist tab).
6. The settings screen (Quick View tab).

== Changelog ==

= 1.0.1 =

* Developer release: new actions, filters and JavaScript events so add-ons can extend the wishlist and quick view (wishlist CRUD helpers, item quantities in the API and REST payloads, quick view gallery filters, settings field extension points, public `window.wdaWqv` JS API). No behavior changes.
* Fix: the three blocks (Add to Wishlist, Quick View Button, Wishlist Counter) now render inside the standard block wrapper, so block themes' constrained layouts position them correctly in the editor and on the page. A Shortcode block containing only one of the plugin's shortcodes gets the same wrapper.

= 1.0.0 =

* Initial release: wishlist (guest + user, sharing, add all to cart) and AJAX quick view (variations support, in-modal add to cart).