Skip to content

Introduction

WooCommerce records that an order changed status, but almost nothing else. When a line item's price is edited down, a coupon is applied after the fact, a fee is quietly removed, or a refund is deleted, the order history says nothing — and it never says who did any of it.

Order Audit Log fills that gap. It hooks into WooCommerce's order CRUD layer and writes an order note for every meaningful change, attributed to the user or process that made it:

Item added: "Roof Rack" x 1 ($149.00) [by mike]
Items edited - "Canvas Tote" (#312): quantity 2 -> 3, total $40.00 -> $54.00 [by sales_rep]
Coupon "SPRING10" applied (discount $10.00) [by mike]
Order updated - billing city: Springfield -> Portland; payment method: (empty) -> cod [by mike]
Refund #1042 created: $25.00, reason: "damaged in transit", manual refund [by mike]
Status changed pending -> processing [by mike]
Email sent to customer@example.com: "Your order is complete"

Why order notes?

Notes are deliberately the storage format, rather than a custom table:

  • Visible where staff already look. The audit trail appears in the order screen's notes panel, newest first, with no new UI to learn.
  • Travels with the order. Notes are exported, migrated, and deleted together with the order they belong to.
  • Queryable. Notes are WordPress comments under the hood, so they are available to WP-CLI, the REST API, and reporting tools.

Design principles

  • Log the edit, not the request. A single admin "save items" produces one note per meaningful change, with old and new values side by side.
  • Attribute everything. Each note ends with [by username] — or WP-CLI, WP-Cron, system for non-interactive changes.
  • Stay quiet when nothing interesting happened. Order creation, tax-line churn, and internal bookkeeping fields never generate notes. See Noise control.
  • Site-agnostic. The plugin knows nothing about your theme or other plugins. Integration happens through hooks, always in the direction of your code depending on the plugin.

Released under the GPL-2.0-or-later License.