=== W9Collector Tax Forms ===
Contributors: w9collector
Tags: w9, w8ben, w8bene, tax, form
Requires at least: 6.0
Requires PHP: 7.4
Stable tag: 1.10.0

== Description ==
The existing [w9_form] form remains available. [w9collector_w8ben] and [w9collector_w8bene] now collect identifying details, applicable status and treaty information, and a drawn signature in sectioned forms. New W-8 records are encrypted and available as a signed HTML record to administrators. Earlier uploaded signed PDFs remain available to administrators. Supported W-8 scenarios also offer completed PDF downloads; see the scope section below. W-9 downloads remain HTML summaries. The payer should review form suitability and the applicable IRS certifications before relying on the record. The plugin does not determine treaty eligibility, withholding rate, FATCA status, or the accuracy of a certification.

Under Tax Forms > Settings, the form access checkbox controls whether visitors must log in before viewing or submitting any of the three forms. It is enabled by default, including on upgrades. With the checkbox cleared, guests can submit using the same nonce, rate limits, reCAPTCHA configuration, plan limits, and storage as logged-in users.

== Email requests and reminders (1.8.0) ==
Under Tax Forms > Requests, enter one email address per line (optionally Name <email>), choose W-9, W-8BEN, or W-8BEN-E, and the plugin emails each person a link to the matching form page. Requests are tracked: a request is marked Fulfilled when the person submits the form through that link (using the tracked invitation token). Request emails never include tax details. Up to 50 addresses can be sent at a time and an address with a pending request for the same form is skipped.

Licensed sites can enable automatic reminders under Tax Forms > Settings (default: every 7 days, up to 3 reminders). Manual Remind now and Cancel buttons are available on every site. Requests do not count toward the submission limit; only completed submissions do.

If your site is behind Cloudflare or another proxy/CDN, enable Proxy / CDN in Settings so rate limiting counts each visitor's real IP rather than the proxy's.

== Automatic updates (1.9.0) ==
Starting with 1.9.0 the plugin receives updates from w9collector.com through the normal WordPress Updates screen and supports WordPress auto-updates. An update check sends only the plugin version and your site URL. Update information must carry the license server's RSA signature, and the downloaded ZIP must match the signed SHA-256 checksum before WordPress installs it. Use Tax Forms > Settings > Updates > Check for updates now to force a check. Sites running an earlier version must install 1.9.0 manually once.

== Changelog ==
= 1.9.0 =
* New: self-hosted automatic updates with signature and checksum verification (requires license server 1.24.0 or newer).
* New: Updates card under Tax Forms > Settings with a manual check button.
= 1.8.0 =
* New: Tax Forms > Requests with emailed form links, fulfillment tracking, manual reminders, and automatic reminders for licensed sites.
* New: Proxy / CDN setting so rate limiting and stored IPs use the real visitor IP behind Cloudflare and similar proxies.
* Fix: Saving Settings for the first time after activating a license no longer resets license status.
* Fix: Plugin updates no longer redirect administrators to the setup wizard.
* Fix: Request links keep their tracking token through the login redirect.
* Updated: plugin author and contributor metadata; setup wizard explains guest access and requests.

== Installation ==
Upload and activate the ZIP through WordPress Plugins. The update creates separate W-8 pages without overwriting existing linked pages. Find the links and shortcodes under Tax Forms > Settings. Use Create missing W-8 pages if a page has been removed. Existing W-9 records and the [w9_form] shortcode remain in place. New submissions share the existing free and licensed submission limits.

== Security ==
W-8 form payloads and older PDFs are encrypted in the WordPress database; names and addresses are also stored in entry columns for the administrator list. They are not placed in the media library or emailed as attachments. Administrator download requires manage_options. Back up the WordPress salts and site URL together with the database; changing either can make prior encrypted records unreadable. Test receipts, signed record downloads, and plan status on a private staging site before handling live tax forms.

U.S. and foreign TIN fields are masked on W-8 administrator entry pages. The nonce-protected Reveal TIN action requires the same administrator permission as W-9 and logs the reveal. Authorized signed-record downloads can still contain complete IDs.

== W-8 completed PDF scope (1.7.0) ==
New signed W-8BEN records with no treaty claim and new W-8BEN-E corporation records with Active NFFE or Passive NFFE/no substantial U.S. owners can be downloaded by an authorized administrator as flattened PDFs over the official October 2021 IRS form artwork. The plugin requires PHP GD with JPEG support. The full IRS certification appears next to the electronic signature. Unsupported classifications and treaty, branch, GIIN, or owner-reporting scenarios are blocked and directed to the official IRS form. Older submissions remain available as signed HTML records or their prior PDF; they cannot be inferred into completed IRS forms.

The plugin cannot determine tax classification or treaty eligibility. Have a qualified tax adviser review the form choice and electronic collection workflow. No IRS approval is asserted.

= 1.9.1 =
Fixed the Media Library picker timing and save behavior. Added independent W-9, W-8BEN, and W-8BEN-E PDF attachment settings with server validation. Added Tax form pages controls with idempotent W-9 creation and custom page reuse. Clarified W-9 mapping pending and verified W-8 template revision scope; selected unmatched W-8 PDFs pause completed-PDF downloads while preserving signed records. Improved scoped administration layouts and license-key input privacy.

= 1.9.2 =
Requests > View entries now filters the main Tax Form Entries list by the request's stored, verified submission ID instead of searching the invitation email. Missing, deleted, or mismatched links show a notice and the full list. New fulfillment requires the request token, retained in the form, instead of an email fallback.

= 1.10.0 =
Optional installation reporting, off by default, under Tax Forms > Settings. Random per-site ID persists across plugin updates and reactivations. Background retry reports no form data, admin email, or site URL. Server 1.25.0 can link the ID to a verified paid activation. See INSTALLATION-REPORTING.md for counting rules, installation order, and tests. License checks preserve the last verified entitlement during transport/server failures.
