diff --git a/src/class-wp-import.php b/src/class-wp-import.php index bb2056f..bf5b5ce 100644 --- a/src/class-wp-import.php +++ b/src/class-wp-import.php @@ -745,7 +745,14 @@ function process_posts() { break; case 'wp_font_face': - $postdata = $this->process_font_face( $postdata ); + $postdata = $this->process_font_face( $postdata ); + + if ( is_wp_error( $postdata ) ) { + // Assing the error to $post_id so it is handled later. + $post_id = $postdata; + break; + } + $post_id = wp_insert_post( $postdata, true ); $post['postmeta'] = $this->process_font_face_postmeta( $post['postmeta'], $postdata ); break;