=== Buy Now for WooCommerce – Quick Checkout by TheForge ===
Contributors: thepluginforge
Tags: woocommerce, buy now, buy now button, direct checkout, quick buy
Requires at least: 5.0
Tested up to: 6.9
WC tested up to: 10.6.0
Requires PHP: 7.4
Stable tag: 2.4.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Add a Buy Now button to WooCommerce products. One click — skip the cart, go straight to checkout.

== Description ==

Quick Checkout adds a "Buy Now" button to your WooCommerce product pages. Customers skip the cart entirely and land straight on checkout.

= Features =

* **Buy Now Button** — Adds product to cart and redirects to checkout via AJAX. No page flicker.
* **Quantity Selector** — Optional +/− input inline with the button so customers can adjust quantity before buying.
* **Sticky Buy Now Bar** — Fixed bar at the bottom of the screen that appears when the main button scrolls out of view.
* **Per-Product Overrides** — Override button text, color, and redirect per product. Disable the button on specific products.
* **Variable Product Support** — Button stays disabled until a variation is selected, then activates automatically.
* **Stock Urgency Message** — Shows a customisable low-stock message above the button. Custom text, background, and text color.
* **Advanced Styling** — Solid, Outline, Gradient, or 3D style. Custom colors, size, border radius, and width.
* **Category Targeting** — Limit the button to specific product categories via AJAX-powered search.
* **Shop Page Support** — Show the button on archive/shop pages with configurable hook position.
* **Analytics** — Track button views, clicks, and conversion rates per product. Filter by Today, 7 Days, 30 Days, or All Time.
* **Shortcode** — `[spcb_buy_now product_id="123"]` — place a Buy Now button anywhere.

= Redirect Options =

* Checkout page (default)
* Cart page
* Custom URL

Per-product redirect overrides work independently of the global setting.

Built by [The Plugin Forge](https://thepluginforge.com).

== Installation ==

1. Go to **Plugins → Add New** and search for **Quick Checkout Buy Now**
2. Install and activate
3. Go to **WooCommerce → Quick Checkout**
4. Enable the button and configure your settings

== Frequently Asked Questions ==

= Does this work with WooCommerce Block Checkout? =
Yes. The AJAX flow redirects to the block checkout URL.

= What happens to existing cart items? =
The cart is cleared and only the clicked product is added — true single-product checkout.

= Does it work with variable products? =
Yes. The button is disabled until a variation is selected, then updates to that variation automatically.

= Can I override settings per product? =
Yes. Each product has a Quick Checkout panel in the editor to override text, color, redirect, or disable the button.

= Will this slow down my store? =
No. Assets load only on product pages and admin. The AJAX handler runs only when Buy Now is clicked.

= Is it HPOS compatible? =
Yes. Fully compatible with WooCommerce High-Performance Order Storage.

== Screenshots ==

1. General Settings — enable button, text, redirect, and category targeting
2. Button Styling tab with live preview panel
3. Advanced Settings — Variable Products and Stock & Availability with previews
4. Advanced Settings — Sticky Bar and Quantity Selector with previews
5. Buy Now button with stock urgency message on a product page

== Changelog ==

= 2.4.2 - 2026-04-22 =
* Confirmed compatibility with WordPress 6.9 and WooCommerce 10.6.0

= 2.4.1 - 2026-03-22 =
* Updated plugin icon

= 2.4 - 2026-03-22 =
* NEW: Stock urgency banner — customisable text, background color, and text color
* NEW: Custom urgency message text with {stock} placeholder
* NEW: Category targeting replaced with AJAX-powered Select2 search (3-character minimum)
* NEW: Plugin logo in settings page header
* NEW: Advanced Settings sections redesigned as visual cards with live previews
* IMPROVED: Advanced Settings order — Variable Products first, Stock & Availability second
* IMPROVED: Button alignment default changed to Center
* IMPROVED: Stock message color fully synced between admin settings and frontend
* REMOVED: Button Icon feature removed

= 2.3 - 2026-03-22 =
* NEW: Multi-file class architecture (replaces single-file structure)
* NEW: AJAX Buy Now flow — silent cart update, JS redirect, no page reload
* NEW: Quantity selector — +/− input inline with the button
* NEW: Sticky Buy Now Bar with IntersectionObserver-based show/hide
* NEW: Per-product overrides via product editor meta box
* NEW: Variable product support — button disables until variation selected

= 2.2 - 2026-03-20 =
* IMPROVED: Button Styling tab redesigned as 2-column grid
* IMPROVED: Category list now scrollable
* FIX: Plugin version now displays correctly throughout

= 2.1 - 2026-03-15 =
* NEW: Live button preview in Styling tab
* NEW: 3D Effect button style
* NEW: Button width options
* NEW: Separate text color picker
* IMPROVED: Tabbed admin interface

= 1.9 - 2026-01-10 =
* NEW: Stock & Availability — auto-hide button for out-of-stock products
* NEW: Stock Urgency Messages
* NEW: Analytics Dashboard
* NEW: Advanced button styles

== Upgrade Notice ==

= 2.4.1 =
Minor update — updated plugin icon. No code changes.

= 2.4 =
AJAX category search, Advanced Settings with live previews, customisable stock urgency banner. No database changes — safe to update.

= 2.3 =
Major update: AJAX checkout, quantity selector, sticky bar, per-product overrides, variable product support. All settings preserved.

== Privacy ==

This plugin does not collect, store, or transmit any data externally. Analytics data is stored only in your WordPress database and deleted on uninstall.
