Documentation / Elite Balance

about the plugin →

Hooks reference

Every action and filter Elite Balance exposes, generated from the source, grouped by what you are trying to change.

Lifecycle

HookTypeWhat it does
rb_elite_balance_loadedactionFires once the plugin has fully booted; all services registered. Extensions start here. Receives the plugin container.
rb_elite_balance_installedactionFires after the schema installs or upgrades (per site on multisite). Receives the schema version.
rb_elite_balance_container_bindingsfilterSwap or extend the service container bindings. The deepest extension point; use sparingly.
rb_elite_balance_capability_mapfilterWhich roles receive wallet management capabilities on install.

Ledger writes and events

HookTypeWhat it does
rb_elite_balance_before_creditfilterThe arguments of a credit before validation. The primary interception point for credits.
rb_elite_balance_before_debitfilterThe arguments of a debit before validation. Same for debits.
rb_elite_balance_before_hold_placedfilterThe arguments of a hold before it reserves funds.
rb_elite_balance_transaction_createdactionAfter ANY transaction commits (durable, never on replays). Receives the Transaction.
rb_elite_balance_hold_placedactionAfter a hold commits. Receives the Hold.
rb_elite_balance_hold_capturedactionAfter a hold becomes a debit. Receives the Hold and the Transaction.
rb_elite_balance_hold_releasedactionAfter a hold is released or expires. Receives the Hold and an expired flag.
rb_elite_balance_transaction_typesfilterRegister custom transaction types (label + direction). Core types cannot be removed.
rb_elite_balance_wallet_createdactionAfter a wallet is created. Receives the Wallet.
rb_elite_balance_wallet_status_changedactionAfter lock or unlock. Receives the Wallet and the previous status.

Checkout and orders

HookTypeWhat it does
rb_elite_balance_gateway_is_availablefilterFinal say on whether the wallet gateway offers itself for the current customer and cart.
rb_elite_balance_gateway_descriptionfilterThe gateway description shown at checkout.
rb_elite_balance_partial_payment_offeredfilterWhether the partial payment control appears for this customer and cart.
rb_elite_balance_partial_payment_max_amountfilterThe cap on the wallet portion (default: cart contents plus their tax; shipping excluded). Receives the cap and the cart.
rb_elite_balance_partial_payment_labelfilterThe label of the wallet line on the order.
rb_elite_balance_partial_payment_smart_offerfilterTunes the default state of the partial offer at checkout.
rb_elite_balance_wallet_discount_labelfilterThe label of the pay-by-wallet discount line at checkout and on orders.
rb_elite_balance_wallet_discount_basefilterThe base the pay-by-wallet discount computes against (default: items after discounts plus their tax, shipping excluded). Receives the base and the cart or order.
rb_elite_balance_orphan_hold_statusesfilterOrder statuses whose leftover pending holds the safety sweep releases.
rb_elite_balance_wallet_collection_failedactionA paid order’s wallet portion could not be collected. Receives the order and a reason.
rb_elite_balance_refund_creditedactionA refund was credited to a wallet. Receives the Transaction, the order, and the refund ID.
rb_elite_balance_topup_creditedactionA top-up credited a wallet. Receives the Transaction and the top-up order.
rb_elite_balance_topup_amount_limitsfilterThe top-up minimum and maximum.

Customer surfaces

HookTypeWhat it does
rb_elite_balance_account_endpoint_labelfilterThe wallet page name, after the setting.
rb_elite_balance_account_endpoint_slugfilterThe wallet page URL slug, after the setting.
rb_elite_balance_account_transactions_per_pagefilterHistory page size on the wallet page (default 15).
rb_elite_balance_account_tabsfilterThe wallet page tabs (id => label + priority). Register the id in sanitized form; all-digit ids are reserved for legacy pagination URLs.
rb_elite_balance_account_tab_{id}actionRenders a custom tab’s content when it is active. The id matches the sanitized key you registered.
rb_elite_balance_account_wallet_after_summaryactionTemplate hook: after the balance summary on the wallet page (the top-up form mounts here).
rb_elite_balance_account_wallet_before_historyactionTemplate hook: before the history table.
rb_elite_balance_account_wallet_after_historyactionTemplate hook: after the history table.
rb_elite_balance_balance_htmlfilterThe final HTML of the balance block and shortcode.
rb_elite_balance_customer_notefilterThe customer-facing note of one transaction (empty string hides it). Receives the Transaction.
rb_elite_balance_customer_note_typesfilterWhich transaction types show their notes to customers (default: system-composed types only).
rb_elite_balance_email_skipped_typesfilterTransaction types that never send the credited/debited emails (default: order payments, migrations, and withdrawal debits, which have their own dedicated email).

