Add trash status to Workflow

[MAILPOET-4417]
This commit is contained in:
David Remer
2022-08-10 13:04:01 +03:00
committed by Veljko V
parent dce1b1403c
commit 9a74dec86a
2 changed files with 8 additions and 1 deletions

View File

@ -67,7 +67,7 @@ class UpdateWorkflowController {
}
private function checkWorkflowStatus(string $status): void {
if (!in_array($status, [Workflow::STATUS_ACTIVE, Workflow::STATUS_INACTIVE, Workflow::STATUS_DRAFT], true)) {
if (!in_array($status, Workflow::STATUS_ALL, true)) {
// translators: %s is the status.
throw UnexpectedValueException::create()->withMessage(sprintf(__('Invalid status: %s', 'mailpoet'), $status));
}