Skip to content

Commit 6a597e4

Browse files
authored
Apply suggestions from code review
1 parent c13bbd5 commit 6a597e4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Plugin_Command.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ public function activate( $args, $assoc_args = [] ) {
392392
if ( $force ) {
393393
deactivate_plugins( $plugin->file, false, true );
394394
} elseif ( ! $this->chained_command ) {
395-
// Only skip if not called from install command.
395+
// Only skip if not part of a chained command.
396396
WP_CLI::warning( "Plugin '{$plugin->name}' is already network active." );
397397
continue;
398398
}
@@ -403,7 +403,7 @@ public function activate( $args, $assoc_args = [] ) {
403403
if ( $force ) {
404404
deactivate_plugins( $plugin->file, false, false );
405405
} elseif ( ! $this->chained_command ) {
406-
// Only skip if not called from install command.
406+
// Only skip if not part of a chained command.
407407
WP_CLI::warning( "Plugin '{$plugin->name}' is already active." );
408408
continue;
409409
}
@@ -417,7 +417,7 @@ public function activate( $args, $assoc_args = [] ) {
417417
$result = activate_plugin( $plugin->file, '', $network_wide );
418418

419419
if ( is_wp_error( $result ) ) {
420-
// When called from install command, treat 'already_active' as success.
420+
// When called from a chained command, treat 'already_active' as success.
421421
// This handles race conditions where WordPress may have preserved activation
422422
// status during the install process.
423423
if ( $this->chained_command && 'plugin_already_active' === $result->get_error_code() ) {

0 commit comments

Comments
 (0)