=== GPE Product Enquiries ===
Contributors: wojciechborowicz
Tags: woocommerce, product enquiry, contact form, enquiry button, product questions
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add a customisable product enquiry form to your WooCommerce products. Customers click a button and submit a form that emails the site admin.

== Description ==

GPE Product Enquiries adds an enquiry button to your WooCommerce single product pages. When a customer clicks the button a modal form appears, and on submission the enquiry is emailed directly to a configurable recipient.

**Features**

* Show the enquiry button on all products or only on selected products.
* Build your own form — add, remove, and reorder fields (text, email, phone, textarea, dropdown).
* Mark individual fields as required.
* Choose the button position: after Add to Cart, after price, or after the product summary.
* Full button styling: colour, text colour, width (auto or percentage), border radius, layout (inline or own row), and custom wording.
* Enquiry emails are sent as HTML with a clickable product link and automatic Reply-To set to the customer's email.
* Clean uninstall — all plugin data is removed when the plugin is deleted.

**How it works**

1. Install and activate the plugin.
2. Go to **WooCommerce > Product Enquiries** to configure your settings.
3. On the **General** tab choose your display mode, set the email recipient, and build your form fields.
4. On the **Styling** tab customise the button appearance.
5. If using "Show only on selected products", edit individual products and tick **Enable Product Enquiry** on the General tab.

== Installation ==

1. Upload the `gpe-product-enquiries` folder to the `/wp-content/plugins/` directory, or install the plugin through the WordPress plugins screen.
2. Activate the plugin through the **Plugins** screen in WordPress.
3. Navigate to **WooCommerce > Product Enquiries** to configure the plugin.

== Frequently Asked Questions ==

= Does this plugin require WooCommerce? =

Yes. WooCommerce must be installed and active. The plugin will display a notice if WooCommerce is not detected.

= Can I choose which products show the enquiry button? =

Yes. In the plugin settings select "Show only on selected products", then edit each product and tick the "Enable Product Enquiry" checkbox on the product General tab.

= Can I customise the form fields? =

Yes. The General tab includes a field builder where you can add, remove, reorder, and configure fields. Supported field types are text, email, phone, textarea, and dropdown.

= Where are enquiry emails sent? =

To the email address configured in the plugin settings. By default this is the site admin email. The Reply-To header is automatically set to the customer's email address if an email field is present.

= What happens to plugin data on uninstall? =

All plugin settings and per-product meta data are removed from the database when the plugin is deleted through the WordPress admin.

== Screenshots ==

1. General settings tab — display mode, email recipient, and form field builder.
2. Styling settings tab — button position, layout, colours, width, border radius, and text.
3. Enquiry button displayed on a product page.
4. Modal enquiry form.

== Changelog ==

= 1.0.1 =
* New setting: hide the WooCommerce Add to Cart button on products where the enquiry button is shown (off by default — both buttons now appear unless this is enabled).
* New setting: customise the wording of the submit button inside the enquiry modal (previously hardcoded to "Send Enquiry").
* Tested up to WordPress 7.0.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.1 =
The Add to Cart button is no longer hidden by default. If you want the previous behaviour, enable "Hide the Add to Cart button" in WooCommerce → Product Enquiries.

= 1.0.0 =
Initial release.
