=== Cart Notify ===
Contributors: hemelhasan
Tags: woocommerce, add to cart notification, cart notification, order notification, woocommerce hpos
Requires at least: 6.8
Tested up to: 7.0
Requires PHP: 7.4
WC tested up to: 10.7.0
Stable tag: 2.0.0
License: GPL-3.0-or-later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Show accessible, customizable WooCommerce add-to-cart notifications for classic and block themes.

== Description ==

Cart Notify adds a frontend notification after successful WooCommerce add-to-cart actions.

This release focuses on compatibility, reliability, and practical store UX:

- Classic and block-theme add-to-cart support
- Success-only notification flow
- Non-AJAX fallback for single/variable/grouped add-to-cart requests
- Settings-driven design and CTA controls
- Better accessibility (keyboard close + live region updates)
- HPOS and cart/checkout blocks compatibility declarations
- Developer filters and lifecycle events

== Features ==

- Notification rendering only after successful add-to-cart events
- Works with WooCommerce classic `added_to_cart` and blocks `wc-blocks_added_to_cart` events
- Supports non-AJAX add-to-cart fallback with one-time server notice payload
- Product title, image, quantity, variation summary, cart items count, and subtotal metadata
- Position controls and style token controls from admin settings
- Optional actions: View Cart, Checkout, Continue Shopping
- Mobile behavior toggle and reduced-motion support

== Developer Hooks ==

Filters:

- `cart_notify_should_enqueue_assets`
- `cart_notify_notification_data`
- `cart_notify_message`
- `cart_notify_position`
- `cart_notify_template`

Frontend events:

- `cart_notify_before_render`
- `cart_notify_after_render`
- `cart_notify_notification_shown`

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` or install through Plugins > Add New.
2. Activate **Cart Notify**.
3. Ensure **WooCommerce** is installed and active.
4. Go to **Cart Notify** settings in wp-admin and configure notification behavior.

== Frequently Asked Questions ==

= Does Cart Notify require WooCommerce? =
Yes. The plugin requires WooCommerce and will only run frontend notification logic when WooCommerce is available.

= Does it support block themes? =
Yes. Cart Notify supports WooCommerce block-theme add-to-cart flow through the `wc-blocks_added_to_cart` event.

= Does it work for non-AJAX single product submissions? =
Yes. Cart Notify stores a one-time fallback payload in WooCommerce session for non-AJAX success flows and renders it on the next page load.

= Does it support grouped and variable products? =
Yes. Successful grouped and variable add-to-cart requests are supported.

= Does it support external products? =
External product flow is not treated as a local cart add success notification.

= Is HPOS supported? =
Cart Notify declares compatibility for HPOS (`custom_order_tables`) and WooCommerce cart/checkout blocks.

= How can I customize payload behavior? =
Use `cart_notify_notification_data` and the related message/position/template filters.

== Screenshots ==

1. Notification preview in frontend add-to-cart flow.
2. Admin settings: main notification controls.
3. Admin settings: design and style customization controls.

== Upgrade Notice ==

= 2.0.0 =
Major upgrade focused on WooCommerce compatibility, block-theme support, non-AJAX fallback behavior, and stronger QA/release workflows.

== Changelog ==

= 2.0.0 = ( May 26, 2026 )
- Added runtime bootstrap and service-oriented plugin wiring.
- Added settings repository and sanitized settings access layer.
- Added WooCommerce integration and compatibility helpers (HPOS + blocks declarations).
- Added non-AJAX add-to-cart fallback via WooCommerce session payload bridge.
- Added block-theme event support and classic flow improvements.
- Added frontend accessibility improvements and richer notification metadata rendering.
- Added developer filters and frontend lifecycle events.
- Added QA scripts, unit sanitizer checks, and e2e smoke scaffold.
- Updated documentation for testing and release preparation.

= 1.1.3 = ( May 25, 2026 )
- Fixed WooCommerce dependency handling to prevent frontend errors when WooCommerce is inactive.
- Notification now runs on successful WooCommerce AJAX add-to-cart events.
- Removed frontend debug logs.
- Cleaned up feature documentation to match the free plugin functionality.

= 1.1.2 = ( March 19, 2024 )
- Improvement performance.
- AJAX install & activate WooCommerce issues fix.
- JS improved.

= 1.1.1 = ( Jan 10, 2024 )
- Improvement performance.
- New design added.
- A new admin option added.

= 1.0.0 = ( Dec 24, 2022 )
- Initial release.

