Skip to content

Commit ad3445a

Browse files
committed
Get logger and relations
1 parent d3dbeca commit ad3445a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

includes/ContentImport/ContentImporter.php

+7-2
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,13 @@ public function import_content( ImportCoordinates $import_coordinates, array $po
294294
$importers = Map::instance()->make( $import_coordinates );
295295
}
296296

297-
$this->logger = $this->logger ?? new ImportLogger( $import_coordinates );
298-
$this->relations = $this->relations ?? new Relations( $import_coordinates );
297+
if ( is_null( $this->get_logger() ) ) {
298+
$this->set_logger( new ImportLogger( $import_coordinates ) );
299+
}
300+
301+
if ( is_null( $this->get_relations() ) ) {
302+
$this->set_relations( new Relations( $import_coordinates ) );
303+
}
299304

300305
if ( ! empty( $importers ) ) {
301306
$source_post_id = $import_coordinates->source_post_id;

0 commit comments

Comments
 (0)