Admin

HookTypeWhat it does
rb_elite_balance_overview_topactionMount point at the top of the Overview tab (the migration card lives here). Add your own cards.
rb_elite_balance_tools_sectionsactionMount point after the built-in sections of the Tools tab. Add your own tool section.
rb_elite_balance_settings_fieldsfilterAdd or adjust fields on the Elite Balance settings tab.
rb_elite_balance_adjustment_reasonsfilterThe preset reason list on every adjustment form.
rb_elite_balance_audience_conditionsfilterRegister custom audience conditions for bulk operations.
rb_elite_balance_batch_retention_daysfilterHow long bulk operation summaries are kept (default 90; the ledger rows stay forever).
rb_elite_balance_import_max_rowsfilterCSV import row cap (default 10,000).
rb_elite_balance_import_max_bytesfilterCSV import size cap (default 1 MB).
rb_elite_balance_import_pending_ttlfilterHow long an unconfirmed import upload stays reviewable (default one hour).
rb_elite_balance_advanced_logging_enabledfilterForce diagnostic logging on or off.

Migration

HookTypeWhat it does
rb_elite_balance_migration_sourcesfilterRegister migration sources for other wallet plugins. See Custom migration sources.

Withdrawals

HookTypeWhat it does
rb_elite_balance_withdrawal_requestedactionAfter a customer opens a withdrawal request and its reserving hold is placed. Receives the WithdrawalRequest.
rb_elite_balance_withdrawal_transferredactionAfter staff mark a request transferred and the hold is captured into a debit. Never fires on a repeat call. Receives the WithdrawalRequest and the Transaction.
rb_elite_balance_withdrawal_rejectedactionAfter staff reject a request and its hold is released. Receives the WithdrawalRequest and the reason.
rb_elite_balance_withdrawal_cancelledactionAfter a customer cancels their own pending request and its hold is released. Receives the WithdrawalRequest.
rb_elite_balance_withdrawal_transfer_notefilterThe ledger note composed for a transferred withdrawal. Substitute the human payout method label for the stored key here.
rb_elite_balance_withdrawal_amount_limitsfilterThe per-request minimum and maximum, after the settings.
rb_elite_balance_withdrawal_methodsfilterThe parsed payout methods list (key, label, instructions, fee), after the setting.
rb_elite_balance_withdrawal_default_feefilterThe default flat fee, after the setting. Per-method fees and the staff-edited fee at transfer time still apply on top.
rb_elite_balance_rejection_reasonsfilterThe preset reason list on the admin rejection form. The chosen reason is shown to the customer.
rb_elite_balance_withdrawal_details_retention_daysfilterDays after a request reaches a terminal state before its payout details are auto-blanked (default 30, minimum 1).

Earning

HookTypeWhat it does
rb_elite_balance_earn_awardedactionAfter an earning rule credited a wallet. Never fires on replays. Receives the Transaction, the rule array, and the earning order (null for triggers without one: signup, review, birthday).
rb_elite_balance_earn_reversedactionAfter an award was (partly) reversed because its order was refunded or cancelled. Never fires on replays. Receives the reversal Transaction, the rule array (null when the rule no longer exists), and the order.
rb_elite_balance_earn_basefilterThe eligible base an earning rule computes against (default: items subtotal after discounts, excluding shipping and taxes). Receives the base and the order; must return a canonical non-negative decimal string.
rb_elite_balance_birthday_field_labelfilterThe label of the opt-in birthday field on My Account -> Account details.

Templates

HookTypeWhat it does
rb_elite_balance_locate_templatefilterThe resolved path of a template about to render.
rb_elite_balance_template_argsfilterThe arguments passed into a template. Receives the args and the template name.

This reference is generated from the plugin source, so names and parameters match the shipped code. In-code docblocks above each hook carry the full parameter signatures.

Stuck, or found a gap in these docs? Tell us and a human who works on the plugin answers.

Contact support →