Your WooCommerce shop is taking orders and nothing seems wrong. But a store is a different kind of target from a brochure site. It holds customer names, addresses and phone numbers, it talks to a payment gateway, and the checkout page is exactly where an attacker wants to be. If something goes wrong here, the cost is not just a cleanup bill. It is refunds, chargebacks and customers who do not come back.
This post is about prevention: the settings and habits that make a store hard to break into and its checkout hard to abuse. If your store has already been compromised, stop here and read our guide to repairing a hacked WooCommerce store instead.
What attackers want from a shop
Knowing the goal tells you where to put your effort.
- Card details typed at checkout. A small piece of injected script on the checkout page can copy what customers type and send it elsewhere. The store keeps working normally, so nobody notices for a long time.
- Customer data. Order history, addresses and emails are useful for phishing, even without card numbers.
- A place to test stolen cards. Fraudsters run many small orders through your checkout to find out which stolen cards still work. You pay in gateway fees, disputes and possibly a warning from your payment provider.
- Your admin panel. With admin access they can change the payment settings, add a fake gateway, or install anything they like.
Keep card details off your server
The single most useful decision for a small store is how the card is collected. With most mainstream gateways you have two broad options: the customer is sent to the gateway’s own payment page, or the card fields are shown on your checkout but served from the gateway, in a frame or through their script.
Either way, the full card number should never pass through your WordPress database. That is the setup to aim for. It reduces what your site can leak, and it keeps your card-handling obligations under the PCI DSS standard much simpler than storing or processing cards yourself. Ask your gateway’s support which mode your plugin uses if you are not sure.
A redirect to the gateway’s page is the most protected option, because even an infected checkout cannot read card numbers typed on another site. It can still try to swap the link, though, which is why the rest of this list matters.
Lock down who can get into the back end
Give people the smallest role that works
WooCommerce adds a Shop Manager role, which can handle orders, products and reports without being able to install plugins or change themes. Staff who pack orders or update stock rarely need full administrator access. Our post on WordPress user roles explains how to set this up and which roles to avoid handing out.
Two-factor authentication for every admin and shop manager
Anyone who can change payment settings or export customer lists should need a second factor to log in. A plugin such as Two Factor or WP 2FA adds this. Make it compulsory for those roles, not optional.
Remove accounts nobody uses
Former developers, an agency you stopped working with, a test account from launch day. Every one of them is a password that could be leaked somewhere you will never hear about. Delete them or downgrade them to Customer.
Plugins and updates
A common way into a store is a plugin with a known flaw that was never updated. Stores tend to have more plugins than ordinary sites: shipping, invoices, product add-ons, reviews, abandoned cart tools. Each one is code with access to your orders.
- Keep the list short. Remove anything deactivated, and question anything you installed for one sale and forgot.
- Buy from the developer, never from “free premium” sites. Pirated copies of paid plugins are a well-known way malware gets in.
- Update on a schedule, with a backup first. WooCommerce and payment plugin updates are worth testing on a staging copy, because a broken checkout is its own kind of emergency.
Our WooCommerce store maintenance checklist covers the update routine, backups and weekly test orders in detail, so we will not repeat it here.
Protecting the checkout from abuse
Card testing is a checkout problem that small stores do run into. The signs are easy to spot once you know them: a burst of orders for the cheapest item, many failed payments in a row, odd names and email addresses, often in the middle of the night.
Things that help:
- Turn on your gateway’s fraud tools. Most payment providers have risk checks and rules you can adjust from their dashboard. Stripe calls its tool Radar; other gateways have their own versions. They see patterns across many stores that you cannot.
- Add a challenge at checkout if the attacks start. An invisible check such as Cloudflare Turnstile or reCAPTCHA v3 on the checkout and the “place order” step stops most scripted attempts without bothering real buyers.
- Rate limit at the firewall. If you use a service like Cloudflare, or a plugin firewall such as Wordfence, you can slow down any address that submits the checkout many times in a short period.
- Do not hide the problem by refunding quietly. Tell your payment provider what happened. They would much rather hear it from you than find it in a dispute report.
Watch for fake account registrations too. If “create an account” is on and you are suddenly gaining hundreds of customers with no orders, bots are using it. Consider allowing guest checkout and only creating accounts at the end of a real purchase.
Watch the checkout page itself
Card skimming code is designed to be quiet, so look for it on purpose.
- Every so often, open your checkout in a private browser window, view the page source, and look for scripts loading from domains you do not recognise.
- Use a security plugin or a file monitoring service that alerts you when theme or plugin files change unexpectedly.
- Keep an eye on the payment gateway settings screen. A changed API key or a new payment method you did not add is a serious warning.
- Take customer complaints about fraud on their card seriously, especially if several arrive close together.
If you find something, read how card skimmers are found and removed before you touch it, because deleting the visible script often leaves the part that puts it back.
A short prevention list
- Confirm card numbers never reach your server: redirect or gateway-hosted fields only.
- Give staff the Shop Manager role, not Administrator.
- Require two-factor authentication for every admin and shop manager.
- Delete unused accounts and plugins.
- Update on a schedule, with a backup and a test order afterwards.
- Turn on your gateway’s fraud checks, and keep a checkout challenge ready.
- Check the checkout page source and the gateway settings every month.
Help with the parts you would rather not handle
None of this is complicated on its own, but a store owner usually has orders to ship. If you want a second pair of eyes on your setup, or someone to tidy the roles, plugins and checkout protection for you, our WooCommerce support starts at ₹1,499 onwards for a single session. The session can be spent on whichever of these steps your store needs most.
Next in this series: Fake Domain Renewal Emails: How to Spot the Scam