Hey all!
Just a sidenote, I just started getting into WHMCS and know little to nothing about it, just following the docs and seeing what I can do.
I am trying to remove the divider in the default navbar when you click on "Account" in between Login and Forgot Password?
The code I am using is located in the /includes/hooks folder (named removeDivider.php if it is of any use) and is as follows:
<?php
use WHMCS\View\Menu\Item as MenuItem;
add_hook('ClientAreaSecondaryNavbar', 1, function (MenuItem $secondaryNavbar) {
if (!is_null($secondaryNavbar->getChild('Account'))) {
$secondaryNavbar->getChild('Account')->removeChild('Divider');
}
});
Now when I look at the frontend again I see no change, I tried
add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) {
too, but without success, and I am starting to wonder if the hook is firing at all? Am I maybe using the wrong hook? Any help is greatly appreciated 🙂