diff --git a/php/class-wp-cli.php b/php/class-wp-cli.php index 4ad1a352..af5542e9 100644 --- a/php/class-wp-cli.php +++ b/php/class-wp-cli.php @@ -472,6 +472,9 @@ public function swap_coauthors( $args, $assoc_args ) { } } + // Add the 'to' author on + $coauthors[] = $to_userlogin; + // By not passing $append = false as the 3rd param, we replace all existing coauthors $coauthors_plus->add_coauthors( $post->ID, $coauthors, false );