=== Shoplex - EU Compliance for WooCommerce ===
Contributors: motylanogha
Tags: woocommerce, gpsr, omnibus, unit price, compliance
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 1.2.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

The consumer law obligations that apply to every WooCommerce shop selling into the European Union, in one plugin, each one switchable.

== Description ==

Selling to consumers in the European Union comes with a fixed list of things that have to appear on a product page: the unit price, the lowest price of the last 30 days when something is on sale, whether VAT is included, who made the product and who is answerable for it, and what happens if it breaks.

Shoplex implements that list. Every module names the directive or regulation it comes from, so you can check the claim rather than trust it.

= What it does =

* **Unit price.** Price per kilogram, litre or piece next to the selling price, for products where you enter the content amount. Directive 98/6/EC.
* **Lowest price in the last 30 days.** Records every price change and shows the previous lowest price whenever a product goes on sale. Directive 2019/2161, the Omnibus directive.
* **VAT notice.** States whether the price includes VAT, with a variant for sellers exempt under the small business scheme.
* **Shipping cost notice.** The "plus shipping" line that belongs next to a price when delivery is charged separately.
* **From-price.** Replaces a price range on variable products with the lowest price a customer can actually pay.
* **Delivery time.** Per product or shop-wide, on the product page. Directive 2011/83/EU art. 6(1)(g).
* **Legal guarantee and durability.** The two-year guarantee of conformity, plus durability, update period and repair information where they apply. Directives 2019/771 and 2019/770.
* **Product safety information.** Manufacturer, EU responsible person, warnings and safety instructions on the product page. Regulation (EU) 2023/988, the GPSR.
* **Checkout consent.** Terms, privacy, digital content waiver, newsletter and carrier checkboxes, each one optional. The order records what was agreed, in the wording that was shown, and when. Works on the classic and the block checkout; a box limited to certain products, countries or payment methods is shown on the classic checkout only.
* **Trader identity.** The seller details a distance contract has to state, available as a shortcode and a block.
* **Dispute resolution notice.** How a consumer takes a dispute further.

= What it does not do =

It is not legal advice, and it does not decide anything for you. It renders what you enter and records what your shop does. Whether your shop complies is your call and your responsibility.

It does not cover national law on top of the EU baseline: invoicing rules, national VAT registers, waste registers or deposit schemes are country business and are not in this plugin.

== Installation ==

1. Install and activate WooCommerce 8.0 or newer.
2. Install and activate Shoplex.
3. Go to WooCommerce > Shoplex and switch on the modules your shop needs.

== Frequently Asked Questions ==

= Does it work with the block checkout? =

Yes. The checkout consent module registers on both the classic shortcode checkout and the block checkout.

= Does it collect the price history retroactively? =

No, and nothing can. The lowest-price notice starts from the first price change recorded after you switch the module on, because no shop stores a price it never wrote down.

= Is this a replacement for a country-specific plugin? =

Only for the EU-wide part. Invoicing, national tax identifiers and country registers are deliberately out of scope.

== Screenshots ==

1. The module list, with the legal basis of each module.
2. Unit price and lowest-price notice on a product page.
3. Product safety information on a product page.

== Changelog ==

= 1.2.1 =
* Fixed: the consent fields for the block checkout are registered on init, and building them read the cart, which WooCommerce only has from wp_loaded. Every front-end load logged "get_cart was called incorrectly" with debugging on. The cart is read only once it exists.
* Changed: a consent box limited to certain products, countries or payment methods is shown on the classic checkout only. A block checkout field is registered once for the whole shop, so the digital-content waiver would otherwise appear for someone buying a chair.

= 1.2.0 =
* The checkout consent module now reaches the checkout. It registered seven checkboxes, validated them and extracted what a shopper agreed to, and nothing ever called any of it: no box was rendered, no order carried a record. Both checkouts are wired, the classic one and the block one, which share no hooks, and the order stores what was agreed in the wording that was shown plus the time it was given. The order screen shows that record.
* Renamed to Shoplex.

= 1.1.0 =
* Product fields. Unit price, delivery time, guarantee of durability, update period, repair information and the twelve GPSR fields are now filled in on an Shoplex tab of the product. They were read by the storefront from the first release but nothing could write them, so those modules rendered nothing whatever they were set to.
* Settings screen. Trader details and every notice wording are now editable, under WooCommerce, Shoplex settings. Only the module switches had a screen before.
* Delivery times are a real taxonomy, edited under Products, so a shop states the same wording across its catalogue. The delivery module read terms from a taxonomy nothing registered.
* The "show in the catalogue" switches for the unit price and the delivery time, and "show safety information on the product page", now do what they say. Nothing read them.
* Prices displayed net can be chosen again: the stored value the plugin shipped was one the code did not accept, so every shop was locked to gross.
* The VAT rate follows the site language: 23.5 in English, 23,5 in Polish. It was always written with a comma.
* Fixed the delivery notice falling back to Polish wording, and the product list column counting twelve safety fields while calling them eight.

= 1.0.0 =
* First release: unit price, lowest price in the last 30 days, VAT and shipping notices, from-price, delivery time, legal guarantee and durability, product safety information, checkout consent, trader identity and dispute resolution notice.
* The lowest-price window only compares prices recorded in the shop's current currency. Two amounts in different currencies do not compare, so a shop that switches currency starts a fresh window rather than showing a dollar figure beside a euro price.
