Automattic\WooCommerce\Internal\PushNotifications\Services
NotificationStepLogger::identify
Adds the fields every line needs to be joined back to its notification. The caller's context cannot overwrite them.
Метод класса: NotificationStepLogger{}
Хуков нет.
Возвращает
array.
Использование
$result = NotificationStepLogger::identify( $notification, $step, $outcome, $context ): array;
- $notification(Notification) (обязательный)
- The notification.
- $step(строка) (обязательный)
- Machine-readable step name.
- $outcome(строка) (обязательный)
- Machine-readable outcome.
- $context(массив) (обязательный)
- The caller's context.
Код NotificationStepLogger::identify() NotificationStepLogger::identify WC 11.3.0
private static function identify( Notification $notification, string $step, string $outcome, array $context ): array {
return array_merge(
$context,
array(
'identifier' => $notification->get_identifier(),
'type' => $notification->get_type(),
'resource_id' => $notification->get_resource_id(),
'step' => $step,
'outcome' => $outcome,
'remote-logging' => false,
)
);
}