Drweb Posted January 26, 2017 Share Posted January 26, 2017 How can I change the link of the btn-link to the widget Overdue Invoices, in the clientareahome. Currently the button takes the client to clientarea.php?action=masspay&all=true but I would like to change the link to clientarea.php?action=invoices. I can't create a hook to change this link. Thank you. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 26, 2017 Share Posted January 26, 2017 if you create a new .php file in /includes/hooks, and paste the code below into it, then it will change the link in the panel. <?php use WHMCS\View\Menu\Item; add_hook('ClientAreaHomepagePanels', 1, function (Item $homePagePanels) { if (!is_null($homePagePanels->getChild('Overdue Invoices'))) { $homePagePanels->getChild('Overdue Invoices') ->setExtra('btn-link','clientarea.php?action=invoices'); } }); 0 Quote Link to comment Share on other sites More sharing options...
Drweb Posted January 26, 2017 Author Share Posted January 26, 2017 if you create a new .php file in /includes/hooks, and paste the code below into it, then it will change the link in the panel. <?php use WHMCS\View\Menu\Item; add_hook('ClientAreaHomepagePanels', 1, function (Item $homePagePanels) { if (!is_null($homePagePanels->getChild('Overdue Invoices'))) { $homePagePanels->getChild('Overdue Invoices') ->setExtra('btn-link','clientarea.php?action=invoices'); } }); Wonderful! The hook worked perfectly. Thank you so much. 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.