Web Host Pro Posted August 17, 2021 Share Posted August 17, 2021 I tried this one but no go. How do you find the correct name for a Child? Can you please help me make a hook to disable this section in my client menu. I hard link these in another way. <?php # Remove MarketConnect Navbar Hook # Written by brian! use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) { if (!is_null($primaryNavbar->getChild('Website & Security'))) { $primaryNavbar->removeChild('Website & Security'); } }); 0 Quote Link to comment Share on other sites More sharing options...
HostingMe Posted August 17, 2021 Share Posted August 17, 2021 3 hours ago, Web Host Pro said: I tried this one but no go. How do you find the correct name for a Child? If you use the developer tools in your browser you can find the 'menuitemname' of the element you're trying to remove. With the hook you posted just change 'Website & Security' to say 'Website Security' that'll do it. <?php # Remove MarketConnect Navbar Hook # Written by brian! use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) { if (!is_null($primaryNavbar->getChild('Website Security'))) { $primaryNavbar->removeChild('Website Security'); } }); 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.