Fix WordPress.WP.I18n.NonSingularStringLiteralText errors

[MAILPOET-4524]
This commit is contained in:
David Remer
2022-08-04 13:37:29 +03:00
committed by Veljko V
parent 218de96024
commit 76048224d1
9 changed files with 33 additions and 28 deletions

View File

@@ -222,7 +222,7 @@ class Settings extends APIEndpoint {
$response = ['status' => true];
} else {
return $this->badRequest([
APIError::BAD_REQUEST => __($e->getMessage(), 'mailpoet'),
APIError::BAD_REQUEST => $e->getMessage(),
]);
}
}
@@ -301,7 +301,12 @@ class Settings extends APIEndpoint {
return $this->deactivateReEngagementEmails();
} catch (\Exception $e) {
throw new \Exception(
__('Unable to deactivate re-engagement emails: ' . $e->getMessage(), 'mailpoet'));
sprintf(
// translators: %s is the error message.
__('Unable to deactivate re-engagement emails: %s', 'mailpoet'),
$e->getMessage()
)
);
}
}