=== Nevquo Request a Quote for WooCommerce ===
Contributors: nevquo26
Tags: woocommerce, quote, request a quote, enquiry, b2b
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A quote button on your products, a short form, and an inbox where you track requests and reply by email.

== Description ==

Customers click "Request a quote" on a product, fill in a short form, and you get an email. The request also lands in **WooCommerce > Quotes**, where you can set a status, reply to the customer, and keep private notes.

* Button on single product pages, with an optional link on shop and category pages
* Works for simple and variable products (customers pick the option)
* Show it on every product, or only on the products you tick
* Optional quote-only mode that hides "Add to cart" on those products
* Six statuses: New, In review, Quoted, Accepted, Declined, Closed
* Replies are emailed to the customer; private notes stay in the admin
* Email to you for each new request, optional confirmation copy to the customer
* Search, filter by status, sort and bulk-update from the list
* Spam protection without CAPTCHA: honeypot field and a per-visitor hourly limit
* Works with page caching (no nonce in the public form)
* Supports WordPress personal data export and erase
* Compatible with HPOS; loads its CSS and JS only on pages that show a quote button

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`, or install the zip from Plugins > Add New > Upload.
2. Activate it. WooCommerce must be active.
3. Open **WooCommerce > Settings > Quotes** and check where the button should appear and who gets the emails.
4. Visit a product page. The button is already there.

Requests arrive under **WooCommerce > Quotes**.

== Frequently Asked Questions ==

= The button doesn't show up. =
Check **WooCommerce > Settings > Quotes > Show on**. If it is set to "Only products I tick", tick "Quote button" under Product data > General on the product. External and grouped products never show the button. Block themes: the button is added after the Add to Cart form block; if your template doesn't use that block, place the shortcode `[wcrq_button]` where you want it.

= Emails don't arrive. =
The plugin uses `wp_mail()`, the same as the rest of WordPress. If your host doesn't deliver PHP mail reliably, install an SMTP plugin. When a reply can't be sent, the quote screen marks it "Email not sent" and leaves the status alone so you can try again.

= The form says it couldn't reach the server. =
The form posts to `/wp-json/wcrq/v1/quotes`. Some security plugins block the REST API for logged-out visitors. Allow that route.

= Can customers reply by email and have it show in the quote? =
No. Replies go to the Reply-To address in the settings, and you continue from your inbox. Use "Save as private note" to record what was agreed.

= How do I translate the button and form text? =
The button label, intro text and consent text are settings. With WPML they appear under String Translation (domain `nevquo-request-a-quote`). Everything else uses standard WordPress translation files.

= How do I change how the form looks? =
Override the CSS variables on `.wcrq-dialog` (accent colour, radius) from your theme. To change the markup, copy `templates/form.php` or `templates/email.php` into `your-theme/nevquo-request-a-quote/`.

= What happens to my data if I delete the plugin? =
Nothing, unless you tick "Delete all quotes and settings when the plugin is deleted" in the Quotes settings. Deactivating never deletes anything.

== Screenshots ==

1. The quote form on a product page.
2. Confirmation shown after a request is sent.
3. A quote in WooCommerce > Quotes, with status, customer details and reply box.
4. The confirmation email the customer receives.

== Changelog ==

= 1.0.2 =
* The per-visitor hourly limit now counts requests atomically, so simultaneous requests can't slip past it.
* Output escaping is applied at the point of output in every template and screen.

= 1.0.1 =
* The quote form no longer closes when you click outside it or finish a text selection outside the box. Use the X, Cancel or Esc.

= 1.0.0 =
* First release.
