Automattic\WooCommerce\Internal\PushNotifications\Services

NotificationStepLogger::log_unattributed_failure │ public │ WC 11.3.0

Records a failure that happened before a notification could be identified, such as a loopback request that failed authorization.

Written under the module's own source only, since there is no journey to attach it to; the read path includes that source for the days in range.

Метод класса: NotificationStepLogger{}

Хуков нет.

Возвращает

void. Ничего (null).

Использование

$NotificationStepLogger = new NotificationStepLogger();
$NotificationStepLogger->log_unattributed_failure( $step, $outcome, $level, $message, $context ): void;
$step(строка) (обязательный)
Machine-readable step name, e.g. loopback_started.
$outcome(строка) (обязательный)
Machine-readable outcome, e.g. auth_failed.
$level(строка) (обязательный)
error or warning.
$message(строка) (обязательный)
Human-readable message for the error log.
$context(массив)
Extra scalar fields to store with the line.
По умолчанию: array()

Список изменений

С версии 11.3.0 Введена.

Код NotificationStepLogger::log_unattributed_failure() WC 11.3.0

public function log_unattributed_failure( string $step, string $outcome, string $level, string $message, array $context = array() ): void {
	$context['step']    = $step;
	$context['outcome'] = $outcome;

	$this->write_error( $level, $message, $context );
}