Skip to content

Quick start

Activate the plugin, then edit any order in the WooCommerce admin — change a quantity, apply a coupon, issue a refund. Each change appears in the order notes panel as a private note:

Items edited - "Widget" (#312): quantity 1 -> 2, total $20.00 -> $40.00 [by mike]
Coupon "WELCOME" applied (discount $5.00) [by mike]
Refund #1042 created: $10.00, manual refund [by mike]

What you get out of the box

EventExample note
Item added / removedItem added: "Widget" x 2 ($40.00) [by mike]
Quantity / price editsItems edited - "Widget" (#312): quantity 1 -> 2, total $20.00 -> $40.00 [by mike]
Coupon applied / removedCoupon "WELCOME" applied (discount $5.00) [by mike]
Fee / shipping changesFee "Rush handling" added: $15.00 [by mike]
Order field changesOrder updated - billing city: Springfield -> Portland [by mike]
RefundsRefund #1042 created: $10.00, reason: "damaged", manual refund [by mike]
Status changesStatus changed pending -> processing [by mike]
Order emailsEmail sent to customer@example.com: "Order received"

See What gets logged for the full list and the deliberate exclusions.

Add a marker prefix

Notes carry no prefix by default. To tag every audit note so it is easy to scan or filter:

php
add_filter( 'wc_order_audit_log_note_prefix', function () {
    return '[Audit] ';
} );

Write your own audit entries

Anything your own code does to an order can join the same trail:

php
do_action( 'wc_order_audit_log', $order_id, 'Contract #42 attached' );

The note is written with the configured prefix through the same pipeline as the built-in entries. See Hooks & filters for the full API.

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