Posted By Shahid Malla

How To Remove WHMCS Sidebar from the order form - Shahid Malla - WHMCS Expert Freelancer

Hi, in this guide i will show you how you can hide the sidebar from whmcs

For Orderform

<?php

use WHMCS\View\Menu\Item as MenuItem;

add_hook('ClientAreaSecondarySidebar', 1, function(MenuItem $secondarySidebar)
{
   $client = Menu::context('client');

   if (is_null($client) and (!is_null($secondarySidebar->getChild('Categories')))) {
            $secondarySidebar->removeChild('Categories');
   }

   if (is_null($client) and (!is_null($secondarySidebar->getChild('Actions')))) {
            $secondarySidebar->removeChild('Actions');
   }
});

For clientarea
add_hook('ClientAreaSecondarySidebar', 1, function(MenuItem $secondarySidebar)
{
   if (!is_null($secondarySidebar->getChild('Client Shortcuts'))) {
            $secondarySidebar->removeChild('Client Shortcuts');
   }
   if (!is_null($secondarySidebar->getChild('Client Contacts'))) {
            $secondarySidebar->removeChild('Client Contacts');
   }
});

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x