=== Clicks Order Archiver ===
Contributors: sykologicist
Tags: woocommerce, order archive, archive orders, declutter orders, hpos
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Archive old WooCommerce orders to declutter admin screens and boost database query performance.

== Description ==

**Clicks Order Archiver** helps store managers archive completed, cancelled, refunded, or failed WooCommerce orders without altering your store's order totals or sales history.

As your WooCommerce store grows, storing tens of thousands of past orders in your primary order list screen slows down administration, order search, and database operations. Clicks Order Archiver allows you to safely move older orders to an archived status, hiding them from your primary WooCommerce order views while remaining accessible in a dedicated "Archived Orders" screen.

=== Key Features ===
* **Manual Batch Archiving:** Set custom threshold age (in days) and target order statuses (completed, cancelled, refunded, failed).
* **HPOS & Legacy Support:** Compatible with both WooCommerce High-Performance Order Storage (HPOS) and legacy post-based order tables.
* **Declutter Primary List:** Automatically excludes archived orders from the default WooCommerce Orders list.
* **Dedicated Archive Table:** View, search, and restore archived orders anytime from WooCommerce > Archived Orders.
* **Single & Bulk Restoration:** Easily un-archive orders back to active view whenever needed.
* **Data Safety:** Uses harmless metadata flags (`_clicarch_archived`) — does not modify line items, totals, or customer details.

== Installation ==

1. Upload the `clicks-order-archiver` directory to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Ensure WooCommerce is active on your site.
4. Navigate to **WooCommerce > Order Archiver** to configure archiving options and launch manual archiving batches.

== Frequently Asked Questions ==

= Does archiving delete my WooCommerce orders? =
No. Archiving does not delete any orders or customer data. It simply adds a metadata marker (`_clicarch_archived = 1`) to flag the order as archived, hiding it from the main order list while keeping it fully accessible and restoreable in WooCommerce > Archived Orders.

= Is this compatible with High-Performance Order Storage (HPOS)? =
Yes. Clicks Order Archiver fully supports WooCommerce HPOS (`wc_orders` custom tables) as well as legacy post-based (`shop_order`) order storage.

= Can I restore archived orders back to the main list? =
Yes. You can un-archive (restore) any order individually or in bulk from the **WooCommerce > Archived Orders** screen.

= Are sales reports or revenue analytics affected? =
No. WooCommerce sales reporting and customer order histories remain intact because order statuses and monetary amounts are unmodified.

== External services ==

This plugin does not contact, send data to, or load scripts from any external services, APIs, or third-party servers. All operations occur strictly within your WordPress site database.

== Screenshots ==

1. Clicks Order Archiver settings page with batch archiving controls.
2. Dedicated Archived Orders management screen under WooCommerce.

== Changelog ==

= 1.0.0 =
* Initial release. HPOS & legacy post storage compatibility, batch archiving, and bulk restore functionality.

== Upgrade Notice ==

= 1.0.0 =
Initial release for WordPress.org repository.
