=== AuctionVibe for WooCommerce ===
Contributors: auctionvibewp
Tags: auction, woocommerce, bidding, live bidding, e-commerce
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.3.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.txt

A professional, theme-agnostic WooCommerce Auction solution featuring AJAX live bidding, a winner checkout flow, and advanced bidding restrictions.

== Description ==

**AuctionVibe for WooCommerce** is a powerful and lightweight solution designed to turn your products into high-engagement auctions. Built with performance and theme compatibility in mind, AuctionVibe inherits your active theme's colors and typography while providing a premium, interactive bidding experience.

Key features include:
*   **AJAX Live Bidding**: Real-time bid updates without page refreshes.
*   **Theme-Agnostic Design**: Automatically inherits styles from any WordPress theme.
*   **Auction Badge**: An "Auction" badge on shop, archive, and product pages so shoppers spot auctions at a glance.
*   **Winner Checkout Flow**: Winners can add their won items to the cart at the winning price for a standard WooCommerce checkout experience.
*   **Advanced Restrictions**: Controls for admin bidding, self-bidding, and bid confirmations.
*   **Shortcode**: Display auction grids on any page with [auctvibe_auctions] (columns, status, ordering, category filters).
*   **Elementor Integration**: A custom widget for displaying an Auction Grid.
*   **Admin Dashboard**: Track total bids, active auctions, and recent activity at a glance.

== Installation ==

1. Upload the `auctionvibe-for-woocommerce` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to WooCommerce > AuctionVibe Settings to configure your defaults.
4. Edit or create a product and set the Product Type to "Auction".

== Frequently Asked Questions ==

= How do I show auctions on a page? =
Use the shortcode [auctvibe_auctions] on any page or post. Options: limit, columns, status (active/ended/all), orderby (date/title/ending/rand), order (ASC/DESC), category, ids. Example: [auctvibe_auctions columns="4" limit="8" orderby="ending" order="ASC"]. It inherits your theme's product-card style and is fully responsive.

= Does it work with any theme? =
Yes! AuctionVibe for WooCommerce is designed to be lean and inherits CSS variables from your theme for buttons, fonts, and colors.

= Can I customize the colors? =
Absolutely. Go to AuctionVibe Settings > Colors to set your primary, accent, success, and danger colors using a native color picker.

= Where is the documentation? =
A full setup and usage guide ships inside the plugin. Go to the AuctionVibe menu > Documentation — no external site needed.

= Does it work with caching plugins? =
Yes. Live auction pages are automatically excluded from full-page cache so the bid box, countdown, and security nonce stay fresh. This works out of the box with WP Rocket, W3 Total Cache, WP Super Cache, WP Fastest Cache, and LiteSpeed Cache. Ended auction pages remain fully cacheable.

= My auction emails are not being delivered. What do I do? =
AuctionVibe sends outbid and winner emails through WooCommerce's email system, which uses WordPress mail. If your host does not deliver mail reliably, install a free SMTP plugin such as WP Mail SMTP or FluentSMTP and configure it — that fixes delivery for all auction emails.

= Do bidders need an account? =
Yes. Bidding requires a logged-in account, which keeps bids accountable and enables winner checkout.

== External Services ==

This plugin does not connect to or rely on any external third-party services. All auction data is stored locally in your WordPress database.

== Screenshots ==

1. Live bidding box on an auction product page — real-time countdown, current bid, and bid history.
2. Auction Settings tab when editing a product — set the start price, bid increment, and end date & time.
3. The built-in Documentation & Setup Guide, right inside your WordPress dashboard.
4. Auctions displayed on any page with the [auctvibe_auctions] shortcode — a clean, theme-matching grid with live countdowns.
5. The AuctionVibe Dashboard — active auctions and recent bidding activity at a glance.
6. The Elementor Auction Grid widget, for building auction pages visually.

== Changelog ==

