Redirect to trash if attempting to edit trashed workflow

[MAILPOET-4532]
This commit is contained in:
John Oleksowicz
2022-08-30 17:15:49 -05:00
committed by Jan Jakeš
parent 38b0d627b0
commit b3cef92147

View File

@@ -50,6 +50,11 @@ class AutomationEditor {
return;
}
if ($workflow->getStatus() === Workflow::STATUS_TRASH) {
$this->wp->wpSafeRedirect($this->wp->adminUrl('admin.php?page=mailpoet-automation&status=trash'));
exit();
}
$this->pageRenderer->displayPage('automation/editor.html', [
'context' => $this->buildContext(),
'workflow' => $this->buildWorkflow($workflow),