=== FizzyTech HST Calculator ===
Contributors: fizzytech
Tags: hst, gst, tax, calculator, canada
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.2
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Canadian HST calculator that solves in any direction, with rates you can edit yourself and five ways to place it on your site.

== Description ==

Most tax calculators work one way: you enter a price, they add the tax. This [HST Calculator](https://hst-calculator.ca/) solves in **all three directions**. Your visitor types into whichever field they actually have a number for — the price including HST, the price excluding HST, or the HST amount alone — and the other two fill themselves in instantly.

That matters more than it sounds. Working backwards from a receipt total, or from a tax figure on an invoice, is the case most calculators simply cannot handle.

Three more things set it apart:

* **You control the tax rates.** Provincial rates change — Nova Scotia went from 15% to 14% in April 2025. Edit any rate from the settings screen, rename a province, or add one. You are never waiting on a plugin update to stay accurate.
* **Five ways to place it**, from one install: shortcode, block, sidebar widget, automatic insertion into posts, and a floating button.
* **Saving settings clears your page cache automatically**, across sixteen caching plugins — so a colour or rate change is live immediately instead of leaving you wondering why nothing changed.

**How it works**

Your visitor picks a province and types an amount into any one of three fields:

* Price including HST
* Price excluding HST
* HST amount

The other two are worked out instantly, in the browser. No page reload and no server request, so it behaves identically on cached pages.

**Made to match your theme**

Every colour is a setting: background, borders, text, title, field labels, field background, the accent colour used for buttons and focus rings, and the highlighted HST row. Corner rounding, border thickness, width, text size and alignment are settings too. You can also set colours per block, so one page can look different from another.

**Five ways to place it**

1. Shortcode — `[fizzhstc_calculator]` in any page, post or text widget
2. Block — search "HST Calculator" or "FizzyTech" in the block editor
3. Widget — Appearance → Widgets, for sidebars and footers
4. Automatic — add it to every post of the types you choose
5. Floating button — a small button in the corner of every page

Using Elementor, Divi, WPBakery or Beaver Builder? Each has a Shortcode element — drop one in and paste `[fizzhstc_calculator]`.

**Rates you control**

Ontario, New Brunswick, Newfoundland and Labrador, Nova Scotia and Prince Edward Island are built in. Rates do change — Nova Scotia went from 15% to 14% in April 2025 — so you can edit any rate, rename a province, or add one, right from the settings screen. No plugin update needed.

**Cache-aware**

Settings-driven markup and page caching are an awkward pair: a cached page keeps serving the old colours until something clears it. Saving settings here clears the cache for you — WP Rocket, W3 Total Cache, WP Super Cache, LiteSpeed, WP Fastest Cache, SiteGround Optimizer, Cache Enabler, WP-Optimize, Breeze, Hummingbird, Comet Cache, Swift Performance, Autoptimize, Nginx Helper, Kinsta and Pagely. There is a manual "Clear page cache" button too.

**Everything is included**

No paid tier, no locked features, no trial. Every feature described here works from the moment you activate it.

**Privacy**

The plugin makes no external requests, sets no cookies and collects no data. Calculations happen in the visitor's browser.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`, or install it through Plugins → Add New.
2. Activate it.
3. Go to Settings → HST Calculator to set the title, colours and placement.

== Frequently Asked Questions ==

= Where does the calculator appear after I activate it? =

Nowhere until you place it. Use the shortcode, the block, a widget, or switch on automatic insertion or the floating button in Settings → HST Calculator → Placement.

= Can I have more than one on a page? =

Yes. Each one works independently, and each block can have its own colours.

= A province changed its HST rate. What do I do? =

Settings → HST Calculator → Tax rates, edit the number, save. There is also a "Restore built-in rates" button.

= Does it work with page caching? =

Yes. All the maths runs in the browser, so a cached page behaves exactly like an uncached one.

= I changed a setting and the page still looks the same. =

Saving settings clears your page cache automatically — WP Rocket, W3 Total Cache, WP Super Cache, LiteSpeed, WP Fastest Cache, SiteGround Optimizer, Cache Enabler, WP-Optimize, Breeze, Hummingbird, Comet Cache, Swift Performance, Autoptimize, Nginx Helper, Kinsta and Pagely are all handled. There is also a "Clear page cache" button next to Save.

If a change still is not showing, the cache is one this plugin cannot reach: a server-level cache at your host, or a CDN such as Cloudflare. Clear it there. Also try a private browsing window, to rule out your own browser holding an old copy.

= Is there a credit link back to your site? =

Only if you switch it on. It is off by default, nothing in the plugin depends on it, and when shown it is marked `rel="nofollow"` so it cannot affect your site's search ranking either way.

= Does it handle GST and PST provinces? =

This version covers the five HST provinces, which use a single combined rate. You can add other provinces and rates by hand in the Tax rates tab, but the display will describe the amount as HST.

== Screenshots ==

1. The calculator on the front end.
2. Settings screen with the live preview.
3. Editing the tax rate table.
4. Block settings in the editor.

== Changelog ==

= 1.0.0 =
* First release.

== Upgrade Notice ==

= 1.0.0 =
First release.
