diff --git a/includes/ContentImport/Importers/PostFields/Duplicating.php b/includes/ContentImport/Importers/PostFields/Duplicating.php index 0cd163f7..77e361c7 100644 --- a/includes/ContentImport/Importers/PostFields/Duplicating.php +++ b/includes/ContentImport/Importers/PostFields/Duplicating.php @@ -32,10 +32,9 @@ public static function info() { } public function import( array $data ) { - // Set the post type reading it from the request payload, if not possible, use the default one. - $data['post_type'] = $this->read_post_type_from_request( 'post' ); - $source_post = $this->import_coordinates->source_post; + // Set the post type same as source post, or reading it from the request payload, if not possible, use the default one. + $data['post_type'] = empty( $source_post->post_type ) ? $this->read_post_type_from_request( 'post' ) : $source_post->post_type; foreach ( $this->filter_fields() as $field ) { $value = $source_post->{$field};