From 0a3eb4fa28e47fbcc5d98012bdc5c933430f6f30 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Thu, 27 Jun 2024 20:13:28 +0200 Subject: [PATCH] Don't require existing wp comments to show wp comments with setting (#523) --- lib/discourse-comment.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/discourse-comment.php b/lib/discourse-comment.php index b127fdac..a468da46 100644 --- a/lib/discourse-comment.php +++ b/lib/discourse-comment.php @@ -318,10 +318,7 @@ public function comments_template( $old ) { break; } - // Use $post->comment_count because get_comments_number will return the Discourse comments - // number for posts that are published to Discourse. - $num_wp_comments = $post->comment_count; - if ( empty( $this->options['show-existing-comments'] ) || 0 === intval( $num_wp_comments ) ) { + if ( empty( $this->options['show-existing-comments'] ) ) { echo wp_kses_post( $discourse_comments ); return WPDISCOURSE_PATH . 'templates/blank.php';