=== Bear Essentials: Delete My Account for WooCommerce ===
Contributors: bearbrandingco
Tags: delete account, account deletion, woocommerce, accounts, privacy
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.2.9
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Let customers securely delete their WooCommerce or WordPress accounts, with password confirmation and safeguards for existing orders.

== Description ==

**Let customers delete their own accounts easily and securely.**

Bear Essentials: Delete My Account for WooCommerce gives customers a simple way to delete their accounts directly from their My Account page.

Features include:

* Easy self-service account deletion.
* Password confirmation for security.
* Protection for existing orders and competition entries.
* A Request Help option when deletion needs reviewing.
* Works with WooCommerce and standard WordPress websites.
* Free, lightweight and easy to use.

Developed by Bear Branding Co.

On standard WordPress websites without WooCommerce, add the account deletion form to a page using the shortcode in the Installation section. Eligible customer and subscriber accounts are supported.

Competition safeguards cover detected records in supported integrations such as Flintop Giveaways. Historical records can also require Request Help; prize resolution is not automatic. Completed WooCommerce orders do not automatically block account deletion.

Part of **Bear Essentials**: straightforward solutions to everyday WordPress problems. Simple tools without unnecessary complications.

== Installation ==

= Option 1: Install through WordPress (Recommended) =

1. Go to **Plugins → Add New Plugin** in your WordPress dashboard.
2. Search for **Bear Essentials: Delete My Account for WooCommerce**.
3. Click **Install Now**, then **Activate**.

= Option 2: Upload the plugin =

1. Go to **Plugins → Add New Plugin → Upload Plugin**.
2. Select the plugin ZIP file.
3. Click **Install Now**, then **Activate**.

= Getting Started =

1. Once activated, find the plugin under **Plugins → Installed Plugins**.
2. To configure it, go to **Users → Account Deletion**.
3. Enable account deletion when you're ready.
4. WooCommerce customers can then use **My Account → Delete My Account**.

= Using WordPress without WooCommerce? =

Add `[beaam_delete_my_account]` to any page where you want users to access account deletion.

**Note:** Account deletion is disabled by default. Review any customer records you may need to retain before enabling it.

== Frequently Asked Questions ==

= Can WooCommerce customers delete their accounts from My Account? =

Yes. Once enabled, eligible signed-in customers use Delete My Account and
confirm their password and permanent deletion. Safety checks run before erasure.

= Does this work without WooCommerce? =

Yes. Add [beaam_delete_my_account] to a WordPress page. WooCommerce and Flintop
are optional integrations, not installation requirements.

= Does account deletion delete completed WooCommerce orders? =

No. Orders are detached, not deleted. Completed orders do not automatically
prevent deletion; supported WooCommerce privacy settings control anonymisation
or invoice-identity retention. Owners must justify retained personal information.

= Why can a customer be asked to Request Help? =

Outstanding obligations, competition records, authored content or failed checks
can require review. Request Help preserves the account without bypassing checks.
Replies appear on the customer's deletion page.

= Is deletion enabled when I install or upgrade the plugin? =

No. New installations and version upgrades start OFF. Administrators use
Users > Account Deletion; emergency OFF takes priority. This is not bulk deletion.

= Does this erase every record or guarantee GDPR compliance? =

No. Transactions, request/audit evidence and external copies may remain.
Owners must justify retention. No legal or app-store certification is provided.

== Security and data handling ==

Deletion requires the saved administrator toggle to be ON. Version upgrades
reset it to OFF. BEAAM_ENABLE_SELF_SERVICE_DELETION=false in trusted site
configuration overrides the toggle; the plugin never changes that configuration.
A legacy true constant alone does not enable deletion. Staging and production
use the same process without a development allowlist or test helper.

Signed-in customers/subscribers confirm their password and permanent deletion.
Checks include POST, user/session-bound nonces, HTTPS (except explicit local
environments), throttling, per-user locking and repeated safety checks.
Privileged roles and multisite are unsupported. Successful deletion revokes
sessions. Passwords are checked with WordPress, not stored by this plugin.

Supported WooCommerce privacy settings control anonymisation or invoice
preservation. Orders and financial totals/currency are verified and retained;
unnecessary standard contact, shipping, tracking and customer-note fields are
minimised when invoice identity remains. Previously used integrations that
become unavailable fail safely rather than treating their records as absent.

