=== WPMints Cart Drawer for WooCommerce ===
Contributors: wpmints
Tags: woocommerce, mini cart, cart drawer, ajax cart, floating cart
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 1.0.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A slide-out mini-cart drawer for WooCommerce, with quantity/remove controls.

== Description ==

Cart Drawer replaces WooCommerce's usual "added to cart" page reload with a slide-out mini cart. It opens automatically from every add-to-cart entry point - grid buttons and the single product page itself - and lets shoppers adjust quantity or remove items without ever leaving the page they're on.

Configure it under WooCommerce → Cart Drawer.

= Features (free) =

* Automatic slide-out drawer on add-to-cart, from grid buttons and the single product page
* A floating trigger button, or hook your theme's existing header cart icon instead
* Live quantity and remove controls inside the drawer
* Checkout and View Cart buttons (always shown)
* Position, side, container styling, real colour pickers, and a custom font
* Visibility rules (hide on cart/checkout pages, or specific page IDs)
* A `[wpmintscd_trigger]` shortcode to place a trigger button anywhere your theme accepts a shortcode
* An optional setting to redirect WooCommerce's native /cart/ page to this drawer instead

= Free vs Pro =

This is the full, free plugin - it is not a limited trial. A separate Pro plugin is sold at [wpmints.com](https://wpmints.com), as its own additional install (not unlocked with a key inside this plugin), and adds:

* Slide/fade drawer animations (free stays on no animation)
* The mobile bottom-sheet layout (free stays on the side drawer)
* A coupon field inside the drawer
* Hiding the checkout/view-cart buttons
* A spend-more-save-more progress bar (single rule or multiple tiers)
* In-drawer product recommendations
* A custom CSS field

Pro is a separate plugin/codebase - this free plugin has no license check, no remote calls of any kind, and no dormant code for any of the above; none of it exists in this codebase at all.

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/mints-cart-drawer-for-woocommerce`, or install it directly through the Plugins screen.
2. Activate the plugin.
3. Go to WooCommerce → Cart Drawer to configure it.

== Frequently Asked Questions ==

= Does this need WooCommerce? =

Yes - it only does anything on a WooCommerce site, and won't load at all if WooCommerce isn't active.

= Will it work with my theme? =

It hooks WooCommerce's own add-to-cart events and a wide list of common theme/page-builder cart-icon patterns, so it works without theme-specific code in almost all cases. A custom CSS selector field is available if automatic detection doesn't find your theme's icon.

= Does this plugin phone home or track anything? =

No. This free plugin makes no external requests of any kind.

== Screenshots ==

1. The drawer open after an add-to-cart (shown with the Pro progress bar and recommendations).
2. General settings - trigger icon, count/total badge, and trigger behaviour.
3. Desktop settings - drawer side and trigger position.
4. Mobile settings - trigger position (the bottom-sheet layout is Pro).
5. Behavior settings - auto-open, close on outside click, totals, and undo remove.
6. Progress bar settings (Pro).
7. Style settings - container size, corners, shadow, overlay, and colours.
8. Advanced settings (recommendations and custom CSS are Pro).
9. A quick tour of the drawer and settings.

== Changelog ==

= 1.0.5 =
* Every remaining echo is escaped at output: cart item images and fees via wp_kses_post(), trigger totals via esc_html().
* The drawer shell and cart contents are now printed directly by their templates instead of being built into a string and echoed.

= 1.0.4 =
* Text domain now matches the WordPress.org-assigned slug (`mints-cart-drawer-for-woocommerce`).
* The "hide theme's own cart" CSS selector field is now restricted against CSS-injection (braces, semicolons, and comment syntax can no longer be used to break out of the generated style rule), per WordPress.org review feedback.
* Several hardcoded SVG icons and the "PRO" badge, previously echoed raw with a phpcs:ignore comment, are now passed through wp_kses() with an explicit allowed-tags list at the point they're output.
* uninstall.php was deleting the wrong (pre-rename) option name and leaving real settings behind on uninstall - fixed.

= 1.0.3 =
* The single-product Add to Cart AJAX interceptor now enqueues its inline JS properly (`wp_add_inline_script`) instead of printing a raw `<script>` tag - functionally identical, per WordPress.org review feedback.

= 1.0.2 =
* Fixed the same "too short/generic" prefix issue WordPress.org flagged on a sibling plugin: the shared admin-page enqueue handle (`wpm-admin`) and its localized JS object (`cartDrawer`) are now under the full `wpmintscd` prefix.

= 1.0.1 =
* Renamed to be more distinctive, per WordPress.org review feedback.
* Removed the progress bar, in-drawer recommendations, in-drawer coupon field, custom CSS, checkout/view-cart button hiding, mobile bottom-sheet layout, and slide/fade animation code entirely from this free build - previously present but always forced to a fixed free-tier value, which is a compliance issue regardless of there being no license check. The settings page still shows these as disabled fields with a PRO badge, but nothing behind them exists in this codebase now.
* The custom font-family field is now restricted to safe characters instead of accepting arbitrary text.
* Internal option/settings/AJAX-action names are now uniquely prefixed (wpmintscd_) to avoid any collision with other plugins.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.5 =
Output-escaping fixes per WordPress.org review - please update.

= 1.0.4 =
Text domain, CSS-injection, and escaping fixes per WordPress.org review - please update.

= 1.0.3 =
Fixed a WordPress.org review issue - please update.

= 1.0.2 =
Second prefixing fix pass - please update.

= 1.0.1 =
Renamed and updated per WordPress.org review feedback.
