Whether the current post is open for comments.

Signature

comments_open( $post_id = null )
post_id
 (int|WP_Post) Post ID or WP_Post object. Default current post.
Default: null

Return

(boolean) True if the comments are open.

Source

function comments_open( $post_id = null ) {

	$_post = get_post($post_id);

	$open = ( 'open' == $_post->comment_status );

	/**
	 * Filter whether the current post is open for comments.
	 *
	 * @since 2.5.0
	 *
	 * @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 );
}
WP Trac GitHub

Link here