Skip to main content
TeraWallet is highly extensible, offering numerous actions and filters to customize its behavior.

Essential Filters

woo_wallet_current_balance

Modify the current wallet balance before it is returned.
  • Parameters: (float) $balance, (int) $user_id.
  • Example: Add a temporary 5% bonus to all balance displays.

woo_wallet_payment_is_available

Programmatically toggle the wallet payment gateway visibility.
  • Parameters: (bool) $is_available.
  • Example: Disable wallet payment for a specific product category.

woo_wallet_cashback_amount

Adjust the calculated cashback amount before it’s stored.
  • Parameters: (float) $cashback_amount, (int) $order_id.

woo_wallet_disallow_negative_transaction

Allow or disallow negative transactions for specific scenarios.
  • Parameters: (bool) $disallow, (float) $amount, (float) $balance.
  • Example: Allow a “Credit Limit” for trusted users.

Essential Actions

woo_wallet_transaction_recorded

Fires after any successful credit or debit to the ledger.
  • Parameters: (int) $transaction_id, (int) $user_id, (float) $amount, (string) $type.
  • Example: Send a custom SMS notification when balance is updated.

woo_wallet_payment_processed

Fires after a successful wallet purchase.
  • Parameters: (int) $order_id, (int) $transaction_id.

woo_wallet_admin_adjust_balance

Fires when an administrator manually edits a user’s balance.
  • Parameters: (int) $user_id, (float) $amount, (string) $payment_type.

woo_wallet_credit_purchase_completed

Fires when a customer completes a “Wallet Topup” order.
  • Parameters: (int) $transaction_id, (object) $order.

Customizing Partial Payments

woo_wallet_partial_payment_amount

Modify the amount applied as a partial payment.
  • Parameters: (float) $amount.
  • Example: Always cap partial payments to 50% of the total order.

Recently Added Hooks (1.6.1–1.6.4)

These hooks were introduced in recent releases. Each name below was verified against the plugin source.

Example: add a dashboard summary card

When using hooks that modify balance or payment eligibility, always test with a non-admin user to ensure correct front-end behavior.