Client Area Credit Widget
By Marketplace Admin★ ★ ★ ★ ★0 downloads
About this product
How It Works
When a client views their client area homepage, the hook:
Detects the currently logged-in client context from the WHMCS menu system
Retrieves their live credit balance and account currency from the client object
Injects an "Account Credit" panel into the homepage panel grid, formatted in the client's currency
Clicking the panel or the "Add Funds" button takes the client directly to the add funds page
No page reloads. No configuration. Drops straight into the native WHMCS panel system.
Benefits
Always accurate - Balance is pulled live from the WHMCS client object, so it reflects any recent transactions immediately
One-click top-up - The "Add Funds" button links directly to the add funds page, reducing friction for clients who want to top up
Fully localised - Uses WHMCS built-in language strings, so labels display correctly regardless of the client's language setting
Currency-aware - Formats the balance using the client's assigned currency via formatcurrency()
No template edits required - Hooks into the native ClientAreaHomepagePanels system; works with any compatible theme
Null-safe - Guards against missing client context so it never causes errors on anonymous or non-client pages
How to Use
Download the hook file
Upload it to /path/to/whmcs/includes/hooks/
Ensure your clients have a credit balance or add funds configured under Billing → Add Credit in the WHMCS admin
Done - the credit panel will automatically appear on the client area homepage for any logged-in client
No configuration file needed. No database changes. Plug and play.
When a client views their client area homepage, the hook:
Detects the currently logged-in client context from the WHMCS menu system
Retrieves their live credit balance and account currency from the client object
Injects an "Account Credit" panel into the homepage panel grid, formatted in the client's currency
Clicking the panel or the "Add Funds" button takes the client directly to the add funds page
No page reloads. No configuration. Drops straight into the native WHMCS panel system.
Benefits
Always accurate - Balance is pulled live from the WHMCS client object, so it reflects any recent transactions immediately
One-click top-up - The "Add Funds" button links directly to the add funds page, reducing friction for clients who want to top up
Fully localised - Uses WHMCS built-in language strings, so labels display correctly regardless of the client's language setting
Currency-aware - Formats the balance using the client's assigned currency via formatcurrency()
No template edits required - Hooks into the native ClientAreaHomepagePanels system; works with any compatible theme
Null-safe - Guards against missing client context so it never causes errors on anonymous or non-client pages
How to Use
Download the hook file
Upload it to /path/to/whmcs/includes/hooks/
Ensure your clients have a credit balance or add funds configured under Billing → Add Credit in the WHMCS admin
Done - the credit panel will automatically appear on the client area homepage for any logged-in client
No configuration file needed. No database changes. Plug and play.
