HookRetry

Agency Guide: Cart & Session Shield Pro

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" }
  }
}

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.

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.

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.

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

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

CommandWhat it does
wp wc-css stats, status, purgeTable health, breaker state, run the cleanup now (all editions).
wp wc-css settings-list|settings-get|settings-setRead 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-rollbackConfiguration profiles.
wp wc-css monitor-reportWhat monitor mode saw.
wp wc-css incidents, incident-reportList incidents; write a report (JSON or Markdown, no personal data).
wp wc-css store-reportThis store's report for the overview.
wp wc-css merge-reportsMerge store reports into one overview (table, JSON or Markdown).

8. Settings reference

SettingProfile pathDefaultRange
quarantine_ttlsessions.quarantine_ttl155–60 minutes
purge_batch_sizesessions.purge_batch_size5000500–50000
purge_intervalsessions.purge_interval51–60 minutes
strict_firewallfirewall.strictyesyes / no (no needs confirmation)
monitor_modefirewall.monitornoyes / no (yes needs confirmation)
circuit_breaker_enabledbreaker.enabledyesyes / no (no needs confirmation)
circuit_breaker_thresholdbreaker.threshold50050–10000 new guest sessions per 5 minutes
circuit_breaker_hold_stock_minutesbreaker.hold_stock_minutes00–60
allowlist_ips, allowlist_agentsallowlist.ips, allowlist.agentsemptyup to 100 entries each
log_retention_dayslogs.retention_days71–90
alert_email, slack_webhook, discord_webhookalerts.email, endpoints.*emptywebhook 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.