From 5dd32378fa4d999d3620264f73a5a80760a31b5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Zieli=C5=84ski?= Date: Tue, 19 Nov 2024 17:46:16 +0100 Subject: [PATCH] Seek to the cursor in import_entities_step --- .../data-liberation/src/import/WP_Stream_Importer.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/playground/data-liberation/src/import/WP_Stream_Importer.php b/packages/playground/data-liberation/src/import/WP_Stream_Importer.php index c0b4f17050..81e30e7f87 100644 --- a/packages/playground/data-liberation/src/import/WP_Stream_Importer.php +++ b/packages/playground/data-liberation/src/import/WP_Stream_Importer.php @@ -297,7 +297,9 @@ public function import_entities_step() { $factory = $this->entity_iterator_factory; $this->entities_iterator = $factory(); $this->importer = new WP_Entity_Importer(); - // @TODO: Seek to the last processed entity if we have a cursor. + if( $this->entities_cursor ) { + $this->entities_iterator->resume( $this->entities_cursor ); + } } if ( ! $this->entities_iterator->valid() ) {