Filters & Hooks
The complete catalogue. Sorted by feature area.
Wallet Core
| Hook | Type | Args | When |
|---|---|---|---|
wkwp_wallet_balance_changed | action | ( int $user_id, float $amount, string $type, float $balance_after ) | after every credit / debit |
wkwc_wallet_amount_updated | action | ( int $user_id, float $balance_after ) | legacy alias of above |
wkwp_wallet_low_balance_alert | action | ( int $user_id, float $balance_after, float $threshold ) | crosses threshold downward |
wkwp_wallet_credit_amount | filter | ( float $amount, int $user_id, array $context ) | mutate amount before credit |
wkwp_wallet_debit_amount | filter | ( float $amount, int $user_id, array $context ) | mutate amount before debit |
wkwp_wallet_history_label | filter | ( string $label, string $type ) | rename ledger types in history |
Wallet Payment Gateway
| Hook | Type | Args | When |
|---|---|---|---|
wkwc_wallet_show_method_on_checkout | filter | ( bool $show, WC_Cart $cart ) | gateway visibility decision |
wkwp_wallet_split_payment_amount | filter | ( float $wallet_portion, WC_Cart $cart ) | adjust wallet portion in split |
wkwp_wallet_split_rollback | action | ( int $order_id, float $wallet_portion ) | secondary gateway failure rollback |
wkwc_wallet_refund_to_wallet | filter | ( bool $route_to_wallet, WC_Order $order ) | route refund to wallet vs original |
Recharge
| Hook | Type | Args | When |
|---|---|---|---|
wkwp_wallet_topup_amount | filter | ( float $amount, WC_Order $order ) | mutate before credit |
wkwp_wallet_topup_bonus | filter | ( float $bonus_pct, WC_Order $order ) | mutate bonus % per order |
wkwp_wallet_topup_completed | action | ( int $order_id, float $credited ) | after credit row written |
wkwp_wallet_topup_reversed | action | ( int $order_id, float $debited ) | refund / cancel reversal |
Top-up Bonus
| Hook | Type | Args | When |
|---|---|---|---|
wkwp_wallet_bonus_amount | filter | ( float $pct, int $user_id, float $topup ) | mutate % per user |
wkwp_wallet_bonus_credited | action | ( int $user_id, float $bonus, int $order_id ) | after credit row written |
wkwp_wallet_bonus_split_row | filter | ( bool $split ) | render bonus as separate ledger row |
wkwp_wallet_bonus_min_topup | filter | ( float $min ) | min top-up to qualify |
Transfer
| Hook | Type | Args | When |
|---|---|---|---|
wkwp_wallet_transfer_otp_generated | action | ( int $request_id, int $sender_id ) | OTP row written |
wkwp_wallet_transfer_completed | action | ( int $sender_id, int $recipient_id, float $amount ) | both ledger rows written |
wkwp_wallet_transfer_failed | action | ( int $sender_id, int $recipient_id, string $error ) | rollback |
wkwp_wallet_transfer_fee | filter | ( float $fee, float $amount, int $sender_id ) | mutate fee per transfer |
wkwp_wallet_transfer_otp_template_sms | filter | ( string $template, array $vars ) | override SMS template |
Cashback
| Hook | Type | Args | When |
|---|---|---|---|
wkwp_cashback_eligible_rules | filter | ( array $rules, WC_Order $order ) | mutate rules before resolution |
wkwp_cashback_resolved_rule | filter | ( object $rule, WC_Order $order ) | swap chosen rule |
wkwp_cashback_amount | filter | ( float $amount, object $rule, WC_Order $order ) | mutate computed cashback |
wkwp_cashback_credited | action | ( int $user_id, float $amount, int $order_id ) | after credit |
wkwp_cashback_reversed | action | ( int $user_id, float $amount, int $order_id ) | after refund reversal |
wkwp_cashback_basis | filter | ( string $basis ) | subtotal_ex_tax (default) / subtotal_inc_tax / total |
Withdrawal
| Hook | Type | Args | When |
|---|---|---|---|
wkwc_wallet_withdrawal_requested | action | ( int $row_id, int $user_id, float $amount ) | row written |
wkwc_wallet_withdrawal_approved | action | ( int $row_id ) | status flips to approved |
wkwc_wallet_withdrawal_paid | action | ( int $row_id, string $payout_ref ) | payout API succeeded |
wkwc_wallet_withdrawal_rejected | action | ( int $row_id, string $admin_note ) | rejected; balance refunded |
wkwc_wallet_withdrawal_failed | action | ( int $row_id, string $error ) | payout API errored |
wkwp_wallet_withdrawal_fee | filter | ( float $fee, float $amount, int $user_id ) | mutate fee per request |
wkwp_wallet_withdrawal_eligible | filter | ( bool $eligible, int $user_id, float $amount ) | gate request submission |
PayPal Payout
| Hook | Type | Args | When |
|---|---|---|---|
wkwp_paypal_payout_request_body | filter | ( array $body, int $row_id ) | mutate JSON body before send |
wkwp_paypal_payout_response | action | ( int $row_id, array $response ) | after PayPal API response |
wkwp_paypal_webhook_event | action | ( string $event_type, array $payload ) | every webhook event |
Stripe Payout
| Hook | Type | Args | When |
|---|---|---|---|
wkwp_stripe_payout_request_body | filter | ( array $body, int $row_id ) | mutate body before send |
wkwp_stripe_payout_response | action | ( int $row_id, array $response ) | after Stripe API response |
wkwp_stripe_smallest_unit | filter | ( int $multiplier, string $currency ) | smallest-unit conversion override |
wkwp_stripe_webhook_event | action | ( string $event_type, array $payload ) | webhook event |
Refund Requests
| Hook | Type | Args | When |
|---|---|---|---|
wkwp_refund_request_eligible | filter | ( bool $eligible, int $user_id, WC_Order $order ) | gate visibility |
wkwp_refund_request_submitted | action | ( int $row_id ) | row written |
wkwp_refund_request_approved | action | ( int $row_id, int $order_id ) | wallet credited |
wkwp_refund_request_rejected | action | ( int $row_id, string $admin_note ) | rejection email about to fire |
wkwp_refund_to_wallet_amount | filter | ( float $amount, WC_Order $order ) | admin direct refund amount |
BNPL
| Hook | Type | Args | When |
|---|---|---|---|
wkwp_bnpl_eligible | filter | ( bool $eligible, int $user_id, WC_Cart $cart ) | gate eligibility |
wkwp_bnpl_debt_created | action | ( int $debt_id, int $user_id, float $principal ) | new debt row |
wkwp_bnpl_repaid | action | ( int $debt_id, float $repaid ) | row hits zero |
wkwp_bnpl_overdue | action | ( int $debt_id ) | row marked overdue |
wkwp_bnpl_interest_calculated | filter | ( float $interest, object $debt ) | mutate interest |
wkwp_bnpl_max_debt_per_user | filter | ( float $max, int $user_id ) | per-user override |
KYC
| Hook | Type | Args | When |
|---|---|---|---|
wkwp_kyc_submit_validate | filter | `( WP_Error | true $result, array $payload )` |
wkwp_kyc_status_changed | action | ( int $user_id, string $from, string $to ) | every transition |
wkwp_kyc_required_features | filter | ( array $features, int $user_id ) | per-user gate list |
wkwp_kyc_document_check_mime | filter | ( bool $allowed, string $mime ) | extra MIME types |
wkwp_kyc_admin_email_recipients | filter | ( array $recipients ) | CC reviewers |
Referral
| Hook | Type | Args | When |
|---|---|---|---|
wkwp_referral_base_amount | filter | ( float $amount, int $referrer_id, int $invitee_id ) | mutate payout (used by promo + multilevel) |
wkwp_referral_register_resolved | action | ( int $invitee_id, int $referrer_id, string $source ) | ?ref= resolved |
wkwp_referral_reward_credited | action | ( int $referrer_id, float $amount, int $invitee_id ) | credit row written |
wkwp_referral_first_order_coupon_created | action | ( int $invitee_id, string $code ) | invitee coupon minted |
wkwp_referral_cookie_days | filter | ( int $days ) | mutate TTL |
Multilevel Referral
| Hook | Type | Args | When |
|---|---|---|---|
wkwp_multilevel_levels_active | filter | ( int $levels, int $invitee_id, int $order_id ) | active level count per order |
wkwp_multilevel_commission_percent | filter | ( float $pct, int $level, int $sponsor_id ) | per-level % at runtime |
wkwp_multilevel_credited | action | ( int $sponsor_id, float $amount, int $level ) | per-level credit |
wkwp_multilevel_chain_resolved | action | ( int $invitee_id, array $chain ) | ancestry walk done |
Daily Login Reward
| Hook | Type | Args | When |
|---|---|---|---|
wkwp_daily_login_reward | action | ( int $user_id, float $amount ) | after credit row written |
wkwp_daily_login_eligible | filter | ( bool $eligible, int $user_id ) | gate the reward |
wkwp_daily_login_amount | filter | ( float $amount, int $user_id ) | per-user amount |
QR Pay
| Hook | Type | Args | When |
|---|---|---|---|
wkwp_qr_payload_payload | filter | ( string $payload, int $user_id ) | mutate encoded payload |
wkwp_qr_pay_amount | filter | ( float $amount, int $sender_id, int $recipient_id ) | mutate before debit |
wkwp_qr_pay_completed | action | ( int $sender_id, int $recipient_id, float $amount ) | both rows written |
wkwp_qr_pay_failed | action | ( int $sender_id, int $recipient_id, string $error ) | rollback |
wkwp_qr_pay_kyc_gate | filter | ( bool $gated, int $user_id ) | per-pay KYC gate |
Bulk Operations
| Hook | Type | Args | When |
|---|---|---|---|
wkwp_wallet_bulk_queue_added | action | ( string $batch_id, int $row_count ) | rows enqueued |
wkwp_wallet_bulk_row_processed | action | ( int $row_id, int $user_id ) | per-row success |
wkwp_wallet_bulk_row_failed | action | ( int $row_id, string $error ) | per-row fail |
wkwp_wallet_bulk_batch_size | filter | ( int $size ) | rows per worker tick |
wkwp_wallet_bulk_csv_validate_row | filter | `( WP_Error | true $result, array $row )` |
Email / SMS
| Hook | Type | Args | When |
|---|---|---|---|
wkwp_email_recipients_<event> | filter | ( array $to ) | mutate To list |
wkwp_email_subject_<event> | filter | ( string $subject, array $vars ) | mutate subject |
wkwp_email_body_<event> | filter | ( string $body, array $vars ) | mutate body |
wkwp_email_should_send | filter | ( bool $send, string $event ) | global gate |
wkwp_email_sent_<event> | action | ( bool $success, array $vars ) | after wp_mail |
wkwp_sms_provider | filter | ( string $class_name ) | swap SMS provider |
wkwp_sms_template_<event> | filter | ( string $template, array $vars ) | mutate template |
wkwp_sms_send | filter | ( string $body, string $to ) | mutate before send |
wkwp_sms_sent | action | ( string $to, string $body ) | API success |
wkwp_sms_failed | action | ( string $to, string $body, string $error ) | API failure |
Analytics
| Hook | Type | Args | When |
|---|---|---|---|
wkwp_analytics_summary_payload | filter | ( array $payload, array $window ) | mutate response |
wkwp_analytics_chart_metrics | filter | ( array $metrics ) | register custom metric |
wkwp_analytics_cache_ttl | filter | ( int $seconds, string $key ) | per-key TTL |
wkwp_analytics_summary_generated | action | ( array $payload ) | after compute |
REST
| Hook | Type | Args | When |
|---|---|---|---|
wkwp_rest_register_routes | action | () | append custom routes |
wkwp_rest_pre_authenticate | filter | `( null | WP_Error |
wkwp_rest_response_<endpoint> | filter | ( WP_REST_Response $response ) | mutate response |
wkwp_rest_rate_limit_per_ip | filter | ( int $limit ) | override |
wkwp_rest_rate_limit_per_key | filter | ( int $limit ) | override |
Compatibility / Integrations
| Hook | Type | Args | When |
|---|---|---|---|
wkwp_integration_dokan_settle | action | ( int $vendor_id, float $share ) | Dokan vendor settled to wallet |
wkwp_integration_wcfm_settle | action | ( int $vendor_id, float $share ) | WCFM vendor settled |
wkwp_integration_subscriptions_renew | action | ( int $subscription_id, float $charged ) | renewal charged from wallet |
wkwp_integration_giftcard_redeem | action | ( string $code, float $amount ) | gift card credited to wallet |
wkwp_integration_rma_refund | action | ( int $rma_id, float $amount ) | RMA refund routed to wallet |
Diagnostic Filters (rare)
| Hook | Type | Purpose |
|---|---|---|
wkwp_debug_log_enable | filter | switch on per-event debug logging |
wkwp_debug_log_destination | filter | redirect logs (default WC_LOG_DIR/wkwp-wallet/) |
wkwp_compat_mode_force | filter | force-enable a compat shim regardless of detection |
