Jump to content

Remove a default panel from Six


sullise

Recommended Posts

Since we don't use WHMCS for support tickets I've been working on modifying the Six template to send them to our actual support desk.

 

Figured out the hooks to change the URI for the navbar links (Support->Tickets and Open Ticket). But cannot seem to get rid of the Recent Support Tickets panel.

 

This is the code I've been tinkering with:

 

use WHMCS\User\Client;
use WHMCS\View\Menu\Item;

$ca = new WHMCS_ClientArea();

if ($ca->isLoggedIn()) {

#remove the default Open Ticket item
add_hook('ClientAreaHomepagePanels', 1, function ($homePagePanels)
{
       $delPanel = $homePagePanels->removeChild('Recent Support Tickets');
});

}

 

Any help would be appreciated.

Link to comment
Share on other sites

for removing a panel, you don't really need to check if the user is logged in - they must be otherwise they wouldn't see the homepage panels!

 

<?php
use WHMCS\View\Menu\Item;

add_hook('ClientAreaHomepagePanels', 1, function (Item $homePagePanels)
{
$homePagePanels->removeChild('Recent Support Tickets');
});

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