=== Wuclean → Database Cleaner for WooCommerce ===
Contributors: paythem, andylamb, freemius
Tags: woocommerce, cleanup, optimization, maintenance, database
Requires at least: 6.2
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.1.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Wuclean identifies cleanup opportunities that help you to keep your WooCommerce store clean, lean and fast.

== Description ==

Wuclean scans WooCommerce Products, Orders (HPOS), Coupons, Customers, Images and more to detect items and orphaned data that you might want to delete. Intelligent search patterns ensure precision and safety. Manual review and selective deletion ensure you never lose important data accidentally.

### Key Features

**📦 Product Cleanup**
* Detect missing product meta and orphaned variations
* Detect orphaned product meta, variations, reviews and term relationships
* Detect global product attributes not used by any products

**🛒 Order Cleanup** (HPOS only)
* Prioritize orphaned orders, guest orders and old orders for deletion
* Detect orphaned HPOS order meta

**👥 Customer Cleanup**
* Identify fake customers and inactive customers (incl custom roles)
* Detect orphaned usermeta, customer lookup data, comments/reviews

**🖼️ Media Library**
* Quick Scan detects unused Media Library images
* Unused Media Library images can be protected, trashed and deleted

**⏱️ Scheduled Actions**
* Cleanup completed and failed actions independently
* Trim action scheduler logs

**🔧 Other Cleanup**
* Trash and delete spam product reviews and comments
* Delete post revisions (keep last X, max age)
* Delete auto-drafts older than X days
* Delete trashed posts/pages older than X days
* Delete expired transients and timeouts
* Detect orphaned postmeta, commentmeta, usermeta and term relationships.

View additional information and details on [paythem.net](https://paythem.net/wuclean-the-woocommerce-cleanup-assistant-plugin/).

### Why Choose Wuclean?

* **Smart Detection** - Intelligent filtering accurately identifies cleanup opportunities with high confidence
* **Shared Hosting Optimized** - Batch processing prevents timeouts on limited resources
* **Coding Standards** - Built for WooCommerce following WordPress Coding Standards with proper security measures

### Third-party service (Freemius)

This plugin includes the **Freemius** SDK. Freemius may connect to its servers for **software licensing**, **update checks**, and (if you opt in) **plugin insights**—not to run cleanups remotely; all scanning and deletion run on your site. See the FAQ for Freemius **Terms of Use** and **Privacy Policy** links.

== Support ==

Email support can be initiated within the plugin.

== Pro Version ==

Wuclean Pro offers automation, advanced features and bulk operations:

**Products:** Schedule scans and auto-delete orphaned data, unused attributes and trashed products.
**Orders:** Automate detection, trashing and deletion of orders, order notes, expired coupons and orphaned order data.
**Customers:** Auto-detect inactive customers, send custom reactivation emails and auto-delete non-responders.
**Images:** Advanced Deep Scan and Uploads folder management. Schedule periodic scans.
**Scheduled Actions:** Automate daily cleanup of WooCommerce Action Scheduler and logs.
**Other Cleanup:** Automate daily cleanup (expired transients, orphaned meta, revisions, etc.)

== Frequently Asked Questions ==

= Does this plugin require HPOS? =

High-Performance Order Storage needs to be PRIMARY storage for Order Cleanup features. All other modules work without HPOS. 

= Will this work on shared hosting? =

Yes! Wuclean is specifically optimized for shared hosting. Batch processing prevents timeouts on limited resources.

= Is data deletion permanent? =

Yes, once you delete data, it is permanent. Ensure that you have backups.

= What's the difference between Free and Pro? =

The free version focuses on detection and providing information needed to manually clean items. Pro adds automation and advanced features such as Deep Scan, bulk operations and automatic deletion options.

= Does this plugin use an external service? =

Yes. **Freemius, Inc.** is only used for in-plugin licensing features. You may optionally and explicitly opt in—share non-sensitive usage information as described in their policies.

* Freemius Terms of Use: https://freemius.com/terms/
* Freemius Privacy Policy: https://freemius.com/privacy/

== Screenshots ==

1. Dashboard - Quick overview of module settings and pending items requiring attention
2. Product Cleanup - Manually scan and review product issues, orphaned data, and unused attributes
3. Order Cleanup - Manually flag orders and detect orphaned order meta (requires HPOS)
4. Customer Cleanup - Manually flag fake and inactive customers for review and deletion

== Installation ==

1. Install via WordPress plugins screen or upload the plugin files to `/wp-content/plugins/wuclean-database-cleaner-for-woocommerce/`
2. Activate the plugin through the 'Plugins' screen in WordPress
3. Navigate to Wuclean in the admin menu
4. **Important:** Order cleanup features require HPOS (High-Performance Order Storage) to be enabled in WooCommerce as primary storage

== Changelog ==

= 1.1.2 = 2026-05-17
* Enhance - Simplified image settings and improved image scanner logic

= 1.1.1 = 2026-05-08
* Enhance - Improved customer deletion logic

= 1.1.0 = 2026-04-30
* Enhance - Add Quick Media Library Scan (manual) and improve image scan performance for large uploads folders
* Enhance - Expand premium scan batch size setting (10–200) and improve guidance text
* Security - Access limited to Administrators (previously Shop Managers also)

= 1.0.8 = 2026-04-22
* Enhance - Auto-restart failed image scan crons in case of failure

= 1.0.7 = 2026-04-01
* Refactor - Minor code simplifications

= 1.0.6 = 2026-03-26
* Refactor - WordPress.org compliance, security, and compatibility improvements (nonces, escaping, SQL hardening)
* Refactor - One-time upgrade routine: move Image Trash folder to wp-content/uploads/wuclean-trash
* Enhance - General performance and usability improvements
* Requires WordPress 6.2+ - Bumped minimum required WordPress version to 6.2

= 1.0.5 = 2026-01-16
* Enhance - Added tables for image scans - more efficient
* Refactor - Improved WP compliance & security

= 1.0.4 = 2026-01-09
* Fix - Improved WP compliance & security

= 1.0.3 = 2026-01-08
* Enhance - Added coupon cleanup
* Enhance - Added image filters
* Fix - Improved WP compliance & security

= 1.0.2 = 2025-12-03
* Fix - Minor security issues corrected

= 1.0.1 = 2025-11-28
* Fix - Minor logic errors corrected

= 1.0.0 = 2025-11-19
* Initial Release

== Upgrade Notice ==

Requires WordPress 6.2+ (for safe identifier placeholders in database queries), WooCommerce 6.0+, and HPOS for order cleanup features.