All detected Flintop ticket, winner and instant-win ownership records cause a
hold, regardless of status, including historical, archived, trashed or
unregistered-status records. Stored ownership is checked even when Flintop is
inactive. A closed draw is not proof that prize obligations are settled.
Request Help does not settle prizes, transfer entitlements or remove records.
Safe historical hold resolution is not automated or verified. The plugin never
suppresses Flintop's deleted_user hooks or starts its queue.

== Privacy ==

No telemetry, remote service, license server or customer-email transport is
included. Requests, statuses, timestamps, original numeric customer IDs, help
messages/replies, processing receipts and pseudonymous signed audit events are
stored in the site's WordPress database. Existing notes and approvals survive.

Necessary orders, requests and audit evidence may survive account deletion and
plugin uninstall. Free text can contain personal information. Site owners must
justify retention, explain it in their privacy policy and minimise unnecessary
identifying text. WordPress privacy exporter and eraser callbacks disclose
retained request evidence; they do not promise erasure of external services,
independent app tokens or backups.

Audit identifiers and signatures use separate random installation keys in a
non-autoloaded option, independent of WordPress authentication secrets and salt
rotation. Preserve these keys with secured database backups. Missing/invalid
keys stop signing/deletion rather than replacing keys for existing evidence.
Old salt-derived signatures remain unchanged and explicitly unverified.
See AUDIT-SECURITY.md for key-loss, legacy and threat-boundary limitations.

== Compatibility and limitations ==

Installed testing used WordPress 7.1.3, PHP 8.2, MySQL 8.4, WooCommerce 11.2.1/HPOS
and Flintop Giveaway 13.5.0. Standalone/absent integrations have isolated API
contract coverage, not universal version/theme/extension testing.

Staging tests covered empty-account deletion, completed-order preservation and
unresolved prizes; RC.2 covered status-independent ownership. Anonymisation
contract tests do not imply all installed combinations were destructively tested.

Completion is reported only after verified account removal and saved evidence.
Erasure is not one atomic transaction: a later failure can leave some data erased
and require recovery. Do not blindly retry an incomplete operation. Plugin-file
rollback cannot restore deleted users or personal data.

Custom stores, external processors, app tokens and backups are not universally
erased. Mobile-app/public-page/store checks remain each site's responsibility.

== Screenshots ==

1. WooCommerce My Account dashboard with the Delete My Account option.
2. Customer account deletion form with password confirmation and permanent-deletion consent.
3. Account deletion disabled: customers are told that no account will be deleted.
4. Users > Account Deletion: administrator ON/OFF switch, Request Help inbox and View History.

== Changelog ==

= 1.2.9 =
* Rename the display name and simplify the description and installation instructions.
* Naming, documentation and version metadata only; no deletion behaviour changes.
* Account deletion resets to OFF on upgrade, as in earlier versions.

= 1.2.8 =
* Simplify public installation instructions and direct advanced users to the
  included documentation.
* Documentation and version metadata only; no functional changes.

= 1.2.7 =
* Refresh the WordPress.org description and add four real interface screenshots.
* Documentation and version metadata only; no deletion logic changes.

= 1.2.6 =
* Replace authentication-salt-derived audit signatures and identifiers with
  independent installation keys; preserve and clearly identify legacy records.
* Use request-local random keys for order-erasure comparisons.
* Preserve default-OFF execution, identity checks and integration protections.

= 1.2.5 =
* WordPress.org submission preparation: nonce sanitisation, native style loading,
  compatibility metadata and GPL license text. No new deletion functionality.

= 1.2.4 =
* Add Return to Homepage after successful deletion using the native home URL.
* Keep completed requests in View History, without deleting any evidence.
* Hide replies for deleted accounts; preserve existing security and safety checks.

= 1.2.3 =
* Add a clear empty-request message and My Account explanation; tidy admin spacing.
* Presentation only. No functionality, security or deletion-behaviour changes.

= 1.2.2 =
* Add an immediately saved, administrator-only ON/OFF toggle to Account Deletion.
* Keep new/upgraded installations OFF; server-side OFF overrides take priority.
* Update plugin description. No customer-deletion or integration workflow changes.

= 1.2.1 =
* Remove the built-in staging account allowlist; use the same process on staging
  and production when explicitly enabled. Execution remains OFF by default.

= 1.2.0 =
* Final distribution of tested 1.2.0-rc.2; version labels and documentation only.
* Standalone WordPress support with optional WooCommerce and Flintop checks.
* Status-independent stored ticket, winner and instant-win ownership protection.
* Existing request, approval and audit compatibility; execution OFF by default.
