Jump to content

How do I remove the Website & Security drop down in my menu?


Web Host Pro

Recommended Posts

13 hours ago, Web Host Pro said:

I would like to remove this, we are just trying to have less stuff in the members area.

then you will need a hook - the one below should 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');
	}
});
Link to comment
Share on other sites

16 hours ago, Web Host Pro said:

Didn't WHMCS add a hook for this to be added?

yes.

16 hours ago, Web Host Pro said:

And if so wouldn't it be better to remove the WHMCS added hook? 

yes, but we don't have access to it - it will be in an encoded file.

theoretically, and as a side-effect of removing the landing page links via turning them off in the Landing Pages settings, you can remove the links from that parent menu (though removes them from cart sidebar too)...

Quote

By default, links to these pages will be added to the Store primary navigation menu when the service is activated. These links can be added or removed under the Other Settings tab when managing a service.

SVaaxf7.png

but even with them all disabled, under some circumstances, you can still end up with one orphan child (maybe if you aren't selling SSL Certs, then that child won't exist and the parent will disappear)...

p486Gzf.png

hence why I suggested to nuke it with a hook - if there was a viable 100% successful non-hook solution that I was aware of, I would have posted it! 🙂

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated