Jump to content

Remove "Quote" menu item


Denisman

Recommended Posts

Hello,

I am trying to remove "QUOTE" menu item,  and I have a problem.

Whmcs version is  8.0.1

In hook example.php I add this:

<?php

use WHMCS\View\Menu\Item as MenuItem;

add_hook('ClientAreaSecondarySidebar', 1, function(MenuItem $secondarySidebar)
{
       if (!is_null($secondarySidebar->getChild('Billing'))) {
               $secondarySidebar->getChild('Billing')
                               ->removeChild('Quotes');
       }
});

When I go to client area "QUOTE" menu item is still there.

Can somebody help me?

Link to comment
Share on other sites

  • 3 weeks later...
On 03/10/2020 at 09:36, Denisman said:

Can somebody help me?

that hook would remove the entry from a the sidebar..

OoA4mFh.png

if you wanted to remove it from the menu, then you'd probably need to use a PrimaryNavbar hook instead.

YMWMU6D.png

if you're using a custom theme where the menu is on the left/right hand side and vertical, it will still likely require a PrimaryNavbar rather than a sidebar hook.

On 03/10/2020 at 09:36, Denisman said:

In hook example.php I add this:

I would recommend creating a new php file for this hook, as it's highly possible example.php would be automatically replaced during an update.

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