So, who am I ? Posted November 9, 2018 Share Posted November 9, 2018 Hello, I want to remove Provisioning Module Products from PrimaryNavbar and Provisioning Module Sample Panel from SecondarySidebar. For PrimaryNavbar I use ClientAreaPrimaryNavbar hook, weird thing is that I can hide every child of 'Services' except Provisioning Module Products, it seems I can't reach to Provisioning Module Products, but not sure why... add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) { if (!is_null($primaryNavbar->getChild('Services'))) { $primaryNavbar->getChild('Services') ->removeChild('Provisioning Module Products'); } }); For SecondarySidebar I use ClientAreaSecondarySidebar, but I can't hide it either. add_hook('ClientAreaSecondarySidebar', 1, function (MenuItem $secondarySidebar) { if (!is_null($secondarySidebar->getChild('Provisioning Module Sample Panel'))) { $secondarySidebar->removeChild('Provisioning Module Sample Panel'); } }); Any help would be much appreciated. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 9, 2018 Share Posted November 9, 2018 3 hours ago, So, who am I ? said: I want to remove Provisioning Module Products from PrimaryNavbar and Provisioning Module Sample Panel from SecondarySidebar. wouldn't it be easier to remove their creation from the module hook rather than trying to do it after it's been created using another hook ? https://github.com/WHMCS/sample-provisioning-module/blob/master/modules/servers/provisioningmodule/hooks.php 0 Quote Link to comment Share on other sites More sharing options...
So, who am I ? Posted November 22, 2018 Author Share Posted November 22, 2018 sorry for late answer, thank you! 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.