Appearance
Noise control
An audit log is only useful if people trust it enough to read it. Most of the plugin's internal logic exists to keep the trail quiet, not to make it louder.
Order creation is suppressed
A new checkout order would otherwise generate a burst of notes — one per line item, shipping row, and coupon, plus field changes as totals are computed. The plugin tracks orders created during the current request and suppresses all item and field notes for them; the audit trail begins with the first edit, which is what audits care about.
Draft orders (auto-draft, and the Store API's checkout-draft) are suppressed the same way while the cart is still being synced into them.
Tax recalculation churn
WooCommerce implements "recalculate taxes" by deleting and re-inserting tax line items. Logging that would spam every recalculation with remove/add pairs, so tax lines are ignored entirely — the resulting total and cart tax changes are still captured as an order field diff, which is the part worth auditing.
Teardown is not an edit
When an order or refund is deleted, WooCommerce cascades deletion through its line items. The plugin tracks in-progress deletions and skips the per-item "removed" notes that would otherwise fire into a disappearing order.
Ignored fields
Fields that change on nearly every save carry no audit value: date_modified, version, cart_hash, order_key, IP/user-agent capture, stock-reduced and email-sent flags. These are excluded from field diffs by default and the list is filterable:
php
add_filter( 'wc_order_audit_log_ignored_props', function ( $props, $order ) {
$props[] = 'transaction_id'; // example: stop logging gateway transaction IDs
return $props;
}, 10, 2 );Actor detection
Attribution is resolved per request, in order: the logged-in user's username, WP-CLI, WP-Cron, then system. REST API requests authenticated with WooCommerce API keys attribute to the key's user.
Long-running processes
The "created this request" and "being deleted" suppression sets are per PHP process. A queue worker or test process that spans many logical requests can reset them:
php
WC_Order_Audit_Log::reset_request_state();