100% Free · Open Source GPLv2 · Zero setup requiredGet the Plugin

Opens in a new tab
ITX UserOps

Back to Blog

The three WooCommerce changes nobody logs

Your security plugin watches logins, roles and sessions. On a store, the changes that actually cost money touch none of those — so nothing notices a refund, a gateway edit, or a webhook quietly forwarding every order somewhere new.

Operations

Every WordPress security plugin watches the same things: sign-ins, role changes, sessions, profile edits, plugin activations.

On a store, that list misses the events that cost money. A refund, a change to the payment gateway settings, a new webhook forwarding every order to an endpoint you have never seen — none of them touch a user account, so nothing in a user-centric log notices them.

They are also, not coincidentally, the three most valuable things to change quietly on a compromised store.

1. Gateway settings

Payment gateway configuration is where the money goes. It is a settings page like any other, and WordPress fires no event anybody is listening for when it is saved.

An attacker with administrator access does not need to steal card numbers to profit. Changing the account that receives settlements, or swapping in a gateway that proxies transactions, is quieter and pays out longer. On a store processing steadily, a small change survives a long time before anybody reconciles closely enough to notice.

The legitimate case matters too. *Who changed the checkout configuration, and when* is a question that comes up during any payment incident, and "we think it was during the migration" is not an answer.

Two WooCommerce hooks cover it — woocommerce_update_options_payment_gateways and woocommerce_update_options_checkout. Both are ordinary settings saves. Neither is watched by anything by default.

2. Webhooks

WooCommerce webhooks send order data to a URL on every matching event. That is their purpose, and it is why they are the cleanest exfiltration mechanism a store has.

A webhook created on a compromised store forwards every future order — customer name, address, email, line items, totals — to an endpoint of the attacker's choosing. It is not a breach in the sense anybody would notice. It is a feature, configured, doing exactly what it says.

And nobody looks at the webhooks list. It is three clicks deep in WooCommerce settings, it is usually empty or has two entries somebody set up years ago, and there is no reason to open it during normal operation.

woocommerce_new_webhook and woocommerce_webhook_updated both fire. Recording them costs nothing and turns an invisible change into a row you can alert on.

3. Refunds

Refunds are ordinary business. Most of them are fine.

What makes them worth recording is that they move money out with an actor attached, and a pattern only becomes visible when the individual events are in one list. A run of refunds to the same customer, or refunds processed at hours nobody works, or a staff account issuing refunds it has no reason to issue — none of these are visible one order at a time in WooCommerce's own screens.

woocommerce_order_refunded gives you the order and the refund. Combined with the actor, that is a report you can read in a minute a week.

Why this belongs in the same log as the user events

The obvious objection: WooCommerce has its own order notes and its own audit trail, so why put these in a security log?

Because the interesting sequences cross the boundary, and a sequence split across two tools with two clocks and two filters is a sequence nobody reconstructs.

02:11  login_success           unknown IP, known account
02:14  role_changed            subject: support, actor: that account
02:15  plugin_activated        file manager
02:19  wc_webhook_created      https://<somewhere>
02:31  wc_gateway_settings_changed

Read together, that is a complete story with a beginning and an outcome. Read in two separate tools, it is "somebody logged in at night" in one and "a webhook was added" in the other, and nobody puts them side by side because nobody knew to look.

What to actually do

Record the three events. Whatever tool you use, if it does not know what a store is, it is not watching them.

Alert on two of them. Gateway settings and webhook creation are rare on a settled store — often zero times a year. A rule that fires on them is a rule that will not train you to ignore it, which is the property that matters most in alerting. Refunds are frequent enough that a weekly summary beats a per-event notification.

Review webhooks quarterly. It takes two minutes and nobody has ever done it. Anything you cannot account for should be removed rather than investigated, because a webhook you cannot explain has no legitimate claim to your order data.

Watch the accounts that can change these. A store's shop_manager role is not administrator, but it can process refunds. Worth knowing who holds it and when that last changed.

The design note

If you build this, build it small.

The right implementation of "teach the security log about commerce" adds three listeners and nothing else — no new tables, no new screens, no settings. The events go onto the bus that already exists and inherit everything already built for them: the activity log, the tamper-evident chain, alert rules across every channel, the SIEM feed, the retention policy.

The value is entirely in choosing the right three events. It is not in building anything to carry them, and a commerce-security feature that arrives with its own storage and its own dashboard has usually got that backwards.

—

*ITX UserOps records wc_refund_issued, wc_gateway_settings_changed, wc_webhook_created and wc_webhook_updated onto the same event bus as everything else, so they inherit the activity log, the hash chain, alert rules across six channels and the SIEM feed. It adds no storage, no screens and no settings. The WooCommerce module and alerts are premium; the activity log is in the free plugin.*

A clearer WordPress admin
starts here.

Start with the free plugin. Add more control when you need it.

Log in

Vote on ideas, submit your own and join the discussion.