Hi I got this code from http://docs.whmcs.com/Editing_Client_Area_Menus and i put this into hook file. Everything works fine while I am not logged in. When I log in into customer account i got 500 internal error.
Anny issues?
<?php
add_hook('ClientAreaNavbars', 1, function ()
{
// Get the current navigation bars.
$primaryNavbar = Menu::primaryNavbar();
$secondaryNavbar = Menu::secondaryNavbar();
// Save the "Contact Us" link and remove it from the primary navigation bar.
$contactUsLink = $primaryNavbar->getChild('Contact Us');
$primaryNavbar->removeChild('Contact Us');
// Add the email sales link to the link's drop-down menu.
$contactUsLink->addChild('email-sales', array(
'label' => 'Email our sales team',
'uri' => 'sales@my-awesome-company.com',
'order' => 1,
'icon' => 'fa-diamond',
));
// Add the call us link to the link's drop-down menu.
$contactUsLink->addChild('call-us', array(
'label' => 'Call us',
'uri' => 'tel:+18005551212',
'order' => 2,
'icon' => 'fa-mobile',
));
// Add the map to the company to the link's drop-down menu.
$contactUsLink->addChild('map', array(
'label' => '123 Main St. AnyTown, TX 11223, USA',
'uri' => 'https:\/\/maps.google.com/maps/place/some-map-data',
'order' => 3,
'icon' => 'fa-map-marker',
));
// Add the link and its drop-down children to the secondary navigation bar.
$secondaryNavbar->addChild($contactUsLink);
// Make sure the contact us link appears as the first item in the
// secondary navigation bar.
$contactUsLink->moveToFront();
});