Skip to content

Commit dc23c86

Browse files
committed
Fix migrate authors query pagination
1 parent bb0c1cc commit dc23c86

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

inc/cli/class-migrate-command.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,11 @@ public function wp_authors( $args, $assoc_args ) : void {
128128
WP_CLI::line( sprintf( 'Processed %d posts, pausing for a breath...', $count ) );
129129
sleep( 2 );
130130

131-
$paged++;
131+
// When not overwriting, or during a dry run,
132+
// need to skip pagination due to NOT EXISTS tax query.
133+
if ( $dry_run || $overwrite ) {
134+
$paged++;
135+
}
132136
} while ( count( $posts ) );
133137

134138
if ( true === $dry_run ) {

0 commit comments

Comments
 (0)