Edit sorry I am using the following hook to redirect store menu items to various pages. It was working but now has randomly stopped working. This is the code:
<?php
# Change Store Navbar Links Hook
# Written by brian!
use WHMCS\View\Menu\Item as MenuItem;
add_hook('ClientAreaPrimaryNavbar', 1, function(MenuItem $primaryNavbar)
{
$Store = $primaryNavbar->getChild("Store");
if (empty($Store)) {
return;
}
$StoreChildren = $Store->getChildren();
$kidslinks = array("Website Hosting", "Reseller Hosting", "Virtual Servers", "Dedicated Servers", "VPN",);
foreach($StoreChildren as $key => $Store_details_child) {
if (in_array($key, $kidslinks)) {
if ($key === "Website Hosting"){$newlink = "https://infusedhosting.co.uk/website-hosting/";}
elseif ($key === "Reseller Hosting"){$newlink = "https://infusedhosting.co.uk/reseller-hosting/";}
elseif ($key === "Virtual Servers"){$newlink = "https://infusedhosting.co.uk/virtual-servers/";}
elseif ($key === "Dedicated Servers"){$newlink = "https://infusedhosting.co.uk/dedicated-servers/";}
elseif ($key === "VPN"){$newlink = "https://infusedhosting.co.uk/vpn/";}
}
}
});