Skip to content
CHADA Store

Database schema

WooFraudGuard creates five custom MySQL tables. All are prefixed with the WP table prefix (e.g. wp_wfg_*) and use InnoDB with utf8mb4_unicode_ci collation.

wfg_risk_scores

One row per scoring evaluation. Re-scoring an order adds a new row (the historical scores are kept).

ColumnTypeNotes
idBIGINT UNSIGNEDPK
order_idBIGINT UNSIGNEDWC order id (indexed)
total_scoreTINYINT UNSIGNED0–100
decisionVARCHAR(16)approve / review / hold / cancel
created_atDATETIMEUTC

wfg_rule_hits

One row per rule per score. Stores the per-rule contribution and the metadata blob (which includes the reason tokens).

ColumnTypeNotes
idBIGINT UNSIGNEDPK
score_idBIGINT UNSIGNEDFK → wfg_risk_scores.id (indexed)
rule_keyVARCHAR(64)e.g. blocklist, velocity
contributionSMALLINT UNSIGNEDFinal weighted score
metadataLONGTEXTJSON — includes reason tokens

wfg_blocklist

ColumnTypeNotes
idBIGINT UNSIGNEDPK
typeVARCHAR(16)email / ip / phone / device / bin / username
valueVARCHAR(255)The atom value (indexed alongside type)
sourceVARCHAR(32)manual / chargeback / fast_checkout
reasonTEXTFree-text note
created_atDATETIMEUTC
expires_atDATETIMENULL = permanent
attemptsINT UNSIGNEDTimes this entry has fired the Blocklist rule

wfg_linked_orders

Edge table for the order graph. Each row is an undirected edge between two orders sharing at least one atom.

wfg_chargebacks

One row per confirmed chargeback. Populated by the Stripe and PayPal webhook handlers.

Uninstall behaviour

By default, deactivating WooFraudGuard leaves all five tables intact. To remove them, enable Delete plugin data on uninstall under Settings → Privacy before deactivating.