Automattic\WooCommerce\Internal\PushNotifications\Services
StepLogQuery::format_row
Shapes one row for the REST response.
Method of the class: StepLogQuery{}
No Hooks.
Returns
array.
Usage
$result = StepLogQuery::format_row( $row ): array;
- $row(array) (required)
- The row as a reader produced it.
StepLogQuery::format_row() StepLogQuery::format row code WC 11.3.0
private static function format_row( array $row ): array {
$formatted = array(
'timestamp' => gmdate( 'c', $row['timestamp'] ),
'level' => $row['level'],
'message' => $row['message'],
'context' => $row['context'],
);
// Only a line whose context did not parse has raw text to show, and for
// those it is all there is, since the context is null.
if ( null !== $row['raw'] ) {
$formatted['raw'] = $row['raw'];
}
return $formatted;
}