Ok, for anyone else looking to add back the Request Cancellation functionality, this is my final product. It works on the Service Details page, and when you click Cancel, it adds the menu item and makes it active. This just completes the look.
<?php
add_hook('ClientAreaPage', 1, function ($vars) {
$primarySidebar = Menu::primarySidebar();
$ServiceActions = $primarySidebar->getChild('Service Details Actions');
if (empty($ServiceActions)) {
return;
}
if (is_null($ServiceActions->getChild('Cancel'))) {
if ($vars['status'] === "Active") {
$ServiceActions->addChild('Cancel')->setLabel(Lang::trans('clientareacancelrequestbutton'))->setURI('clientarea.php?action=cancel&id=' . $vars['id'])->setOrder(40);
}
else if ($vars['clientareaaction'] === 'cancel') {
$ServiceActions->addChild('Cancel')->setLabel(Lang::trans('clientareacancelrequestbutton'))->setURI('clientarea.php?action=cancel&id=' . $vars['id'])->setOrder(40)->setClass('list-group-item active');
}
}
});
<