=== estimate.vet ===
Contributors: bigdatasynergy
Tags: veterinary, prices, fees, price list, estimate
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.1.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Your published price list from estimate.vet on your fees page, kept current, with an estimate builder on top. For UK companion animal practices.

== Description ==

The CMA veterinary Order requires every practice to publish a full price list, one click from the homepage, with every weight band shown and every price including VAT. estimate.vet is where a practice enters its own prices and publishes them. This plugin puts the result on the practice's WordPress fees page.

What it does:

* Renders the practice's published price table as plain HTML on the page. Every weight band, VAT stated, there with JavaScript switched off, indexed on the practice's own domain.
* Loads the estimate builder on top of the table, so a pet owner can pick a species, breed, weight and reason and see an itemised estimate. Consultations are quoted as a range, never a single figure.
* Fetches the table from estimate.vet once an hour and keeps the last good copy. When the practice publishes new prices in its console, the fees page follows within the hour, or immediately with the Refresh button, and page caches are told not to hold an old copy of it. If estimate.vet cannot be reached, the page keeps showing the copy it has. It never goes blank.

What it does not do:

* It does not set prices. Every price is one the practice gave estimate.vet, or one worked out from what it gave. There is no AI and nothing is inferred.
* It does not write the £500 written estimates the Order requires. Those are per-animal documents issued after examination.
* It does not change anything else on the site. One block or shortcode on one page.

A practice needs an estimate.vet account, and a token from its console, before the plugin shows anything. Accounts are free until 23 March 2027. For a practice that signs up by then, the price after that is £10 a month plus VAT for as long as it stays. See https://estimate.vet for the terms.

== External services ==

This plugin connects to estimate.vet, a service run by Big Data Synergy Ltd, to fetch the price table the practice has published. Prices are public by law, and the token that identifies a practice is not a secret: it appears in the page source of every site that installs this plugin.

What is sent: an hourly request from your server to `https://embed.estimate.vet/s/<token>.fragment.html`, carrying the token in the URL and nothing else. The plugin sets its own user agent so that your site's address is not sent with the request, and it sends nothing when no token is configured.

What visitors' browsers load: the estimate builder script from `https://embed.estimate.vet/v1/w.js`, which fetches the practice's published prices from the same origin. The embed origin sets no cookies.

What visitors' browsers send: unless the practice has turned counting off in its console and published again, the estimate builder sends a request to `https://embed.estimate.vet/e` when a visitor chooses a service to price, and when a visitor presses one of its links (book, register, call, or the plan link). The address carries the practice's token, the kind of event and the service, and nothing typed by the visitor. The request carries no cookie and no referrer. Our server logs it with the time and the browser's user agent, and no IP address, keeps those lines for about nine weeks, and keeps only daily counts after that. The practice sees the counts in its console.

Terms: https://estimate.vet/terms
Privacy: https://estimate.vet/privacy

== Installation ==

1. Install and activate the plugin.
2. In Settings, estimate.vet, paste the token from the Account page of your console at console.estimate.vet.
3. Add the Price List block to your fees page, or put `[estimate_vet]` in the content.
4. Link to that page from your homepage, one click away, through a clearly labelled link. Use the word price, prices, pricing or fees in the page's title and in its navigation link, and keep the list easy to find without much scrolling.

== Frequently Asked Questions ==

= Does the fees page work if estimate.vet is down? =

Yes. The price table is stored on your own server and rendered into the page as plain HTML. An outage at estimate.vet stops the estimate builder from loading, and the table stays.

= Does it need a licence key? =

No. There is nothing to unlock. Prices are public by law and the token is not a credential.

= Can I style it? =

The table and the estimate builder inherit your theme's fonts and are scoped under their own classes, so they do not leak into your stylesheet. An accent colour can be set on the settings page. A colour too pale to read on white is not used: the estimate builder keeps its default colour, and the settings page says so.

= My site uses a page cache. =

The page that carries the price list tells page caches not to keep a copy of it, which caching plugins and proxy caches generally respect, so each visitor gets the table the plugin holds. The rest of your site is cached as before. A few caches ignore that instruction. If yours does, press Refresh on the settings page after you publish, then clear the cache.

== Changelog ==

= 0.1.5 =
* The settings page now says when the accent colour is too pale to read on white. The estimate builder then uses its default colour for buttons, links and highlights, so they stay readable.

= 0.1.4 =
* The Price List block now keeps the width (wide or full) and any additional CSS class set on it in the editor. The live page used to drop both.

= 0.1.3 =
* The settings page now says that the point about scrolling comes from the CMA's explanatory note.

= 0.1.2 =
* The settings page and the installation steps now say where the price list goes: one click from the homepage through a clearly labelled link, on a page whose title and navigation link use price, prices, pricing or fees, and easy to find without much scrolling.
* When no price list is found for the token, the status now says to publish from the console first, then check the token, then contact estimate.vet.

= 0.1.1 =
* The page carrying the price list is no longer kept in page caches, so it follows each publish instead of showing an old copy.
* A token or accent colour that cannot be read is no longer saved over the one that works.

= 0.1.0 =
* First release.
