JuniYadi Posted August 1, 2016 Share Posted August 1, 2016 hello, this is first time to me develop provision module with whmcs, and the module its works perfectly, but in service product section area, i want to delete primary sidebar (overview). something look like this : try with hooks but its not works, <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaSecondarySidebar', 1, function (MenuItem $primarySidebar) { if (!is_null($primarySidebar->getChild('Service Details Overview'))) { $primarySidebar->removeChild('Manage Reverse DNS'); } }); thank you 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted August 1, 2016 Share Posted August 1, 2016 try this <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function (MenuItem $primarySidebar) { if (!is_null($primarySidebar->getChild('Service Details Overview'))) { $primarySidebar->getChild('Service Details Overview')->removeChild('Manage Reverse DNS'); } }); 0 Quote Link to comment Share on other sites More sharing options...
JuniYadi Posted August 15, 2016 Author Share Posted August 15, 2016 try this <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function (MenuItem $primarySidebar) { if (!is_null($primarySidebar->getChild('Service Details Overview'))) { $primarySidebar->getChild('Service Details Overview')->removeChild('Manage Reverse DNS'); } }); Not working sir, how to i can include hooks to provision module? is it correct? sorry i can't attach any picture on this forum. http://prntscr.com/c61r9y 0 Quote Link to comment Share on other sites More sharing options...
JuniYadi Posted August 15, 2016 Author Share Posted August 15, 2016 try this <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function (MenuItem $primarySidebar) { if (!is_null($primarySidebar->getChild('Service Details Overview'))) { $primarySidebar->getChild('Service Details Overview')->removeChild('Manage Reverse DNS'); } }); Not working sir. is it correct for include hooks to provision module? 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted August 16, 2016 Share Posted August 16, 2016 you can try to put the same code inside PHP file and upload it in /includes/hooks/ directory? 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.