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.
Method of the class: NotificationStepLogger{}
No Hooks.
Returns
array.
Usage
$result = NotificationStepLogger::identify( $notification, $step, $outcome, $context ): array;
- $notification(Notification) (required)
- The notification.
- $step(string) (required)
- Machine-readable step name.
- $outcome(string) (required)
- Machine-readable outcome.
- $context(array) (required)
- The caller's context.
NotificationStepLogger::identify() NotificationStepLogger::identify code 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,
)
);
}