=== Strainovic IT Shop Invoices for KLARA Pro ===
Contributors: gstrainovic
Tags: klara, woocommerce, invoice, accounting, switzerland
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 0.4.2
Requires Plugins: strainovic-it-shop-invoices-for-klara
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Extension for Strainovic IT Shop Invoices for KLARA: every WooCommerce order goes to KLARA automatically once it is processing or completed.

== Description ==

Requires the free plugin "Strainovic IT Shop Invoices for KLARA" (available on wordpress.org) and WooCommerce. The free plugin keeps the connection to KLARA, the settings and the order action "Transfer to KLARA", which sends a WooCommerce order to KLARA (Swiss SME software by ePost Service AG) as a customer and an invoice. This extension adds:

* Automatic transfer: as soon as an order is processing (paid) or completed, it is transferred in the background via the WooCommerce Action Scheduler. Checkout is never slowed down.
* The status that triggers the transfer is chosen with the line "Transfer as soon as the order" on the settings page of the free plugin (WooCommerce → KLARA).
* Orders that are already in KLARA are never transferred a second time.
* The order action "Transfer to KLARA" of the free plugin stays available at all times.

= Trial and licence =

* 30-day free trial per shop. It starts when the KLARA API key is saved for the first time; if the key is already saved when the extension is activated, it starts with the first call to the WordPress backend.
* Afterwards CHF 149 per shop and year. One licence covers one shop (shop URL); every further shop needs its own licence.
* Nothing is extended automatically: each further year only becomes binding with your payment.
* You don't need to ask for an invoice: the annual invoice arrives by email 7 days before the trial ends, payable within 30 days, as soon as your billing address is entered. Enter it with the link "Billing address and invoices" in the row "Licence" of the settings page; an email reminds you of it 7 days before the trial ends. The page also lists your invoices. Transfers keep running until the invoice is due.
* When the trial or the paid year has ended, orders are not transferred but marked as waiting (order note). A notice in the WordPress backend shows the number of waiting orders. Want to continue? Then pay the invoice (link "Billing address and invoices" in the notice); otherwise you don't need to do anything and no costs arise. Once the invoice is paid, the waiting orders are transferred automatically. The order action "Transfer to KLARA" of the free plugin keeps working.
* If the licence service cannot be reached, the extension keeps working with the last known status; a network error never stops a transfer.

More at https://www.strainovic-it.ch/en/klara-shop-connector/

This plugin is not affiliated with or endorsed by KLARA or ePost Service AG. KLARA is a trademark of its owner.

== External services ==

Like the free plugin, this extension sends order data to the KLARA Public API, exclusively through the free plugin: every order when it reaches the chosen status (see the free plugin's readme for the data sent and the terms of KLARA).

The trial and the licence are managed by strainovic-connect, a service by Strainovic IT: https://connect.strainovic-it.ch. When the API key is saved the first time, the extension registers the shop (sent: shop URL, administrator email, site language, product name). Afterwards, once a day and when the settings page is opened (at most every 6 hours), it reads the trial or licence status (sent: site ID, signed timestamp). Orders and customer data are never sent to this service. Privacy policy: https://www.strainovic-it.ch/datenschutz/

Site owners must mention the transfer to KLARA in their own privacy policy. After the trial or the paid year has ended, waiting orders stay in the WordPress database until they are transferred.

== Installation ==

1. Install and activate the free plugin "Strainovic IT Shop Invoices for KLARA" from wordpress.org and WooCommerce.
2. Enter the KLARA API key under WooCommerce → KLARA.
3. Download the ZIP of this extension from https://www.strainovic-it.ch/en/klara-shop-connector/ and upload it under Plugins → Add New → Upload Plugin, then activate it.
4. Under WooCommerce → KLARA, choose with "Transfer as soon as the order" whether orders are transferred when they are processing or completed.

== Frequently Asked Questions ==

= Does the free plugin have to stay installed? =

Yes. The extension needs the free plugin "Strainovic IT Shop Invoices for KLARA" active; it cannot be installed without it.

= Will an order be transferred twice? =

No. Orders that are already in KLARA are never transferred again, neither automatically nor through the order action.

= What happens after the trial ends? =

Orders are no longer transferred automatically but marked as waiting with an order note. A notice in the WordPress backend shows how many orders are waiting. Want to continue? Then pay the invoice that arrived by email (link "Billing address and invoices" in the notice); otherwise you don't need to do anything and no costs arise. After payment the waiting orders are transferred automatically. The order action "Transfer to KLARA" keeps working in the meantime. The same applies when a paid year ends.

= Does one licence cover several shops? =

No. One licence is valid for one shop (shop URL). Every further shop needs its own licence; every shop has its own 30-day trial.

= Which languages are available? =

English, German (de_CH, de_DE), French and Italian.

= Does the licence service receive order data? =

No. Only the shop URL, the administrator email, the site language and the product name are sent at registration, and afterwards the site ID and a signed timestamp. Orders and customer data stay between your shop and KLARA.

== Changelog ==

= 0.4.2 =
* While an invoice is open and its payment period runs, the row "Licence" shows "Invoice open; the transfer to KLARA continues up to and including <due date>." instead of the end of the trial or of the paid year.

= 0.4.1 =
* The annual invoice arrives by email once the billing address is entered; the row "Licence" and the notice link to "Billing address and invoices". After the trial or the paid year has ended: continue only with payment, otherwise no costs.

= 0.4.0 =
* First release as an extension of Strainovic IT Shop Invoices for KLARA: automatic transfer, 30-day trial per shop.
