Automattic\WooCommerce\Internal\PushNotifications\Services

NotificationStepLogger::format_message │ private static │ WC 1.0

Builds the human-readable message for a line. Readers filter on the context fields, never on this text.

Method of the class: NotificationStepLogger{}

No Hooks.

Returns

string.

Usage

$result = NotificationStepLogger::format_message( $step, $outcome ): string;
$step(string) (required)
Machine-readable step name.
$outcome(string) (required)
Machine-readable outcome.

NotificationStepLogger::format_message() code WC 11.3.0

private static function format_message( string $step, string $outcome ): string {
	return sprintf( '%s: %s', ucfirst( str_replace( '_', ' ', $step ) ), str_replace( '_', ' ', $outcome ) );
}