How WooCommerce malware works
Attackers target online stores for one reason: payment data. On a WooCommerce site, that usually means one of these:
- JavaScript card skimmers. A script on the checkout page watches the card fields and quietly sends whatever customers type to the attacker’s server. The order completes normally, so nobody notices.
- Fake payment forms. If your gateway uses its own secure card fields, the attacker can’t read them. So the malware shows a convincing fake form first, collects the card, shows an error, and then lets the real gateway load.
- Server-side theft. PHP code hooked into WooCommerce’s checkout process that copies payment or customer data as it’s submitted, or saves it somewhere the attacker can download it.
- Payment tampering. Changing the PayPal email address or bank details in your settings, so money goes to the attacker instead of you.
Stores also get the same infections as any WordPress site: redirects, spam pages, and backdoors. But skimmers are the ones that do real harm to your customers.
Where checkout malware hides
Skimmers are usually small, and they only load on the checkout page, so they’re easy to miss. The places I check on every store:
| Location | What to look for |
|---|---|
| The database | Scripts saved in theme options, “header/footer scripts” plugin settings, widgets, or the checkout page content |
| Theme and plugin JavaScript | Obfuscated code appended to the end of a legitimate .js file that only activates on /checkout |
| PHP hooks | Code in functions.php or a fake plugin using WooCommerce checkout hooks to read payment fields |
| Tag manager and analytics | A tag added to your Google Tag Manager container if that account was compromised |
| Payment settings | Changed PayPal email, bank details, or an unfamiliar payment gateway enabled |
| User accounts | New administrator or “shop manager” accounts you didn’t create |
How I clean a WooCommerce store
- Check the checkout first. I load the checkout as a customer would, watch every script and network request, and look for anything sending data to a domain you don’t use.
- Stop the leak. If a skimmer is active, I neutralize it straight away, before the full investigation.
- Investigate files, database and settings, including payment settings and every admin and shop manager account.
- Remove the malware and backdoors while keeping your orders, products and customer accounts intact.
- Find and fix the entry point: usually an outdated extension, a weak password, or a nulled plugin.
- Verify the checkout is clean, and give you a written report of what was found, what data may have been exposed, and for how long.
A typical case: a store owner gets an email from their payment provider about several customers reporting fraud. The checkout looks normal, and the scanner finds nothing. Testing the checkout as a customer shows the trick: on the first attempt, a card form appears that isn’t the gateway’s, then a “payment declined” message, then the real form. The fake form lives in a script added to a theme option in the database, and an outdated extension let the attacker in. Removing the script, the attacker’s admin account and the vulnerable extension took an afternoon. Working out the dates for the payment provider took the rest of the day.
If customer card data may have been exposed
This part matters as much as the cleanup itself. In general:
- Stop the leak first, then preserve evidence. Don’t wipe logs or backups; they show how long the skimmer was active.
- Contact your payment provider. They’ll tell you what they need and what happens next.
- Check your obligations. Depending on where you and your customers are, you may have to notify customers or authorities about a data breach. Your payment provider or a legal advisor can tell you what applies to you.
This isn’t legal advice, but I’ll give you the technical facts you need for those conversations: what was stolen, how, and between which dates.
Keeping your store safe afterwards
- Keep WooCommerce, its extensions and your theme updated, and delete extensions you don’t use.
- Use a payment gateway that takes card details on its own page or in its own secure fields.
- Give admin rights only to people who need them, and turn on two-factor login for all of them.
- Look at your checkout page once in a while as a customer would. You know what it should look like.
- Getting fake orders? Bots often use the WooCommerce Store API, even on classic-checkout stores.
A store needs the same full cleanup as any other site. See my WordPress malware removal service for everything included in the $95.