=== Quomation Consumer Portal ===
Contributors: sergeypolezhaev
Tags: insurance, quote, widget, lead generation, embed
Requires at least: 6.3
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Embed the Quomation auto-quote widget on your site using your Agency ID — no code editing required.

== Description ==

Quomation Consumer Portal connects your WordPress site to the Quomation auto-quote widget service. Enter your Agency ID once in the plugin settings, then add the widget to any page using a shortcode or the block editor — no need to copy/paste `<script>` tags into your theme or page builder.

**What this plugin does**

* Adds a settings page where you enter your Quomation Agency ID and configure the widget's default language and display options.
* Loads the official Quomation widget script (`https://api.agencystream.com/widget/auto-quote-widget.js`) only on pages where the widget is displayed.
* Provides a `[quomation_widget]` shortcode and a "Quomation Auto Quote Widget" block for the block editor, both with optional per-instance overrides.

**Settings**

* **Agency ID** (required) — links the widget to your Quomation account.
* **Default Language** — English or Spanish; visitors can still switch inside the widget.
* **"Buy Now" Button** — show/hide the buy-now button on the quotes step.
* **Show Carrier Name** — show/hide the insurance carrier's name on each quote.

**Shortcode attributes**

`[quomation_widget]` accepts optional attributes that override the global settings for that one instance:

`[quomation_widget agency_id="12345" language="es" button_buy_now="0" carrier_name="1"]`

* `agency_id` — override the Agency ID for this instance.
* `language` — `en` or `es`.
* `button_buy_now` — `1`/`0` to show/hide the Buy Now button.
* `carrier_name` — `1`/`0` to show/hide the carrier name.

The block editor exposes the same overrides through the block's sidebar settings.

You must have an active Quomation account and Agency ID to use this plugin. Visit https://www.quomation.com to sign up.

== External services ==

This plugin relies on the following external services to provide the auto-quote widget. No data is collected or stored by this plugin itself; all processing happens within the widget code loaded from these services.

**Quomation Auto Quote Widget**

This plugin loads a JavaScript widget from Quomation (Quomation Insurance Services, Inc.) that displays a multi-step auto insurance quote form and communicates with Quomation's quoting API, so your site's visitors can get a real-time insurance quote.

What is sent: as a visitor fills out and submits each step of the form (name, contact details, address, driver and vehicle details), that information is sent to Quomation's servers (api.agencystream.com) to generate the quote. This only happens when the widget is displayed on a page and a visitor actively uses it.

This service is provided by Quomation Insurance Services, Inc.: [Privacy Policy](https://www.quomation.com/privacy-policy/).

**Google Places Autocomplete**

The widget uses the Google Places Autocomplete API to suggest addresses as a visitor types their address during the quote process.

What is sent: the partial address text a visitor types is sent to Google as they type, in order to return address suggestions. This only happens on the address field of the widget's "Customer" step.

This service is provided by Google LLC: [Terms of Service](https://policies.google.com/terms), [Privacy Policy](https://policies.google.com/privacy).

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/quomation-consumer-portal`, or install directly through the WordPress plugins screen.
2. Activate the plugin through the "Plugins" screen in WordPress.
3. Go to **Settings → Quomation Consumer Portal** and enter your Agency ID.
4. Add `[quomation_widget]` to any page or post, or insert the "Quomation Auto Quote Widget" block from the block editor.

== Frequently Asked Questions ==

= Where do I get an Agency ID? =

Agency IDs are issued by Quomation when you sign up for the auto-quote service at https://www.quomation.com.

= Can I show a different Agency ID on a specific page? =

Yes. Both the shortcode (`[quomation_widget agency_id="12345"]`) and the block (via the "Agency ID override" field in the block settings) accept an optional override, which takes priority over the value set in the plugin's settings page.

= Does this plugin store any customer data? =

No. The plugin itself only stores your Agency ID and display preferences in the WordPress options table. Form submissions from site visitors are sent directly to Quomation's servers by the embedded widget; this plugin does not intercept or store that data.

== Screenshots ==

1. Plugin settings page — enter your Agency ID.
2. The widget displayed on the front end of a page.

== Changelog ==

= 1.0.0 =
* Initial release: settings page, shortcode, and block for the Quomation auto-quote widget.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
