Testimonials/Reviews for Products

The most frequent approach would be to create a new “review” or “testimonial” Custom Post Type (“CPT”) with a plugin or in your theme‘s functions.php file (or a new child theme‘s functons.php file, if your current theme is not custom-built), and then alter your product page template to use a secondary loop to display your … Read more

Use contact form for reviews

First add 1-5 * (star) Radio button on comment form. add_action( ‘comment_form_logged_in_after’, ‘add_review_field_to_comment_form’ ); add_action( ‘comment_form_after_fields’, ‘add_review_field_to_comment_form’ ); function add_review_field_to_comment_form () { echo ‘<p class=”comment-form-rating”>’. ‘<label for=”rating”>Rating</label> <span class=”commentratingbox”>’; for( $i=1; $i <= 5; $i++ ) echo ‘<span class=”commentrating”><input type=”radio” name=”rating” id=”rating” value=”‘. $i .'”/>’. $i .'</span>’; echo'</span></p>’; } Now save the Rating value to … Read more

Add button linked to single product page on order detail page

The woocommerce_order_details_after_order_table hook receives the WC_Order object as the $order argument. This means you can get the items from the order with $order->get_items(). That will return an Array of WC_Order_Items. From this you can get the associated product of the first item, which you can use to get its permalink, to which you can append … Read more

WordPress product review

First you would create a custom post type “products”, you can use Custom Post Type UI for this. You can also do it by hand. Then you would create custom fields for the products, you can use the excellent ACF for this. Here’s some resources from the WordPress codex.

WooCommerce Review Author Hook on Review Submission

Found it! Go to wp-includes > comment-templates.php. Edit around line 2560: else ( ! is_user_logged_in() ) { to else { Then in my plugin .php file or your Theme ‘function.php’, add: function modify_author($commentdata) { $commentdata[‘comment_author’] = $_POST[‘author’]; // You should sanitize this. return $commentdata; } add_filter(‘preprocess_comment’, ‘modify_author’); I know it’s bad idea to modify comment-templates.php, … Read more

Limit review by e-mail

This question should really be directed to the Woocommerce support but it doesn’t really sound like Woocommerce is the right solution here. Create a plugin and in the plugin, create a custom post type called companies. Using something like https://generatewp.com/post-type/ will help you get started quickly. Then you want to look at implementing your own … Read more

Separate blog and reviews categories

Sounds like you’re sharing the default category taxonomy for both of your post types. When you want separate categories per post type, you would need to create a custom taxonomy for your review posts. Please check out the register_taxonomy function in the WordPress developers documentation. https://developer.wordpress.org/reference/functions/register_taxonomy/ See below an example of a custom taxonomy. add_action( … Read more

Users moderate own comments

http://wordpress.org/extend/plugins/role-scoper/ This plugin is great for fine tuned control of content. I have not, however, tried what you are requesting. So I can only suggest it as something to look into…. I’m not sure if it gives such fine tuned control over comments….