Im wanting to add a custom Client Area Panel but only want it to show if client has a active service.
If not active service or service is Canceled, Terminated, Pending, ETC I dont want the panel to show. is this possible?
<?php
use WHMCS\View\Menu\Item;
add_hook('ClientAreaHomepagePanels',1,function(Item $homePagePanels){
$ServiceMessage =<<<EOT
<p>
PANNEL MESSAGE HERE
</p>
EOT;
$homePagePanels->addChild('servmsg', array('label'=>'PANEL TITLE HERE','icon'=>'fa-exclamation-triangle','order'=>10,'extras'=> array('color'=>'pomegranate','btn-link'=>'http://button.link.here',// button link - CHANGE THIS'btn-text'=>'BUTTON TITLE HERE','btn-icon'=>'fa-arrow-right',),'bodyHtml'=> $ServiceMessage,'footerHtml'=>'Thank You for Choosing Us.',// bottom message));});
Question
Synister
Im wanting to add a custom Client Area Panel but only want it to show if client has a active service.
If not active service or service is Canceled, Terminated, Pending, ETC I dont want the panel to show. is this possible?
Link to comment
Share on other sites
9 answers to this question
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.