A collection of quality-of-life hooks for the WHMCS admin area. Drop them into your includes/hooks/ directory and they work immediately. No core files modified, survives WHMCS updates.
Extends admin session lifetime to prevent frequent logouts.
The problem: PHP's default session.gc_maxlifetime is often 1440 seconds (24 minutes). Combined with WHMCS's own session handling, this causes frequent logouts and re-authentication prompts, even with "Remember Me" checked.
The fix: Extends the PHP session lifetime and cookie expiry to 24 hours (86400 seconds) on every admin page load, keeping your session alive as long as you're actively using the admin panel.
Prevents the Select2 client search dropdown from auto-focusing and opening when you load a client detail page.
The problem: WHMCS auto-focuses the client search field on client pages, which immediately opens a large dropdown covering the page content. Easy to accidentally click the wrong client.
The fix: Uses a MutationObserver and Select2 event interception to suppress auto-opening during page load while preserving normal click-to-search behavior.
- Download or clone this repository
- Copy the
.phpfiles into your WHMCSincludes/hooks/directory - That's it. No configuration needed.
# Example
cp *.php /path/to/whmcs/includes/hooks/Tested with WHMCS v9. Should work with v8+ as well.
MIT