=== Bytecode Retragere Comandă ===
Contributors: mariusbytecode
Tags: woocommerce, returns, withdrawal, refunds, consumer-rights
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Collect contract withdrawal requests in WooCommerce with a storefront form, request inbox, and customer emails.

== Description ==

**Bytecode Retragere Comandă** is a WooCommerce extension that adds a storefront form and button so customers can submit a contract-withdrawal request. Shop managers review those requests under WooCommerce → Withdrawals.

The plugin can help shops collect the information they need for a cooling-off workflow (14 days by default). It does **not** provide legal advice and does **not** guarantee compliance with GEO 34/2014, Directive 2011/83/EU, or any other law. Ask a qualified lawyer about the rules that apply to your store.

= Features =

* **Withdrawal form** – `[btrc_formular_retragere]` shortcode for logged-in customers and guests
* **Footer button** – automatic link to the withdrawal page on storefront pages
* **Request management** – dedicated list under WooCommerce → Withdrawals
* **Automatic emails** – confirmation for the customer and a notification for the shop admin
* **Withdrawal window** – configurable (14 days by default)
* **My Account link** – quick action on eligible orders
* **HPOS compatible** – supports High-Performance Order Storage
* **Privacy tools** – suggested privacy-policy text, plus personal-data export and erasure

= Initial setup =

1. Activate the plugin (WooCommerce must be installed)
2. Go to **WooCommerce → Settings → Withdrawals**
3. Publish the “Contract withdrawal” page (created automatically as a draft)
4. Confirm that the footer button appears
5. Test the form as a guest and as a logged-in customer

= Shortcodes =

* `[btrc_formular_retragere]` – displays the withdrawal form
* `[btrc_buton_retragere]` – displays the withdrawal button/link

== Installation ==

1. Upload the `bytecode-retragere-comanda` folder to `/wp-content/plugins/`
2. Activate the plugin from the Plugins screen
3. Configure the settings under WooCommerce → Withdrawals

== Frequently Asked Questions ==

= Does this plugin make my shop legally compliant? =

No. It helps you collect withdrawal requests. Legal requirements depend on your products, customers, and jurisdiction. This plugin cannot create, automate, or guarantee legal compliance.

= What withdrawal period should I use? =

Many EU distance-sale rules use a 14-calendar-day cooling-off period after the customer receives the goods. Confirm the period that applies to your shop with a lawyer. The plugin lets you change the number of days.

= How do I display the form on a page? =

Add the `[btrc_formular_retragere]` shortcode to the desired page.

= The footer button does not appear =

Confirm that the withdrawal page is published and that the “Show in footer” option is enabled in the settings.

== Privacy ==

The plugin stores withdrawal requests in the WordPress database as a private custom post type. A request may include name, email, phone, order reference, selected products, optional comments, and bank-account details used for a refund.

That data stays on the shop. The plugin does not send it to the plugin author or to other third-party services. Emails are sent through WordPress / WooCommerce mail.

Shop managers can review or delete requests from WooCommerce → Withdrawals. The plugin also hooks into Tools → Export Personal Data and Tools → Erase Personal Data, and it adds suggested text to Settings → Privacy.

== Changelog ==

= 1.0.4 =
* Rename the plugin to Bytecode Retragere Comandă and use a distinctive slug and 4-character prefix.
* Add the WordPress.org contributor username.
* Limit the missing-WooCommerce admin notice to users who can activate plugins.

= 1.0.3 =
* Add license, privacy-policy text, and personal-data export/erasure support.
* Require proof of order ownership before loading items or submitting a request.
* Document that the plugin does not guarantee legal compliance.
* Prefix global constants with RETRAGERI_COMANDA_ for Plugin Check.
* Use the retragere-comanda text domain to match the WordPress.org slug.

= 1.0.2 =
* Align version headers and WordPress.org readme requirements.
* Harden nonce checks and input sanitization for Plugin Check.
* Add a zip export script for WordPress.org uploads.

= 1.0.1 =
* Form, email, and admin workflow improvements.

= 1.0.0 =
* Initial release.
