=== QuoteBill Embeds ===
Contributors: quotebill
Tags: invoice, vat calculator, currency converter, embed, shortcode
Requires at least: 5.0
Requires PHP: 7.4
Stable tag: 0.1.0
License: MIT
License URI: https://opensource.org/licenses/MIT

Shortcodes for QuoteBill's free embeds: a document template, the VAT and GST calculator and the currency converter.

== Description ==

This plugin is source-available. It is not listed in the WordPress.org plugin directory or any other marketplace and
has not been reviewed by WordPress.org: download quotebill-wordpress-embeds.zip from https://quotebill.com/integrations/quotebill-wordpress-embeds.zip (see Installation).

Status: not yet run inside WordPress. The PHP has not been run on a WordPress site and has not been linted (see Honest
limits). Try it on a test site before you put it on yours.

Each shortcode prints the same snippet QuoteBill's own "put this on your site" boxes give: an iframe of quotebill.com and a
one-line credit link under it.

* `[quotebill_tax_calculator]` - the VAT and GST calculator, with a country to choose.
* `[quotebill_tax_calculator country="germany"]` - one country's calculator, starting from its standard rate. `country` takes
  the country's address segment on quotebill.com (germany, south-korea, united-kingdom...) or its two-letter code (DE, KR, GB).
* `[quotebill_currency_converter from="EUR" to="USD"]` - the currency converter, on the European Central Bank's daily
  reference rates. `from` and `to` are optional; a currency the converter does not have is ignored.
* `[quotebill_template slug="blank-invoice-template" title="Blank invoice template"]` - a template with its Excel and Word downloads. Take
  `slug` from the template's address on quotebill.com, and `title` from the snippet on the template's page.

Every shortcode takes `lang`: one of QuoteBill's 33 languages (en, ko, ja, de, fr, es...). Anything else is English.

What the plugin does not do:

* It makes no request of its own, loads no script or style, sets no cookie, stores nothing and has no settings page.
* It cannot hide or change the credit line; QuoteBill's embeds always carry it.
* It does not create invoices or use the QuoteBill API, and needs no API key.

What your visitors' browsers do: they load the framed page from quotebill.com, whose privacy policy applies to it, and the
credit link carries the same campaign tags (utm_source=embed and so on) as the snippet on quotebill.com.

Honest limits:

* The PHP has not been run on a WordPress site yet, and it was not linted (no PHP was available where it was written). Its
  data tables and the fixed parts of its HTML are checked by a Node test (in QuoteBill's own source, not in this download)
  against QuoteBill's own snippet code.
* WordPress writes `&` in an address as `&#038;` (esc_url); QuoteBill's page writes `&amp;`. Browsers read both the same.
* For a country's calculator in a language other than English, Korean, Japanese and German, the country's name in the
  credit line comes from QuoteBill's list where it has one, else from PHP's intl extension when the server has it, else English.
  QuoteBill's own page takes it from the visitor's browser, so the wording can differ; the calculator itself is the same.

== Installation ==

1. Download quotebill-wordpress-embeds.zip from https://quotebill.com/integrations/quotebill-wordpress-embeds.zip. It holds
   one folder, `quotebill-embeds` (this file, `quotebill-embeds.php` and `LICENSE`).
2. Upload the zip under Plugins > Add New Plugin > Upload Plugin, or unzip it into `wp-content/plugins/`.
3. Activate "QuoteBill Embeds" under Plugins.
4. Put a shortcode in a post, a page or a Shortcode block.

== Frequently Asked Questions ==

= Does it need a QuoteBill account? =

No. The embeds are free and public.

= Can the frame be restyled? =

No. The frame is the same on every site that uses it.

== To do ==

* Two more embeds are being added to QuoteBill (document totals, template finder). Add their shortcodes at the "EXTENSION
  POINT" comment in quotebill-embeds.php once their snippet code is published in QuoteBill's source; do not guess their
  addresses or attributes.
* Run it on a WordPress site and lint it with `php -l` before offering it to anyone.
* When QuoteBill's tax or embed data changes, run `node integrations/wordpress/generate-data.mjs` from QuoteBill's source to
  rewrite the data block.

== Changelog ==

= 0.1.0 =
* First version: template, tax calculator and currency converter shortcodes.
