Remove WP\Functions::__ and other translate functions
Under the new sniffer rules, those functions produce errors and, when those methods are used, the sniffer can not properly be applied. [MAILPOET-4524]
This commit is contained in:
@@ -4,7 +4,6 @@ namespace MailPoet\Mailer\Methods\ErrorMappers;
|
||||
|
||||
use MailPoet\Mailer\MailerError;
|
||||
use MailPoet\Mailer\SubscriberError;
|
||||
use MailPoet\WP\Functions as WPFunctions;
|
||||
|
||||
abstract class PHPMailerMapper {
|
||||
use ConnectionErrorMapperTrait;
|
||||
@@ -20,7 +19,7 @@ abstract class PHPMailerMapper {
|
||||
}
|
||||
|
||||
public function getErrorForSubscriber($subscriber) {
|
||||
$message = sprintf(WPFunctions::get()->__('%s has returned an unknown error.', 'mailpoet'), $this->getMethodName());
|
||||
$message = sprintf(__('%s has returned an unknown error.', 'mailpoet'), $this->getMethodName());
|
||||
$subscriberErrors = [new SubscriberError($subscriber, null)];
|
||||
return new MailerError(MailerError::OPERATION_SEND, MailerError::LEVEL_HARD, $message, null, $subscriberErrors);
|
||||
}
|
||||
|
Reference in New Issue
Block a user