=== Fiducia Reviews ===
Contributors: fiducia
Tags: reviews, woocommerce, trust badge, review invitations, rich snippets
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.3.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Verified customer reviews that AI assistants can read: a trust badge for your site and automatic review invitations after every WooCommerce order.

== Description ==

Fiducia is a review platform built so that ChatGPT, Perplexity, Gemini and Claude can read and cite your reviews: every business page is server-rendered with Organization, AggregateRating and Review structured data, with no AI crawler blocked.

Every review needs a verified email, invited reviews are marked "verified invite", and the history is append-only: nobody (including you) can silently edit a review.

This plugin:

* **Trust badge** — shortcode `[fiducia_badge]` (add `reviews="3"` for your latest reviews) or the "Fiducia Reviews Badge" widget.
* **Structured data** — the home page gets schema.org Organization linking your Fiducia page (JSON-LD, server-side, cached 12 hours). Optionally, each WooCommerce product gets its own Fiducia rating and reviews in its Product markup (matched by SKU, or product ID without SKU), which is what Google can show as stars.
* **Automatic invitations** — when a WooCommerce order is marked *Completed*, Fiducia emails the customer a one-time review link. Each order is invited once; the result is logged as an order note.

The badge and your public page are free. Automatic invitations need a Fiducia Pro plan and an API key from your Fiducia dashboard.

== External services ==

This plugin connects to the Fiducia service (https://fiducia.lumnika.com), which it is built for.

* **Badge**: the page loads `fiducia-badge.js` from the Fiducia host, which reads your public rating (your business domain only) from the Fiducia API. This happens on every page where you place the badge.
* **Structured data**: your server reads your public page data and, with the product option, each product's public rating (your domain and the product SKU or ID) at most every 12 hours and caches it.
* **Invitations**: when a WooCommerce order is completed and invitations are enabled, the plugin sends the customer's billing email, first name, order number and the first item's SKU (or product ID) to the Fiducia API so Fiducia can email them a review link. Nothing is sent if no API key is set or invitations are turned off.

Terms of service: https://fiducia.lumnika.com/terms
Privacy policy: https://fiducia.lumnika.com/privacy

== Installation ==

1. Install and activate the plugin.
2. Go to Settings > Fiducia Reviews. Your domain is filled in from your site address.
3. Place `[fiducia_badge]` where you want the badge.
4. For automatic invitations: claim your page in the Fiducia dashboard, create an API key, paste it in the settings.

== Frequently Asked Questions ==

= Do I need WooCommerce? =

No. The badge works on any WordPress site. Invitations need WooCommerce.

= Will a customer be invited twice? =

No. Each order is invited once, and Fiducia also refuses a second invitation for the same order reference.

= Will this show review stars on Google? =

Google does not show stars for reviews a business publishes about itself (Organization or LocalBusiness markup on its own site), so the home page only gets Organization markup. Stars come from Product markup: with the product option on, each product gets the rating of the reviews collected for that product. Each order sends one invitation, tied to its first line item, so a product gets ratings as its orders are reviewed.

= Can I edit or remove negative reviews? =

No. You can reply publicly to any review; replies are shown next to the review and in the structured data.

== Changelog ==

= 0.3.0 =
* Product markup uses each product's own Fiducia rating and reviews (by SKU), never the store rating.
* Invitations carry the first line item's SKU (or product ID).
* Home page markup is Organization only (no self-serving AggregateRating).

= 0.2.0 =
* Rating structured data (JSON-LD AggregateRating) on the home page, optional on WooCommerce products.

= 0.1.0 =
* Trust badge shortcode and widget.
* Automatic review invitations for completed WooCommerce orders.
