HostBN Posted March 22, 2023 Share Posted March 22, 2023 <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaSecondarySidebar', 1, function(MenuItem $SecondarySidebar) { if(!is_null($SecondarySidebar->getChild('Categories'))){ $SecondarySidebar->getChild('Categories') ->getChild('Google Workspaces') ->setUri('https://mydomain.com/seo-packages/'); } }); Not working.. I want send user to my main Wordpress site link to buy product. so I need replace the link from category list 0 Quote Link to comment Share on other sites More sharing options...
HostBN Posted March 22, 2023 Author Share Posted March 22, 2023 use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaSecondarySidebar', 1, function(MenuItem $SecondarySidebar) { $categories = $SecondarySidebar->getChild('Categories'); if (!is_null($categories)){ $googleWorkspaces = $categories->getChild('Google Workspaces'); if (!is_null($googleWorkspaces)) { $googleWorkspaces->setUri('https://mydomain.com/g-suite-pricing-bangladesh') ->setLabel('test') ->setOrder(1); } } }); 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.