nikitas Posted September 15, 2019 Share Posted September 15, 2019 Hello, im new to whmcs... i want to hide the paid invoices in client area ... i found out that i can do it with a hook Tried to modify the code provided by @brian! (btw thanks for that) but it didnt work... could someone help me out please ? Thanks 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 16, 2019 Share Posted September 16, 2019 you could modify the hook posted in the above thread... <?php # Remove Paid Invoices Array Hook # Written by brian! function clients_hide_paid_invoices_hook($vars) { $hideStatus = array ('paid'); // add status which you want to hide here in lowercase.. $invoices = $vars['invoices']; foreach($invoices as $key => $invoice) { if (in_array($invoice['rawstatus'], $hideStatus)) { unset($invoices[$key]); } } return array("invoices" => $invoices); } add_hook("ClientAreaPageInvoices", 1, "clients_hide_paid_invoices_hook"); and hide the filter sidebar with some code in custom.css #Primary_Sidebar-My_Invoices_Status_Filter-Paid {display: none;} 1 Quote Link to comment Share on other sites More sharing options...
nikitas Posted September 16, 2019 Author Share Posted September 16, 2019 Thank you so much! ofc its working ;)))) @brian! thanks a lot 😉 i was trying hours to get this done I hope this is usefull for others too... 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.