=== EU Withdrawal Button for Woo ===
Contributors: manapoint
Tags: withdrawal button, consumer rights, legal compliance, omnibus directive, woocommerce compliance
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.2.0
License: GPLv2 or later

A lightweight, free and complete HPOS-native solution to comply with the EU Directive 2023/2673, SHA-256 proof, starting 19 June 2026.

== Description ==

Starting June 19, 2026, the EU Directive 2023/2673 requires e-commerce stores selling to EU consumers to provide an easy-to-use 2-click withdrawal button for order cancellations. 

This micro-plugin strictly solves this legal requirement without adding unnecessary weight to your site. 

**Important notice:** This plugin is provided and maintained as a free community resource. 
Bug reports are welcome and will help improve future releases, but individual troubleshooting and custom support are not guaranteed. 
If you love this plugin, a 5-star review is highly appreciated to support our free effort!

= Core Features =

* **2-Click Cancellation:** Injects a native, accessible HTML5 `<dialog>` in the My Account area for eligible orders (completed within the last 14 days).
* **Immutable Legal Logs:** Maintains a cryptographically hashed log (SHA-256) of all withdrawal requests in an isolated custom table for legal proof.
* **100% HPOS Compatible:** Built entirely for WooCommerce High-Performance Order Storage.
* **No-Code Styling:** Includes a lightweight backend panel to match the button colors and shape (rounded/square) to your theme.
* **Lightweight Plugin:** No jQuery, no heavy frameworks. Just vanilla JS and native browser APIs.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/eu-withdrawal-button-lite` directory, or install through the WordPress plugins screen.
2. Activate the plugin.
3. Navigate to WooCommerce > EU Withdrawal to customize your button appearance.
4. The button automatically appears for eligible orders in the My Account section.

== External services ==

This plugin does not use any third-party or external services. All data processing is handled locally.

== Changelog ==

= 1.2.0 =
* **Major Update:** Integrated Professional features into the base version.
* Added Immutable SHA-256 Legal Logs for audit compliance.
* Added No-Code Styling panel under WooCommerce > EU Withdrawal.
* Updated Plugin Name to "EU Withdrawal Button for Woo".
* Improved security with rigorous sanitization and nonce checks.
* Enhanced UI using native HTML5 Dialog API and CSS Variables.

= 1.1.1 =
* Full compatibility with WordPress 7.0.
* Official declaration of WooCommerce HPOS compatibility.
* Improved HTML output security and string escaping.
* Added WC_Order integrity checks for more robust AJAX handling.
* Asset versioning synchronization (v1.1.1).