Dear community,
I am new on this forum. Since a month I have been trying to configure the WHMCS installation for my needs. WHMCS hotline has directed me to this forum.
Can someone from the community help me, who has already experienced with WHMCS ?
I want to remove from the menu ,,Announcements,, and ,,Network Status,,. I found this code (below) to copy in a hook. The question: in which hook do I have to copy this code? Do I have to create a new hook? If so, with what name?
Thank you for help.
Best regards:
Persemp
Hiding/Removing a Menu Item
You can remove a menu item as follows:
<?php
use WHMCS\View\Menu\Item as MenuItem;
add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar)
{
if (!is_null($primaryNavbar->getChild('Network Status'))) {
$primaryNavbar->removeChild('Network Status');
}
});