Dear all,
I tried the following hook to simply change $companyname but it does not work:
add_hook('ClientAreaPage', 1, function($vars) {
global $smarty;
$vars['companyname'] = 'Acme Ltd';
$vars['companyname2'] = 'Acme Ltd';
$smarty->assign('companyname', 'Acme Ltd');
return $vars;
});
When using {debug}, $companyname2 is set to 'Acme Ltd', but $companyname is still set to the company name defined in WHMCS.
So I'd like to know if you know a way to change existing Smarty variables. $companyname is just an example, I want to do to more complicated stuff with WHMCS variables so please do not let me know how to change $companyname 😉
Thanks :)