=== CalcStudio Calculators ===
Contributors: ianbnzmai
Tags: calculator, mortgage calculator, financial calculator, loan calculator, embed
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add your CalcStudio calculators to any page: pick one from a menu, no code.

== Description ==

CalcStudio makes financial calculators for business websites: repayments, borrowing, refinancing, offset mortgages and more, in your colours.

This plugin is the no-code way to put them on a WordPress site:

* A "CalcStudio calculator" block: choose the calculator from a menu of the ones your package covers.
* A shortcode for the classic editor, page builders and widgets: `[calcstudio calculator="loan-repayment-calculator"]`.
* Works for editors whose role cannot paste script tags.

This plugin is a connector to CalcStudio, a paid service. The calculators run on calcstudio.io; the plugin itself holds no calculator and works only with a CalcStudio account whose package covers the calculators you add (14-day free trial, no card) and with this website approved for that account.

== External services ==

This plugin connects to CalcStudio (https://calcstudio.io), the service that runs the calculators. It is operated by Riverhorse Technologies Limited. Terms: https://calcstudio.io/terms. Privacy policy: https://calcstudio.io/privacy.

What is sent, and when:

* From your server, once an hour at most, and only after you have saved your embed code under Settings, CalcStudio: your embed code, to ask which calculators your package covers, so the block's menu offers only those. Nothing else is sent, and nothing is sent until you save a code.
* From each visitor's browser, on any page where you have placed a calculator: the browser loads the calculator from calcstudio.io in a frame (an iframe the plugin writes; no script from calcstudio.io runs on your site), as it would a video from a video service. CalcStudio then receives what any web request carries (the visitor's IP address and browser details) and the address of the page the calculator is on, which it checks against the websites approved for your account. The figures a visitor types are worked out for that visit and are not stored. One count per calculator load is kept for your account's usage page, with nothing about the visitor. The privacy policy above describes this in full.

No data is sent to anyone else, and the plugin places no cookies of its own.

== Installation ==

1. In WordPress, go to Plugins, Add New, search for "CalcStudio Calculators", then Install Now and Activate.
2. Open Settings, CalcStudio.
3. Paste your embed code from calcstudio.io/account/embed and save.
4. Edit a page, add the "CalcStudio calculator" block and choose a calculator.

== Frequently Asked Questions ==

= The calculator does not show on my page =

The frame loads only on a website approved for your account, over https. Check three things: the embed code is saved under Settings, CalcStudio, which lists the calculators your package covers; the calculator is one of them; and this website is approved on calcstudio.io/account/embed. If you use a caching plugin, clear its cache.

= Which shortcode names can I use? =

loan-repayment-calculator, loan-term-calculator, income-calculator, equity-calculator, credit-card-calculator, budget-planner, borrowing-power-calculator, mortgage-refinance, rent-vs-buy-calculator, debt-consolidation-calculator, offset-mortgage-calculator, bank-rates, mortgage-offset-decision-calculator. Add height="900" to change the starting height; the calculator then sizes itself.

= Does the plugin collect visitor data? =

No. The calculator runs from calcstudio.io in a frame on your page, and nothing a visitor types is stored. See calcstudio.io/privacy.

= Does the plugin contact calcstudio.io? =

Once an hour at most, from your server, to ask which calculators your embed code covers, so the menu offers only those. It sends your embed code and nothing else.

== Screenshots ==

1. The "CalcStudio calculator" block: choose a calculator from the menu. The ones your package covers come first.
2. A calculator on a live page, in the account's colours and logo, sized to its content.

== Changelog ==

= 1.2.0 =
* The calculator is a frame the plugin writes itself; no script from calcstudio.io runs on your site. A small script in the plugin sizes the frame to the calculator.
* The plugin shows whatever calculator you chose; whether it appears is decided by CalcStudio (your website approved, your package covering it). A calculator outside your package shows CalcStudio's "not available" card, and a signed-in editor sees a note saying so.
* Describes the connection to calcstudio.io in full, for the WordPress.org directory.
* Deleting the plugin now removes its setting and cache.
* The block's labels can be translated.

= 1.1.0 =
* The block's menu lists the calculators your package covers; the rest are greyed out.
* Settings, CalcStudio shows which calculators your embed code covers.
* A calculator your package does not cover shows nothing to visitors, instead of a "not available" card. (Reversed in 1.2.0.)

= 1.0.0 =
* First release: block, shortcode and settings page.
