23 $this->ruleService->deleteById(
$ruleId);
24 $this->messageManager->addSuccess(
__(
'The tax rule has been deleted.'));
25 return $resultRedirect->setPath(
'tax/*/');
27 $this->messageManager->addError(
__(
'This rule no longer exists.'));
28 return $resultRedirect->setPath(
'tax/*/');
29 }
catch (\
Magento\Framework\Exception\LocalizedException $e) {
30 $this->messageManager->addError($e->getMessage());
31 }
catch (\Exception $e) {
32 $this->messageManager->addError(
__(
'Something went wrong deleting this tax rule.'));
35 return $resultRedirect->setUrl($this->
_redirect->getRedirectUrl($this->getUrl(
'*')));
_redirect($path, $arguments=[])