=== Antrun Inquiry Report ===
Contributors: antrun
Tags: contact form 7, ai, reports, email, customer support
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 2.2.10
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connects your Contact Form 7 submissions to Antrun Automation and emails a daily AI-generated summary of customer inquiries.

== Description ==

Antrun Inquiry Report captures every Contact Form 7 submission on your site and syncs it to your
Antrun Automation account. Once a day, Antrun turns the inquiries into a short, readable summary —
what came in, what's urgent, what themes are repeating, and what to do next — and emails it to you.
Full report history is also available right here in wp-admin.

**Requires Contact Form 7** to capture new submissions, and an Antrun Automation account
(created directly from the plugin's Settings page — no separate signup, no AI API keys to manage
yourself). A free 30-day trial (500 inquiries) is available, or go straight to Inquiry Report Standard.

**Uses an external service.** This plugin sends the content of each contact-form submission to
Antrun Automation's backend so it can generate and email your reports; Antrun in turn uses a
third-party AI provider (OpenAI or Anthropic) to write the summary text. See "External services"
below for details, and our [Privacy Policy](https://antrun.com/inquiry-report/privacy) and
[Terms of Service](https://antrun.com/inquiry-report/terms).

= Features =

* Captures Contact Form 7 submissions automatically (no changes to your forms needed).
* One-click account creation — an API key is generated for your site automatically.
* Free 30-day trial (500 inquiries), or Inquiry Report Standard — $19/mo, 500 inquiries/mo — via Stripe Checkout.
* Daily AI-generated report, emailed on a schedule you choose, plus a full report history in wp-admin.
* "Generate Report Now" button for on-demand reports.
* Resilient sync: inquiries are queued locally and retried automatically if Antrun is briefly
  unreachable or your plan is temporarily inactive, so a submission is never lost.
* Feedback page to send product feedback straight to the Antrun Automation team.

== Installation ==

1. Install and activate Contact Form 7 if you haven't already.
2. Upload and activate Antrun Inquiry Report.
3. Go to **Inquiry Reports → Settings** and enter your email to start your free trial (or go
   straight to Inquiry Report Standard) — this takes a few seconds and there are no API keys to
   create or paste.
4. Set your report recipients and send time.
5. Use **Generate Report Now** on the Reports page to test it immediately.

== External services ==

This plugin relies on external services to do its job. Details of what is sent, when, and to whom:

1. **Antrun Automation** (our own backend, at api.antrun.com)
This plugin sends the content of each Contact Form 7 submission (submitter name, email, subject,
and message) to the Antrun Automation backend, where it is stored and used to generate your
scheduled report. This happens automatically every time a form on your site is submitted, and
your account email/site URL/site name are sent once when you connect the plugin. Antrun Automation
in turn sends that inquiry content to a third-party AI provider (OpenAI or Anthropic) solely to
generate the report's summary text — it is not used to train those providers' models beyond their
standard API terms.
[Terms of Service](https://antrun.com/inquiry-report/terms), [Privacy Policy](https://antrun.com/inquiry-report/privacy).

2. **Stripe**
If you choose to upgrade to a paid plan, clicking the upgrade/checkout button in this plugin
redirects your browser to Stripe's own hosted checkout page to collect payment. This plugin never
sees or stores your card details — Stripe handles that directly.
[Stripe Privacy Policy](https://stripe.com/privacy), [Stripe Terms of Service](https://stripe.com/legal).

== Frequently Asked Questions ==

= Does this work with WPForms, Gravity Forms, etc.? =

Not in this version — v1 supports Contact Form 7 only.

= Do I need my own Anthropic or OpenAI API key? =

No. Antrun Automation's backend holds those keys and runs the AI generation for you.

= What happens to my data if I disconnect or delete the plugin? =

Disconnecting revokes your site's API key immediately. Deleting the plugin also attempts to revoke
the key and removes all local plugin data; your report history remains in your Antrun Automation
account.

== Screenshots ==

1. Connect a free trial or paid account in a couple of clicks — no API keys to create or paste.
2. Report history, right in wp-admin — status, provider, and inquiry count at a glance.
3. A generated report, showing urgent items, categorized inquiries, and notable patterns.
4. Account status, plan usage, and delivery settings — all in one place.

== Changelog ==

= 2.2.10 =
* Added a nonce check to the Stripe checkout-success handler (handle_stripe_success), per wordpress.org
  review feedback. The one-time token in that URL proves a checkout was paid for, but not that this
  site's admin is the one who paid — a CSRF using a token from *any* completed checkout (including an
  attacker's own) could otherwise get an admin to attach their site to the wrong Stripe-backed account.
  The plugin now mints a nonce when checkout is initiated, the backend echoes it back in success_url,
  and this handler verifies it before doing anything with the token.

= 2.2.9 =
* Scoped every admin notice this plugin prints to its own admin pages only. The "requires Contact
  Form 7" warning previously had no scope check at all and would show on every wp-admin screen
  (dashboard, post editor, everywhere) for as long as Contact Form 7 was inactive; the
  connect/save/disconnect confirmation notice was similarly missing an explicit check, relying only
  on its own short transient lifetime and on every redirect already pointing back at this plugin's
  pages. Neither showed up outside this plugin's own pages in practice, but wordpress.org's
  guideline against plugins that "hijack the admin dashboard" (Guideline 11) requires an explicit
  scope check regardless, so all three of this plugin's notices now check the current screen.

= 2.2.8 =
* Added an Author URI (https://antrun.com) to the plugin header, ahead of wordpress.org's
  trademark/ownership check on the "Antrun" name — one supporting signal that the wordpress.org
  account, the plugin, and the antrun.com site are all controlled by the same party. Doesn't itself
  resolve that check — that requires a direct reply confirming ownership.

= 2.2.7 =
* Narrowed the internal prefix from "ANTRUN" to "ANTRUN_IR" (classes, functions, constants,
  options, table, hooks, menu slugs, etc.) so future Antrun-built plugins on the same site can't
  collide with this one's identifiers. Also fixed a bug from 2.2.6 where several admin-post action
  hooks were missed by that rename (their names were embedded inside a longer string and slipped
  past the search-and-replace), which would have made every account/settings form on this plugin
  silently fail; the backend's Stripe checkout URLs were updated to match.
* Sites already running 2.2.6 need to reconnect again on the Settings page after this update, for
  the same reason as 2.2.6 (the stored option name changed again).

= 2.2.6 =
* Renamed every internal PHP class/function/constant, option, database table, cron hook, admin-post
  action, and admin menu slug from the "DIR"/"dir" prefix to "ANTRUN"/"antrun" — wordpress.org
  flagged the 3-letter prefix as too short and too common a word to reliably avoid collisions with
  other plugins/themes. No user-facing behavior change, but sites upgrading from an earlier version
  will need to reconnect on the Settings page, since the stored account data lived under the old
  option name.

= 2.2.5 =
* Renamed the plugin to "Antrun Inquiry Report" (slug antrun-inquiry-report) — wordpress.org flagged
  "Inquiry Report" as too generic/not distinctive for the directory.

= 2.2.4 =
* Ran the official Plugin Check (PCP) tool ahead of wordpress.org submission and fixed what it found:
  updated "Tested up to" (was blocking the plugin from appearing in search) and corrected a
  phpcs:ignore comment that was silencing the wrong sniff code, leaving a warning unsuppressed.

= 2.2.3 =
* Added an "External services" disclosure section and a data-use note in the description, ahead
  of a WordPress.org submission.
* Added a Screenshots section.

= 2.2.2 =
* Reports now show "Antrun Automation" as the provider instead of the underlying AI vendor
  (OpenAI/Anthropic), and no longer show the raw model name — which AI generates your report is
  an Antrun-managed implementation detail.

= 2.2.1 =
* The free trial is now limited to one per email address, on the backend — prevents repeated trial
  signups for the same customer.
* Site URL and site name are now required (alongside email) before a trial API key is issued.

= 2.2.0 =
* Added a Feedback page (Inquiry Reports → Feedback) to send product feedback directly to the
  Antrun Automation team.

= 2.1.2 =
* Settings page field labels are now indented under their section heading for clearer visual grouping.
* Paid accounts now show a "Next billing date" (Stripe's subscription renewal date), the same way
  trial accounts show "Trial ends".

= 2.1.1 =
* Named the paid tier "Inquiry Report Standard".
* Account section now shows connection status instead of the API key.
* Fixed the Stripe success redirect being blocked by some hosts' WAF/ModSecurity (shared-hosting
  false positive on Stripe's long session ID appearing in a /wp-admin/ URL).

= 2.1.0 =
* Added billing: a free 30-day/500-inquiry trial and Inquiry Report Standard ($19/mo, 500 inquiries/mo) via
  Stripe Checkout. The Settings page now shows plan, status, and usage.
* Removed the AI Provider picker — which provider generates your report is now an Antrun-managed
  setting, not something you configure.

= 2.0.0 =
* Now a hosted service: connects to an Antrun Automation account instead of requiring your own AI
  API keys. Submissions sync to the backend, which generates and emails reports.

= 1.0.0 =
* Initial release: Contact Form 7 capture, Anthropic + OpenAI report generation, daily email, admin report history (all handled locally, superseded by 2.0.0).
