diff --git c/src/wp-includes/comment-template.php w/src/wp-includes/comment-template.php
index e97229f5f6..56e0ccda54 100644
--- c/src/wp-includes/comment-template.php
+++ w/src/wp-includes/comment-template.php
@@ -1201,7 +1201,7 @@ function comments_open( $post_id = null ) {
 	 * @param bool        $open    Whether the current post is open for comments.
 	 * @param int|WP_Post $post_id The post ID or WP_Post object.
 	 */
-	return apply_filters( 'comments_open', $open, $post_id );
+	return apply_filters( 'comments_open', $open, $_post->ID );
 }
 
 /**
@@ -1226,7 +1226,7 @@ function pings_open( $post_id = null ) {
 	 * @param bool        $open    Whether the current post is open for pings.
 	 * @param int|WP_Post $post_id The post ID or WP_Post object.
 	 */
-	return apply_filters( 'pings_open', $open, $post_id );
+	return apply_filters( 'pings_open', $open, $_post->ID );
 }
 
 /**
