Skip to content

What gets logged

Every note below ends with actor attribution — [by mike], [by WP-CLI], [by WP-Cron], or [by system] — except email notes, where the sender is the system by definition.

Items

Products, fees, and shipping lines added to or removed from an existing order:

Item added: "Widget" x 2 ($40.00)
Item removed: "Widget" x 2 (was $40.00)
Fee "Rush handling" added: $15.00
Shipping "Flat rate" removed (was $10.00)

Edits made on the admin order screen are diffed against the database before the save is applied, so the note shows both sides:

Items edited - "Widget" (#312): quantity 1 -> 2, subtotal $20.00 -> $40.00, total $20.00 -> $36.00
Items edited - Shipping "Flat rate" (#313): cost $10.00 -> $0.00

A reduced line total with an unchanged subtotal is the classic manual discount — it is now visible and attributed.

Coupons

Coupon "WELCOME" applied (discount $5.00)
Coupon "WELCOME" removed (was discounting $5.00)

Coupon removal has no dedicated WooCommerce hook; the plugin detects it through the coupon line item's deletion, so it is caught regardless of how the coupon was removed.

Order fields

Before every order save, pending changes are diffed against the values still in the database:

Order updated - billing city: Springfield -> Portland; payment method: (empty) -> cod
Order updated - total: $200.00 -> $150.00; discount total: $0.00 -> $50.00
Order updated - customer: guest -> #45 (jdoe)

Internal bookkeeping fields (date_modified, cart_hash, order_key, stock/email flags, and so on) are excluded; the list is filterable via wc_order_audit_log_ignored_props.

Refunds

Refund #1042 created: $25.00, reason: "damaged in transit", 2 line item(s), refunded via payment gateway, items restocked
Refund #1042 deleted

The creation note records the amount, reason, scope, whether the gateway was charged back, and whether stock was restored. The deletion note references the refund ID so the pair is traceable.

Status changes

WooCommerce already writes "Order status changed from X to Y" — but never who. The plugin adds the actor, and only when a logged-in user made the change (system transitions are left to WooCommerce's own note):

Status changed pending -> processing [by mike]

Order emails

Sent and failed order emails going through the WooCommerce mailer:

Email sent to customer@example.com: "Your order is complete"
FAILED to send email to customer@example.com: "Your order is complete"

Sites with their own email logger can replace these with richer notes — see Hooks & filters.

Deliberate exclusions

  • Line-item meta edits are not diffed — the signal-to-noise ratio is poor and the payloads are unbounded.
  • In-place item edits via the REST API bypass the admin save path and are not diffed. Item adds/removes, refunds, and order field changes made over REST are still caught, with the API user attributed.
  • Order deletion is not logged to notes, because the notes are deleted with the order.

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