High-Value Credit Alerts
WalletPro can email the store admin and write an audit-log entry whenever a single wallet credit exceeds a configurable threshold. The alert is designed to catch accidental over-crediting, integration bugs that send large amounts, or unusual manual adjustments that deserve a second look.
How it works
Every time FundsManager records a credit (the walletpro_funds_recorded action), HighValueCreditAlertListener checks whether the amount exceeds the configured threshold. When it does:
- An email is sent to the WordPress admin email address (
get_option('admin_email')). - A
high_value_creditentry is written to the wallet audit log, recording the user, amount, order reference, and the admin who triggered the action.
No credit is blocked. The alert is informational only: the credit has already been recorded before the check runs.
Configuring the threshold
Go to WooCommerce > WalletPro > Settings and find the High-value credit threshold field. Enter the amount (in your store's base currency) above which an alert fires. The default is 100.00.
Set the field to 0 to disable alerts entirely (no email will be sent when the amount is zero or the threshold is unset).
Set the threshold to a value above your largest normal cashback or milestone reward, so routine credits don't generate alerts. For example, if your maximum cashback is $25, a threshold of $50 catches only genuinely large manual credits or integration errors.
Alert email content
The email subject is: "WalletPro: High-Value Credit Alert"
The body includes:
- The credit amount and currency.
- The customer's display name, email, and user ID.
- The order ID, if the credit was tied to an order.
- The credit type (e.g.
manual_credit,cashback). - A direct link to the customer's wallet profile in the WordPress admin.
Audit log entry
The alert writes an high_value_credit action to the wallet audit log. You can filter for this action on the Audit Log screen. The entry records the full credit context, so you can cross-reference alerts against the ledger without needing to search by date.
Bulk operation suppression
During a bulk wallet import or a batch grant, sending one alert per row would flood the admin inbox. WalletPro's bulk controllers (BulkBalanceController) call HighValueCreditAlertListener::suppress() before the loop and restore() after. A single summary email is sent after the batch with the total number of high-value credits in the batch and the total amount.
If you build a custom integration that credits wallets in a loop, wrap it with HighValueCreditAlertListener::suppress() and restore() and send your own summary email, to avoid flooding the admin inbox.
Hook reference
| Hook | Type | Purpose |
|---|---|---|
| walletpro_high_value_credit_threshold | Filter | Override the threshold at runtime. Receives the stored option value. Return a numeric string. |
| walletpro_high_value_credit_alert_recipients | Filter | Override the recipient list. Receives [ get_option('admin_email') ]. Return an array of email addresses. |