Skip to content

Commit c62f573

Browse files
Copilotswissspidy
andcommitted
Improve maintainability by using slug_key variable consistently
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
1 parent 7978aad commit c62f573

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/WP_CLI/CommandWithTranslation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public function update( $args, $assoc_args ) {
132132

133133
// Capture data for formatted output (skip for summary format).
134134
if ( $format && 'summary' !== $format ) {
135-
$slug_value = 'core' === $obj_type ? $update->Version : $update->slug;
135+
$slug_value = 'version' === $slug_key ? $update->Version : $update->slug;
136136
$results_data[] = array(
137137
$slug_key => $slug_value,
138138
'language' => $update->language,

0 commit comments

Comments
 (0)