diff --git a/php/class-coauthors-plus.php b/php/class-coauthors-plus.php index f51a5289..73374d8d 100644 --- a/php/class-coauthors-plus.php +++ b/php/class-coauthors-plus.php @@ -1118,7 +1118,9 @@ public function delete_user_action( $delete_id ): void { if ( is_object( $delete_user ) ) { // Delete term $term = $this->get_author_term( $delete_user ); - wp_delete_term( $term->term_id, $this->coauthor_taxonomy ); + if ( $term ) { + wp_delete_term( $term->term_id, $this->coauthor_taxonomy ); + } } if ( $this->is_guest_authors_enabled() ) {