Skip to content
pluginloom

Developers

WP-CLI and developer hooks

Every wp chargewarden command, the actions and filters ChargeWarden provides, wp-config constants, and the BankBridge integration point.

Last updated by the PluginLoom team

WP-CLI commands#

CommandWhat it does
wp chargewarden statusProtection status, attack mode, blocks, 24-hour counts, review queue, ledger and script counts
wp chargewarden selftestRuns the core logic against built-in fixtures and prints PASS or FAIL per check
wp chargewarden attack-mode on --minutes=60 / offAttack mode
wp chargewarden block <ip|subnet|email> <value> [--hours=24]Block by hand (0 hours = until removed)
wp chargewarden unblock <ip|subnet|email> <value>Remove matching blocks
wp chargewarden allow <ip|email|user> <value> [--note=]Add to the allowlist
wp chargewarden score <order_id> [--apply]Score an order and print the reasons
wp chargewarden review <order_id> <approve|reject> [--blocklist] [--note=]Decide a review
wp chargewarden nacha ratesRolling 60-day return rates
wp chargewarden nacha syncRead every ACH entry from BankBridge
wp chargewarden nacha checkRun the daily return rate alert check now
wp chargewarden nacha report --month=YYYY-MM --format=pdf|csv --output=fileMonthly evidence report
wp chargewarden scripts scan|list|exportScript monitor
wp chargewarden scripts authorize <id> --justification="..." [--mode=hash|url]Authorize a script
wp chargewarden lists refreshDownload the free IP lists now
wp chargewarden purgeRun housekeeping now
wp chargewarden simulator enable|disable|cleanupAttack simulator support (see Testing)
wp chargewarden demo seed|clearSample data for demos

Actions#

ActionArguments
chargewarden_loadedContainer
chargewarden_blockedKind, masked label, reason, source
chargewarden_attack_mode_onSource, reason, minutes
chargewarden_attack_mode_offnone
chargewarden_order_scoredOrder, result, action
chargewarden_review_decidedOrder, status
chargewarden_settings_updatedStored settings

Filters#

FilterUse
chargewarden_settingChange any setting value
chargewarden_gateway_riskAdd risk data for a gateway (label, risk_level, risk_score, review)
chargewarden_order_cardCard BIN and last four for an order
chargewarden_request_cardCard BIN and last four from the checkout request
chargewarden_risk_resultChange a score, band or reasons before saving
chargewarden_ip_countrySupply the IP country from your own source
chargewarden_disposable_domainsAdd disposable email domains
chargewarden_self_updating_script_hostsHosts whose scripts default to address-only integrity
chargewarden_send_alertReturn false to stop an alert email
chargewarden_stripe_secret_keyKey for the optional Radar lookup
chargewarden_license_apiLicense API base URL (staging stores)

Constants#

Pin any setting in wp-config.php with CHARGEWARDEN_ and the setting name in capitals, for example define( 'CHARGEWARDEN_IP_SOURCE', 'cloudflare' );. Also: CHARGEWARDEN_HASH_KEY (shared hashing key) and CHARGEWARDEN_ENCRYPTION_KEY (key for stored secrets, kept outside the database).

Adding ACH entries from another source#

chargewarden()->ledger()->record( array( 'source' => 'myprocessor', 'ref' => 'abc', 'type' => 'debit', 'sec_code' => 'web', 'amount' => 25.00, 'status' => 'returned', 'return_code' => 'R10', 'returned_at' => '2026-10-20 12:00:00', 'entry_at' => '2026-10-15 09:00:00' ) );

The BankBridge integration point#

ChargeWarden reads BankBridge through its public hooks (bankbridge_transfer_created, bankbridge_transfer_status_changed, bankbridge_transfer_adopted), its container (bankbridge()->transfers()) and one filter, bankbridge_transfer_record_meta, which lets a companion plugin add data to the meta BankBridge saves on a new transfer. ChargeWarden uses it to keep the account validation snapshot with the entry.

Was this page helpful?