Automattic\WooCommerce\Internal\PushNotifications\Services

NotificationStepLogger::log_notification_step │ public │ WC 11.3.0

Records a notification-level step.

Method of the class: NotificationStepLogger{}

No Hooks.

Returns

void. Nothing (null).

Usage

$NotificationStepLogger = new NotificationStepLogger();
$NotificationStepLogger->log_notification_step( $notification, $step, $outcome, $context ): void;
$notification(Notification) (required)
The notification the step belongs to.
$step(string) (required)
Machine-readable step name, e.g. recipients.
$outcome(string) (required)
Machine-readable outcome, e.g. ok or no_tokens.
$context(array)
Extra scalar fields to store with the line.
Default: array()

Changelog

Since 11.3.0 Introduced.

NotificationStepLogger::log_notification_step() code WC 11.3.0

public function log_notification_step( Notification $notification, string $step, string $outcome, array $context = array() ): void {
	$this->write( $notification, $step, $outcome, $context );
}