# storeengine/2.2.0/includes/shortcode/single-product-comments.php

StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates &amp; More, version 2.2.0. 29 lines.

- Page: https://pluginprobe.com/plugins/storeengine/2.2.0/code/includes/shortcode/single-product-comments.php
- Raw: https://pluginprobe.com/plugins/storeengine/2.2.0/raw/includes/shortcode/single-product-comments.php
- Modified: 2025-11-14T00:22:18+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/storeengine/2.2.0/code/includes/shortcode/single-product-comments.php#L10-L20`.

```php
<?php

namespace StoreEngine\Shortcode;

use StoreEngine\Utils\Helper;

class SingleProductComments {

	public function __construct() {
		add_shortcode( 'storeengine_single_product_comments', [ $this, 'render' ] );
	}

	public function render() {
		$enable_product_comments = (bool) Helper::get_settings( 'enable_product_comments', false );

		if ( ! $enable_product_comments ) {
			return '';
		}

		ob_start();
		if ( comments_open() || get_comments_number() ) {
			comments_template();
		}

		return ob_get_clean();
	}

}

```