= 1.3.2 =
*   Fix: quantity/checkout hardening from 1.3.1 corrected an edge case where block (Store API) checkout could store an invalid reference, causing a PHP warning on the product page.
*   Fix: the "processing your order" message for a just-ended auction (shown before the closing sweep runs) no longer dead-ends; it now offers a Refresh Page button.
*   Fix: removed the auction countdown from the WooCommerce admin Products list price column (front-end listings are unaffected).
= 1.3.1 =
*   Fix: Elementor auction grid widget now renders the theme's default WooCommerce product card (with placeholder image when no image is set) instead of a custom card that could appear blank.
*   Removed: the disabled "Live Bid Update Interval" setting and related code; the live-bidding refresh rate is fixed at 10 seconds for now.
*   New: settings to show/hide the "Auction" badge, the product-page countdown, and the listing-page countdown (all on by default). Listing pages (shop, archives, shortcode grids) now show a live countdown.
*   Improve: when AJAX bidding is disabled, the bid-result notice is now dismissible and no longer leaves a layout gap on some themes.
*   Dev: removed the three "Coming Soon" placeholder controls from the Elementor widget and the Documentation page.
= 1.3.0 =
*   New: [auctvibe_auctions] shortcode to display responsive auction grids on any page or post (columns, status, ordering, category, and ID filters).
*   Dev: Full PHPStan (level 5) and WPCS (WordPress-Extra) analysis now pass with zero issues.
*   Dev: Unified every code identifier (functions, classes, namespaces, options, hooks, AJAX actions) under the single unique auctvibe prefix.
*   Fix: Open auctions are no longer purchasable via direct add-to-cart URLs - bidding is the only path until the auction closes.
*   Dev: Removed an unused Elementor widget file; codebase now passes the full WordPress Coding Standards (WPCS) ruleset.

= 1.2.0 =
*   New: Built-in Documentation page (AuctionVibe > Documentation) with a full self-contained setup and usage guide.
*   New: Live auction pages are automatically excluded from page caching (WP Rocket, W3TC, WP Super Cache, WP Fastest Cache, LiteSpeed) so bids and countdowns stay fresh.
*   Improve: Bids are now inserted atomically using a per-auction lock, preventing race conditions when multiple people bid at the same instant.
*   Improve: Auction closing is now single-run safe — concurrent cron and on-request checks can no longer create duplicate winner orders or emails.
*   Improve: Added a database version/upgrade routine so future updates migrate the schema safely on existing sites.
*   Change: Removed the Reserve Price and direct Buy It Now features for now; they will be reconsidered in a future release. The highest bidder always wins, and winners still pay via the "Pay Now" checkout.
*   Update: Added a (product_id, bid_amount) index for faster highest-bid lookups.

= 1.1.3 =
*   Fix: Removed all inline script/style output — replaced with wp_enqueue/wp_add_inline functions.
*   Fix: Updated text domain to match plugin slug (auctionvibe-for-woocommerce).
*   Fix: Added Requires Plugins header for WooCommerce dependency.
*   Fix: Standardized function prefixes to avwp_ for uniqueness.
*   Fix: Wrapped all database queries in $wpdb->prepare().
*   Fix: Sanitized all $_POST/$_GET input with proper WordPress functions.
*   Fix: Escaped all dynamic output with esc_html/esc_attr/esc_url.
*   Fix: Removed duplicate dead files from old naming convention.
*   Fix: Aligned version numbers across all locations.
*   Fix: Declared WooCommerce HPOS compatibility.
*   Fix: Added conditional asset loading for frontend CSS/JS.
*   Fix: Added autoloader path traversal prevention.
*   Fix: Fixed nonce verification flow in form handlers.
*   Update: Tested up to WordPress 7.0.
*   Update: WC tested up to 9.8.

= 1.0.1 =
*   Initial stable release.
*   Added dynamic color settings.
*   Implemented Winner "Add to Cart" flow.
*   Optimized database queries with caching for high performance.

== Upgrade Notice ==
= 1.2.0 =
Adds built-in documentation, cache-plugin compatibility, and race-condition-safe bidding and closing. Note: Reserve Price and Buy It Now are removed in this version. Update recommended.

= 1.1.3 =
Important security and compliance fixes. Update recommended for all users.

= 1.0.1 =
Initial release of AuctionVibe for WooCommerce.
