From 31a8e7e33db7de697d6a3d14c56ff281f1d4b5e0 Mon Sep 17 00:00:00 2001
From: Angus McLeod <angus@mcleod.org.au>
Date: Wed, 26 Jun 2024 09:36:00 +0200
Subject: [PATCH] Don't require existing wp comments to show wp comments with
 setting

---
 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';