Automattic / newspack-custom-content-migrator

Custom migration tasks for launching and migrating Newspack sites on Atomic
5 stars 5 forks source link

Remove breaking exit #356

Closed iuravic closed 1 year ago

iuravic commented 1 year ago

The main import command cmd_embarcadero_import_posts_content uses optional --index-from and --index-to arguments. If these are omitted command should import all the records (useful if running on local). If these optional arguments are used, these lines ("// Get selected posts.") will make sure only the selected records index-from and -to will be imported.

But there is also the if ( 2000 === $post_index ) { break; } which is removed by this PR. These lines will disable importing all records at once (if index-from and -to are not used) and will exit after 2000. We don't need this block, removed by this PR.

How to test