=== ConformKit – EU Legal Guarantee Notice ===
Contributors: andreacreativesoft
Tags: compliance, consumer rights, legal guarantee, warranty, woocommerce
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.5.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

The EU legal guarantee notice in every EU language, the GARAN label, the
withdrawal button, Omnibus prices and defect claims.

== Description ==

From 27 September 2026, every trader selling goods to consumers in the EU must
display the harmonised notice on the legal guarantee of conformity, in a
prominent manner, in the language of the country where the goods are offered.
Online, it must be shown in colour.

ConformKit displays the official notice as published in the Official Journal.
It does not redraw it, does not translate it and does not write its own legal
text — the notice has no editable element, and a redrawn notice is not the
notice.

= The notice =

* Creates a dedicated notice page on activation
* Shortcode `[conformkit_notice]` for anywhere else
* Optional link in the footer, on the WooCommerce product page and at the checkout (classic and block-based), as a link or a popup
* Picks the language from your site automatically, including WPML and Polylang
* Falls back to English when a language is missing — never to an invented notice
* Links through to the official text of the regulation in the same language
* All 24 official EU languages, in colour, as required online

= For WooCommerce shops =

Every module is off until you turn it on, under ConformKit > Shop. Nothing is locked.

* **GARAN label** (Annex II of Regulation (EU) 2025/1960) for products whose producer offers a commercial guarantee of durability longer than two years. You enter the years, the producer and the model on the product; ConformKit fills in only those fields, in the Inter font, and leaves the rest of the official label untouched. Full label or nested display that opens on the first click or tap. Shortcode `[conformkit_garan]`.
* **Withdrawal button** (Directive (EU) 2023/2673): a two-step "Withdraw from contract here" / "Confirm withdrawal here" form, saved before any email is sent, with a confirmation to the customer, a link in My Account and the order emails, a list of requests in the admin and CSV export. Shortcode `[conformkit_withdrawal]`.
* **Model withdrawal form** (Annex I(B) of Directive 2011/83/EU) filled in with your company details, printable and as PDF. Shortcode `[conformkit_withdrawal_model]`.
* **Lowest price of the last 30 days** next to every discount (Omnibus, Article 6a of Directive 98/6/EC). The price history is written when a product is saved, so the shop pages make no extra database queries. A warning tells you when the crossed-out price is not that price.
* **Product safety (GPSR), batteries, security updates (CRA), EU operator:** one click in ConformKit > Shop installs the free companion plugin [Product Compliance Fields](https://wordpress.org/plugins/product-compliance-fields/), which adds these fields per product, per category and shop-wide. ConformKit reads them for its checks.
* **Defect claim form** under the legal guarantee of conformity: the customer chooses repair, replacement, a price reduction or ending the contract. Each claim is saved, confirmed by email and listed in the admin with CSV export. Shortcode `[conformkit_claim]`.
* **Company details** in the footer or anywhere with `[conformkit_company]`.

= What it does not do =

* It does not give legal advice. Responsibility for displaying the notice
  correctly, and for the accuracy of anything you enter, remains with you.
* It does not decide whether the obligation applies to you. Services are not
  covered, and food and the other cases in Article 3(3) of Directive 2011/83/EU
  are excluded.
* It does not decide whether a product qualifies for the GARAN label: only the
  producer can offer a commercial guarantee of durability.

= Where the notice comes from =

The notice is Annex I of Commission Implementing Regulation (EU) 2025/1960, as
published in the Official Journal of the European Union and available on
EUR-Lex in each official language.

= Legal =

Content published by the European Commission is reused under CC BY 4.0, in line
with Decision 2011/833/EU.

The GARAN label is filled in with the Inter typeface (SIL Open Font License
1.1), as Annex II requires. The PDF of the model withdrawal form embeds a subset
of DejaVu Sans (Bitstream Vera licence). Both licences are in assets/fonts.

ConformKit makes no external requests. The GARAN images are generated on your
own server and saved in wp-content/uploads/conformkit/garan.

ConformKit is an independent product. It is not affiliated with, endorsed by, or
sponsored by the European Commission or any institution of the European Union.

== Frequently Asked Questions ==

= Does this apply to my shop? =

The notice applies to traders selling goods — tangible movable items — to
consumers in the EU. Services are not covered, and food and the other cases in
Article 3(3) of Directive 2011/83/EU are excluded. If you are unsure, ask a
lawyer, not a plugin.

= Why is the notice an image and not text? =

Because Annex I of Regulation (EU) 2025/1960 has no editable element. The
notice is reproduced as published.

= Which languages are supported? =

All 24 official EU languages, for the notice itself. The plugin interface ships
translated into six and grows through translate.wordpress.org.

= Will updating turn on the new shop features? =

No. The withdrawal button, the Omnibus price, the GARAN label, the claim
form and the product page link are all off until you
turn them on. The price history starts recording right away, so the 30 days
are there when you need them.

= Does it work with the new block-based checkout? =

Yes. The reminder is added after the checkout block as well as on the classic
checkout, and it is printed only once either way.

== Screenshots ==

1. The official notice on the shop's own guarantee page, in the language of the country where the goods are offered.
2. The reminder at checkout, opening the notice without taking the customer away from the order.

== Changelog ==

= 0.5.0 =
* New: GARAN label for the commercial guarantee of durability, full or nested, filled in on the product.
* New: link to the notice on the WooCommerce product page, as a link or a popup.
* Product safety (GPSR) and the other product fields live in the free companion plugin Product Compliance Fields; ConformKit > Shop installs or activates it and ConformKit reads its data.
* New: defect claim form under the legal guarantee, with email confirmation, admin list and CSV export.
* New in the free plugin: withdrawal button with confirmation email, model withdrawal form with PDF, company details and the lowest price of the last 30 days. Every module is off until you turn it on.
* Withdrawal form: the per-order limit counts only wrong order/email pairs, the visitor IP is REMOTE_ADDR (filter conformkit_client_ip), and a partial withdrawal can be repeated only after 24 hours.
* Developers: filters conformkit_language (notice language), conformkit_garan_data (GARAN fields), conformkit_notice_file (serve a newer official file, path + URL), conformkit_gpsr_data (GPSR data used by the checks).
* Omnibus: the 30-day window starts when the discount starts, so changing a running discount does not move it.

= 0.4.1 =
* Fix: the checkout popup works again after WooCommerce refreshes the classic checkout. Without JavaScript the link opens in a new tab, so the customer keeps the checkout.
* Fix: a deleted notice page is created again, and an unpublished one is reported in the admin.
* Fix: an unknown language in the shortcode shows the English notice instead of a broken image. Several classes in class="" are kept.
* The notice image has width and height, so the page does not jump while it loads.
* Options are removed when the plugin is deleted. The notice page stays.
* The notice page is no longer checked on AJAX requests or when the link points to your own page.

= 0.4.0 =
* The settings screen script is enqueued instead of printed inline.
* Translations are left to translate.wordpress.org.

= 0.3.0 =
* The checkout reminder can open the notice in a popup instead of sending the
  customer to another page. Uses the browser's own dialog element: no library,
  no page builder required.
* The notice image is only downloaded when the popup is opened.
* Without JavaScript the link still opens the page, so the notice is always
  reachable.

= 0.2.0 =
* The footer link and the checkout reminder can now show an icon, text, or both.
* The link can point to a page of your own instead of the page ConformKit creates.
* Existing sites keep showing exactly what they showed before.

= 0.1.1 =
* The footer link and the checkout reminder load their styles again.
* The settings screen and every admin screen warn when a site language has no
  notice file and the notice falls back to English.
* The admin notice names the exact file the notice is read from.

= 0.1.0 =
* First release: the harmonised notice, page, shortcode, footer link and
  WooCommerce checkout reminder.
