$_SESSION['Language'] isn't set unless the user change it from the language dropdown in WHMCS. $_SESSION['Language'] is only set during language change in WHMCS.
The code would have to be expanded to take that into account and e.g. defaulting to the default language available in clientdetails.
Additionally, please remove the .onpay.php.swp file from the pull request.
This won't work reliably.
$_SESSION['Language']
isn't set unless the user change it from the language dropdown in WHMCS.$_SESSION['Language']
is only set during language change in WHMCS.The code would have to be expanded to take that into account and e.g. defaulting to the default language available in
clientdetails
.Additionally, please remove the
.onpay.php.swp
file from the pull request.