Hello,
I have put the hook with the code below in the directory /includes/hooks/:
------------------------------------------------------------------
<?php
use WHMCS\View\Menu\Item as MenuItem;
add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar)
{
$urlidr = $vars['clientsdetails']['customfields15'];
if (!is_null($primaryNavbar->getChild('Services'))&&!is_null($urlidr)) {
$primaryNavbar->getChild('Services')
->addChild('Emergency Contacts', array(
'label' => Lang::trans('buyResellerWebsite'),
'uri' => $systemurl.'cart.php?a=add&pid='.$urlidr,
'order' => '100',
));
}
});
------------------------------------------------------------------
The issue is that the variable $urlidr = $vars['clientsdetails']['customfields15'] remains empty, even though listed among those in the page with {debug} in the file clientareahome.tpl.
Anyone can help me, please?
Thanks.