=== WebLegal ===
Contributors: lauyansoftware
Tags: gdpr, privacy policy, terms and conditions, woocommerce, legal
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Publishes the legal documents you bought on WebLegal.ai as pages on your own site, and wires them into WordPress and WooCommerce.

== Description ==

This plugin is an interface to **WebLegal.ai**, a paid external service that writes legal documents for websites and online shops: privacy policy, cookie policy, terms of use and terms of sale, adapted to your country rather than merely translated.

**The plugin does not generate documents and does not sell anything inside your admin.** You buy your pack on [weblegal.ai](https://weblegal.ai/), then paste your invoice number and the email you used at checkout into the plugin's settings screen. The plugin then:

* downloads each document you bought,
* publishes it as a regular WordPress page on **your** domain,
* sets it as the native WordPress privacy policy page where applicable,
* sets it as the WooCommerce terms page, so the terms checkbox appears at checkout.

Your pages live on your own site. They are ordinary pages: you can rename them, move them, add them to a menu, and they keep working. The pages do not update themselves: a button downloads again the documents attached to your invoice and refreshes your pages.

= Why the pages must live on your domain =

A legal page linked from someone else's site brings you no search visibility and leaves you dependent on that site staying up. This plugin copies the content into your own pages for that reason.

= The service behind the plugin =

WebLegal.ai is published by Lauyan Software. Documents are sold in packs; pricing and terms are on [weblegal.ai](https://weblegal.ai/). The plugin is free and works only with a purchase you have already made.

= Languages =

The plugin interface is in English and fully prepared for translation; translations are delivered through translate.wordpress.org. The documents themselves are written in the language you choose when you order on weblegal.ai (12 languages are available), independently of the plugin's interface.

== Installation ==

You need a WebLegal.ai purchase before the plugin has anything to publish. If you do not have one yet, buy a pack on [weblegal.ai](https://weblegal.ai/) first — the plugin never sells anything inside your admin.

1. Install the plugin through **Plugins > Add New**, or upload the `weblegal` folder to `/wp-content/plugins/`.
2. Activate it through the **Plugins** screen.
3. Go to **Settings > WebLegal**.
4. Enter the invoice number from your purchase email (for example `WEBLEGAL-0123`) and the email address you used at checkout.
5. Click **Publish my pages**.

The plugin creates one page per document you bought, sets the WordPress privacy policy page, and — when WooCommerce is active — the WooCommerce terms page. The pages are ordinary pages: rename them, move them, add them to a menu.

When your documents change on WebLegal.ai, come back to **Settings > WebLegal** and click **Update my pages**. The pages never update by themselves.

Deactivating the plugin leaves your pages untouched. Uninstalling removes only the plugin's own settings.

== External services ==

This plugin relies on **WebLegal.ai**, an external service run by Lauyan Software (France), to retrieve the documents you bought there.

* **What is sent, and when:** only when you click "Publish my pages" or "Update my pages" in its settings screen, the plugin sends your invoice number and the email address you entered to `https://weblegal.ai/api/customer-documents.php`, then downloads each listed document from `https://weblegal.ai/documents/`. Nothing is sent on page views, and no visitor data is ever sent.
* **Why:** to find the documents attached to your purchase and copy them into pages on your site.
* **Terms of use:** https://weblegal.ai/documents/lauyan-software/weblegal-ai/terms-of-use/
* **Privacy policy:** https://weblegal.ai/documents/lauyan-software/weblegal-ai/privacy-policy/

== Frequently Asked Questions ==

= Do I need a WebLegal account? =
No account is created. You identify your purchase with your invoice number and the email address used at checkout.

= Does the plugin work without WooCommerce? =
Yes. Without WooCommerce it publishes your pages and sets the WordPress privacy policy. The terms-page setting only exists when WooCommerce is active.

= What happens to my pages if I deactivate the plugin? =
Nothing. The pages stay published and stay yours. Uninstalling removes only the plugin's own settings.

= Does it add a cookie banner? =
Not in this version. WebLegal offers a free cookie banner, but it is not part of this plugin.

= Does it send data anywhere? =
It contacts weblegal.ai to list and download the documents attached to your invoice. It sends your invoice number and the email you entered, and nothing else. No visitor data ever leaves your site.

== Screenshots ==

1. The settings screen, showing what is missing on the site.
2. Pages published and wired into WordPress and WooCommerce.

== Changelog ==

= 0.1.0 =
* First release: publish purchased documents as pages, wire the WordPress privacy policy and WooCommerce terms settings, update on demand.
