Archive Order Notes for WooCommerce (micro plugin) – Lifetime Documentation and FAQ

Archive Order Notes for WooCommerce, by Naked Cat Plugins, lets you automatically archive or delete old WooCommerce order notes on a schedule (or via WP-CLI) to keep your database clean and improve performance. This page covers setup, accessing archived notes, licensing, and developer hooks. For pricing and installation, see the product page.

Support

How to request technical support?

If the issue you need technical support with is not covered on this page, click the link next to the license key in the plugin settings, then submit a ticket with your request.

Where do I report security vulnerabilities found in this plugin?

You can report security bugs through the Patchstack Vulnerability Disclosure Program.

The Patchstack team helps validate, triage, and handle any security vulnerabilities.

Licensing

How to transfer the license to another domain?

You should ask for the domain change in your customer area, next to the original order details.

After you receive our reply confirming that the license key is free, go to the old website settings, remove the key, and save. Then go to the new website settings, insert the same key, and save. If you cloned the website, the license key is in the database; you need to remove it, save, insert it again, and save again.

General operation

Introduction

In this documentation, we refer to “order notes” or “comments” depending on the context. This is because, although the plugin processes only order notes by default, a developer filter allows overriding this behavior and processing other types of WordPress comments. For most users, you should read “comments” as “order notes”.

Getting started guide

Install the plugin and go to WooCommerce > Settings > General > Archive Order Notes for WooCommerce. Insert the provided license code to activate it.

Define if the order notes should be archived or permanently deleted, and the age of order notes to process.

The plugin uses WooCommerce’s bundled Action Scheduler and runs an action every hour, honoring the settings and processing 500 comments per run.

Accessing archived order notes

Archived order notes are loaded on the order edit screen alongside non-archived notes. For now, archived customer order notes are not displayed in the order details under “My Account”.

Archive or delete order notes (comments) with WP-CLI

If you want to process a large number of order notes immediately, you can use our WP-CLI command:

wp nakedcat-archive-order-notes archive

This command will:

  • Honor the Archive or delete setting.
  • Honor the Process older than setting.
  • Process 500 comments by default, unless this value is overridden by the nakedcat_archive_order_notes_woo_comments_per_run filter or by the --limit argument.

You can override the number of comments to archive or delete. The default is 500.

wp nakedcat-archive-order-notes archive --limit=1000

You can also count how many comments are eligible for archiving or deletion according to the plugin settings:

wp nakedcat-archive-order-notes count

If you want to archive or delete all eligible order notes (according to the plugin settings), you can first count them and then use the --limit argument to process all in one run.

Developer hooks

The included technical support does not include the usage of these hooks.

Filter: nakedcat_archive_order_notes_woo_enable_logging

Allows disabling the plugin logging at WooCommerce > Status > Logs.

  • Default: true
  • Parameters: $enable_logging
  • Return: bool

Filter: nakedcat_archive_order_notes_woo_comments_per_run

Allows overriding the number of comments processed per run of the scheduled task or the WP-CLI command.

  • Default: 500
  • Parameters: $comments_per_run
  • Return: integer

Filter: nakedcat_archive_order_notes_woo_optimize_interval

Allows overriding the interval between runs of comments table optimization.

  • Default: 259200 seconds (72 hours)
  • Parameters: $seconds
  • Return: integer

Filter: nakedcat_archive_order_notes_woo_comments_types

Allows adding other comment types to the archiving/deletion processing. By default, only order notes are processed, which is the plugin’s goal. Use at your own risk.

  • Default: array( 'order_notes' )
  • Parameters: $comment_types
  • Return: array

Action: nakedcat_archive_order_notes_woo_process_comments

Internal hook to run a batch of comments archiving or deletion. You can pass the number of comments to process and whether the action is being called from WP-CLI. Not intended for use by third-party developers. Use at your own risk.

  • Parameters: $limit, $wpcli