-
Notifications
You must be signed in to change notification settings - Fork 9
Comments
- Default WordPress Discussion feature
- Default WooCommerce Reviews feature
- Custom WordPress Discussion feature
- Custom WooCommerce Reviews feature
- Code
Starter uses default WordPress comment & default Woo reviews features extended by custom cool features: privacy checkbox, recaptcha, fileuploader, ajax for submit comment and load to front, extended rating (woo only), low-rating popup (woo only).
There are two different template sets for WordPress and WooCommerce.
Default WP "discussion" setting located at /wp-admin/options-discussion.php
Aren't all default features supports by Starter.
-
"Attempt to notify any blogs linked to from the post" and "Allow link notifications from other blogs (pingbacks and trackbacks) on new posts" - is recommended to keep disabled (why - read here).
-
"Allow people to submit comments on new posts" - only changing default state of Woo "Advanced->Enable reviews" setting when new product is been creating (see)
-
Comment author must fill out name and email - it require name&email for submit comment.
Files:-
templates\comment\comment-form.php- template for WP -
woocommerce-custom\comment\comment-form.php- template for Woo
-
-
Users must be registered and logged in to comment (Signup has been disabled. Only members of this site can comment.) - when enabled for unlogged users form does not available and displays related message.
Files:-
templates\comment\comment-section.php- template for WP -
woocommerce-custom\comment\comment-section.php- template for Woo
-
-
Automatically close comments on posts older than, Show comments cookies opt-in checkbox, allowing comment author cookies to be set, Enable threaded (nested) comments - does not supports.
-
Break comments into pages with {#} top level comments per page - in Starter sets how many comments load by default and by click "Show more".
Files:inc\comment\comment.php-
templates\comment\comment-section.php- template for WP -
woocommerce-custom\comment\comment-section.php- template for Woo
-
and the {last|first} page displayed by default - does not supports (due no pagination for comments).
-
Comments should be displayed with the {newer|older} comments at the top of each page - comment order: display older/newer comments on single page.
Files:inc\comment\comment.php-
templates\comment\comment-section.php- template for WP -
woocommerce-custom\comment\comment-section.php- template for Woo
All these settings pure backend - so works as expected.
Does not supports
Default woo "reviews" setting located at /wp-admin/admin.php?page=wc-settings&tab=products and on each single product in "Advanced" tab.
All default woo features supports by Starter.
-
Enable product reviews - enable/disable all reviews for all products: when disabled in loops and on single page displays nothing.
Files:woocommerce\single-product.phpwoocommerce-custom\global\product-item.php
-
Show "verified owner" label on customer reviews - display verified owners badge in review.
Files:woocommerce-custom\comment\comment-item.php
-
Reviews can only be left by "verified owners" - allow reviews for verified owners only.
Files:woocommerce-custom\comment\comment-item.php
-
Enable star rating on reviews - enable/disable rating.
Files:inc\comment\comment-backend.phpwoocommerce\single-product.phpwoocommerce-custom\comment\comment-form.phpwoocommerce-custom\comment\comment-item.phpwoocommerce-custom\global\product-item.php
-
Star ratings should be required, not optional - require rating when enabled.
Files:inc\comment\comment-backend.phpwoocommerce-custom\comment\comment-form.php
Works only when reviews enabled for all products - allow to disable reviews only for some certain products.
Files:
woocommerce\single-product.php-
woocommerce-custom\global\product-item.php
WordPress Discussion feature extended by a few cool features, each can be enabled/disabled in customizer /wp-admin/customize.php -> Starter Theme -> Comments.
Block sending comment without privacy agreeing.
Files:
assets\js\modules\wp\comment\comment.jsinc\comment\comment-backend.phpinc\comment\comment-customizer.php-
templates\comment\comment-form.php- template for WP -
woocommerce-custom\comment\comment-form.php- template for Woo
Files:
- ACF
Comment additional fields assets\js\modules\wp\comment\comment.jsassets\js\modules\wp\comment\fileuploader.jsassets\scss\theme\snippets\_forms_file_input.scssinc\comment\comment-backend.phpinc\comment\comment-customizer.php-
templates\comment\comment-form.php- template for WP -
woocommerce-custom\comment\comment-form.php- template for Woo
If to setup default WordPress setting 'Break comments into pages with' (and when amount of comments > then setup number) - on single page in comments section appears button 'Show more', by click on this button comments loads via ajax.
Files:
assets\js\modules\wp\comment\comment.jsinc\comment\comment.php-
templates\comment\comment-section.php- template for WP -
templates\comment\comment-item.php- template for WP -
woocommerce-custom\comment\comment-section.php- template for Woo -
woocommerce-custom\comment\comment-item.php- template for Woo
Images in comments are clickable, by click loads image modal via ajax.
Files:
assets\js\modules\wp\comment\comment_modal_image.jsinc\comment\comment.php-
templates\comment\comment-image-modal.php- template for WP -
woocommerce-custom\comment\comment-image-modal.php- template for Woo
Send comment via ajax.
Files:
assets\js\modules\wp\comment\comment.jsinc\comment\comment-backend.php-
templates\comment\comment-form.php- template for WP -
woocommerce-custom\comment\comment-form.php- template for Woo
Frontend validation processed by html5 checkValidity() (file assets\js\modules\wp\comment\comment.js) in cooperation with bootstrap validation.
Backend validation processed by default $comment->get_error_message() and in file inc\comment\comment-backend.php for catch custom errors (privacy, recaptcha, images, extended rating).
Files:
assets\js\modules\wp\comment\comment.js-
inc\comment\comment-backend.php
WooCommerce Reviews feature extended by a few cool features, each can be enabled/disabled in customizer /wp-admin/customize.php -> Starter Theme -> Comments.
(woocommerce only feature)

Extend default rating up to 3 separate ratings.
Default rating: available to change by changing value in inputs .js_rating_input (woocommerce-custom\comment\comment-form.php).
Star item width: because rating calculates by js - it's require to know the width of each star, by default it's 22px. If you need to change star item width - it's require to update attribute data-elem_width="22" (woocommerce-custom\comment\comment-form.php) for correct rating functional.
Files:
- ACF
Comment additional fields assets\js\modules\woo\review.jsassets\scss\theme\woo\_rating.scssassets\scss\theme\woo\_review.scssinc\comment\comment-backend.phpinc\woocommerce\woocommerce-customizer.phpwoocommerce-custom\comment\comment-form.phpwoocommerce-custom\comment\comment-item.php-
woocommerce-custom\global\rating.php
(woocommerce only feature)

Display popup when low rating comment - low rating is < 4 by default (can be changed in attribute data-minimum_rating="4", woocommerce-custom\comment\comment-form.php).
Files:
assets\js\modules\woo\review.jsassets\js\modules\wp\comment\comment.jsassets\scss\theme\woo\_review.scssinc\woocommerce\woocommerce-customizer.php-
woocommerce-custom\comment\comment-form.php
- ACF:
Comment additional fields - js:
-
assets\js\modules\wp\comment\comment.js- validation, submit, load more -
assets\js\modules\wp\comment\comment_modal_image.js- comment image modal -
assets\js\modules\wp\comment\fileuploader.js- fileuploader -
assets\js\modules\woo\review.js- rating, low-rating modal
-
- css:
-
assets\scss\theme\components\_comment.scss- comment -
assets\scss\theme\snippets\_forms_file_input.scss- fileuploader -
assets\scss\theme\woo\_rating.scss- rating -
assets\scss\theme\woo\_review.scss- low-rating popup
-
- logic:
-
inc\comment\comment-backend.php- custom validations, save custom rating and images -
inc\comment\comment-customizer.php- customizer settings. -
inc\comment\comment.php- load comment, image comment modal -
inc\woocommerce\woocommerce-customizer.php- customizer extended rating, low-rating modal
-
- tpl:
-
templates\comment\comment-form.php- comment form, template for WP -
templates\comment\comment-image-modal.php- comment image modal, template for WP -
templates\comment\comment-item.php- comment item, template for WP -
templates\comment\comment-section.php- wrapper for comments and comment form, template for WP -
woocommerce-custom\comment\comment-form.php- comment form, template for Woo -
woocommerce-custom\comment\comment-image-modal.php- comment image modal, template for Woo -
woocommerce-custom\comment\comment-item.php- comment item, template for Woo -
woocommerce-custom\comment\comment-section.php- wrapper for comments and comment form, template for Woo -
woocommerce-custom\global\product-item.php- rating/count comment in loops -
woocommerce-custom\global\rating.php- rating template -
woocommerce-custom\single-image-modal.php- single image modal -
woocommerce\single-product.php- rating/comment on single, comments, comment form include
-
- dependence - recaptcha:
-
assets\js\modules\wp\recaptcha.js- recaptcha js -
inc\recaptcha.php- recaptcha customizer and function
-