Agency Guide: Cart & Session Shield Pro
In short: the free plugin already blocks bot-made carts and cleans up the session table. Pro adds what you need once you run it for clients: the same rules on every store, a way to watch a new store before anything is blocked, a list of trusted addresses, a clean incident report after an attack, and one overview of all your stores.
Everything on this page is a Pro feature unless it says otherwise. Nothing here sends data to HookRetry: the plugin never contacts us. Reports are files or REST answers that you choose to collect, and they contain no IP addresses and no customer data.
1. Configuration profiles
A profile is a small, named, versioned JSON file that sets the shield's policy on a store. You keep one file per policy in your own repository and apply it to every store, instead of clicking through settings screens.
{
"schema": "wccss-profile",
"schema_version": "1.0",
"profile": { "name": "Agency standard", "revision": 3, "description": "Default for retail clients" },
"policy": {
"sessions": { "quarantine_ttl": 15, "purge_batch_size": 5000, "purge_interval": 5 },
"firewall": { "strict": true, "monitor": false },
"breaker": { "enabled": true, "threshold": 500, "hold_stock_minutes": 0 },
"alerts": { "email": "" },
"allowlist": { "ips": ["203.0.113.0/24"], "agents": ["UptimeRobot"] },
"logs": { "retention_days": 7 }
},
"endpoints": {
"slack_webhook": { "from_constant": "AGENCY_SLACK_WEBHOOK" }
}
}
- Preview before anything changes. Every change is listed with the old and the new value. Nothing is written until you apply.
- All or nothing. A file with one invalid value changes nothing.
- Revisions. A profile with a lower revision than the one applied is blocked unless you explicitly allow it, so an old file cannot silently undo a newer policy.
- Risky values need a confirmation. Turning the strict firewall off, turning the circuit breaker off, or turning monitor mode on lowers the protection, so a profile that does this is blocked until you confirm it.
- Credentials stay out of the file. Webhook addresses are read from a constant in
wp-config.phpor from an environment variable ({"from_env": "NAME"}). An address written into the file is refused unless you explicitly allow it. - Rollback. The previous values of every changed setting are kept (the last five applications), and one action puts them back. Webhook addresses in these rollback points are encrypted too.
- Drift. The status shows whether the store still matches the applied profile, and which settings were changed by hand since.
On the screen: Shield Settings → Configuration Profile. From the command line:
wp wc-css profile-export agency-standard.json --name="Agency standard" --revision=3
wp wc-css profile-plan agency-standard.json
wp wc-css profile-apply agency-standard.json --dry-run
wp wc-css profile-apply agency-standard.json
wp wc-css profile-status
wp wc-css profile-rollback
2. Monitor mode
On a new client store you do not want the first surprise to be a blocked customer or a blocked ERP. Monitor mode watches without acting.
- No request gets a 403, no session gets the short lifetime, and the circuit breaker never starts. Nothing is protected while monitor mode is on. A banner on every tab of the plugin says so.
- Everything the shield would have done is logged instead:
WOULD_BLOCK,WOULD_QUARANTINEandWOULD_TRIP(filter by these in Audit & Quarantine Logs). - After a few days, read the report, add legitimate callers to the allowlist, and switch monitor mode off.
wp wc-css monitor-report --days=7
3. Allowlist
Trusted callers, such as an uptime monitor, an ERP or the agency's own office, can be listed so the shield leaves them alone.
- Addresses. A single address or a network (
203.0.113.0/24, IPv4 and IPv6). An address on the list is treated like a trusted request. Very wide networks (wider than /8 for IPv4, wider than /32 for IPv6) are refused, because they would trust a large part of the internet. - User agents. A text the user agent must contain (4 to 100 plain characters). Because a user agent text can be copied by anyone, it only skips the hard 403 checks: those sessions are still handled normally.
- Up to 100 entries per list, one per line. The shield uses the address WordPress sees; behind a proxy or CDN, make sure the server passes the real client address on.
4. Incidents and the incident report
Each time Under Attack mode starts, an incident is recorded. It closes when the shield recovers by itself, when you reset the circuit breaker, or when the breaker expires. A summary is frozen when it closes: blocked requests, shortened sessions, the busiest minute, how many different sources were seen, the most common reasons and paths, the kinds of clients (such as "python library" or "empty"), and how many expired sessions were removed.
- No personal data. The report never contains IP addresses, address hashes, raw user agent strings, query strings, session identifiers or customer data. It is safe to send to a client or a host.
- The last 20 incidents are kept. Download one or all as JSON or Markdown from the Incidents tab, or from the command line.
wp wc-css incidents
wp wc-css incident-report --hours=48 --format=md --output=incident.md
wp wc-css incident-report INC-20261203-142500 --format=json
5. Many stores in one overview
Each store can write a small report: its state (protected, under attack, monitor mode, breaker off), the last 24 hours, the applied profile and whether it has drifted, and its recent incidents. Collect the reports of all stores and merge them into one overview. The store that needs attention comes first.
# on each store
wp wc-css store-report --output=store-report.json
# or pull it over HTTPS with an administrator or shop manager account
# (for example an application password); read-only
GET /wp-json/wccss/v1/report?days=7
# on your own machine, with any store that has the plugin
wp wc-css merge-reports shop-a.json shop-b.json shop-c.json --format=md --output=overview.md
- Order: stores under attack first, then stores with the circuit breaker off, then monitor mode, then protected stores. Within a group, stores whose profile has drifted come first.
- A report older than 48 hours is marked stale. If two files belong to the same store, the newer one is used.
- A file that is not a store report, is unreadable or comes from a newer format is skipped, and the overview says why. Report files are only read as data; nothing in them is executed.
- Reports contain no IP addresses, no webhook or e-mail addresses and no customer data.
6. Alert addresses are encrypted
A Slack or Discord webhook address is a credential: anyone who has it can post into the channel. Pro stores the addresses encrypted in the database (the key is derived from the site's secret keys), so they do not show up in plain text in backups, database dumps or profile rollback points. Addresses saved by earlier versions are encrypted automatically the first time they are read.
To use your own key instead of the WordPress salts, for example to keep it stable when you rotate the salts, define it in wp-config.php before saving the addresses:
define( 'WCCSS_SECRET_KEY', 'a-long-random-text-only-you-know' );
If the key changes after an address was saved (the salts or WCCSS_SECRET_KEY), the stored address can no longer be decrypted. Alerts to that channel pause, a notice appears on the settings screen, and you enter the address again.
7. WP-CLI reference
| Command | What it does |
|---|---|
wp wc-css stats, status, purge | Table health, breaker state, run the cleanup now (all editions). |
wp wc-css settings-list|settings-get|settings-set | Read and change settings; webhook addresses are shown as (set); invalid values are refused. |
wp wc-css profile-export|profile-plan|profile-apply|profile-status|profile-rollback | Configuration profiles. |
wp wc-css monitor-report | What monitor mode saw. |
wp wc-css incidents, incident-report | List incidents; write a report (JSON or Markdown, no personal data). |
wp wc-css store-report | This store's report for the overview. |
wp wc-css merge-reports | Merge store reports into one overview (table, JSON or Markdown). |
8. Settings reference
| Setting | Profile path | Default | Range |
|---|---|---|---|
quarantine_ttl | sessions.quarantine_ttl | 15 | 5–60 minutes |
purge_batch_size | sessions.purge_batch_size | 5000 | 500–50000 |
purge_interval | sessions.purge_interval | 5 | 1–60 minutes |
strict_firewall | firewall.strict | yes | yes / no (no needs confirmation) |
monitor_mode | firewall.monitor | no | yes / no (yes needs confirmation) |
circuit_breaker_enabled | breaker.enabled | yes | yes / no (no needs confirmation) |
circuit_breaker_threshold | breaker.threshold | 500 | 50–10000 new guest sessions per 5 minutes |
circuit_breaker_hold_stock_minutes | breaker.hold_stock_minutes | 0 | 0–60 |
allowlist_ips, allowlist_agents | allowlist.ips, allowlist.agents | empty | up to 100 entries each |
log_retention_days | logs.retention_days | 7 | 1–90 |
alert_email, slack_webhook, discord_webhook | alerts.email, endpoints.* | empty | webhook addresses only from a constant or an environment variable in profiles |
Questions
Write to support [at] hookretry.com. Back to the product page. Running the other plugins too? See the Agency Guides for Webhook Recovery and API Ingestion Buffer.