WordPress.org

Plugin Reviews

WP Customer Reviews

WP Customer Reviews allows your customers and visitors to leave reviews or testimonials of your services. Reviews are Microformat enabled (hReview).

134518

178 reviews
Average Rating
4.5 out of 5 stars
Amazing work!
By , for WP 4.0.1

You rock dudes! I've been looking for this for a long time!

Perfect
By , for WP 4.0

Exactly what I was looking for, thanks!!

Dont Works and no Support
By , for WP 4.0

I have lot of problems with this plug-in and no support.

Since a few weeks are not swohn my newest reviews. I contact the support many times but dont get a answer.

Easy and effective
By , for WP 4.0

Have installed on many WP sites and blogs, have 1 now that no matter what i do, i have 1 template that is not allowing the submit to go on top of page/post http://customcreativeremodeling.com

Great plugin... looking forward to version 3...
By , for WP 4.0

Works great... easy to install and use.

MODIFYING WP CUSTOMER REVIEWS PLUGIN
By , for WP 4.0

WP Customer Reviews is an excellent plugin that allows visitors to write review and rate any particular product/blog/article in any WordPress powered site. The plugin supports writing reviews on pages, posts and even custom posts. The plugin is completely free and you can get most of its features out of the box. Recently I had used this excellent plugin in one of my project but suddenly my whole excitement demise when I received a wired requirement from the client. The client wanted to allow writing reviews for registered users only while the plugin supports writing review for anyone!

When you work for a client, you must need to set your mind for the ethics that “The client is always right”. With a retired mind and broken heart I finally went to review the 1344 lines of source-code (that’s a piece only) of the plugin. I started hard and paid a significant amount of time to understand the code and finally all my investments pays. I was able to modify the plugin to allow review from the authenticated users only. The code-base is fairly easy to understand if you have a basic understanding of object oriented programming and some advanced WordPress’s action hook. So let’s not waste any time, modify the plugin to meet our need.

In the wp-customer-reviews.php file, go to line number 1045. You’ll find,

IF ($THIS->OPTIONS['GOTO_SHOW_BUTTON'] == 1) {

JUST BEFORE THIS LINE, WRITE THIS CONDITIONAL STATEMENT,

IF (IS_USER_LOGGED_IN()) {

THEN GO TO LINE 1087 AND AFTER THIS LINE,

$OUT4 .= ‘<DIV CLASS=”WPCR_CLEAR WPCR_PB5″></DIV>’; ADD THIS ELSE STATEMENT AND FINALLY CLOSE THE CONDITIONAL IF STATEMENT.

} ELSE {

$OUT .= ‘<H2 STYLE=”COLOR: #C77405″>PLEASE LOGIN TO POST A REVIEW</H2>’;

};

EXPLANATION:

Well the code itself is very much self-explanatory. If you already know what the “is_user_logged_in()” function do in WordPress then you probably understand what modification is done. The is_user_logged_in() function checks if the current visitor is logged in or not and it returns a Boolean value. I wrapped the Review button with theis_user_logged_in() function to make sure that only logged in users will able to view the button and review and the else statement simply prints a message that users must be logged in to write a review. Simple as it should be. The solution is very simple but it was difficult to find the problem. This is the core part. If you are interested to play with it and want to implement a feature in the review plugin like there will be a check box in the plugin settings and check marking the box will allow logged in users to post review and unchecking the box allow anyone to review. More user friendly way actually. Thank you for reading. If you find it interesting, just drop us your thoughts in the comment section. Happy coding.

Awesome plugin
By , for WP 4.0

Love it. I wish there's an option to display reviews not only by POSTID but also by CATEGORY. Thanks!

Great Plugin
By , for WP 4.0

Keep up the good work!

super plugin
By , for WP 4.0

This is a great plugin! I use it for all my clients' websites.

Love It!
By , for WP 4.0

I have used the WP Customer Reviews plugin for years and it only gets better. Very easy to configure and style the page layout with CSS. Thank you - I appreciate your work!

You must log in to submit a review. You can also log in or register using the form near the top of this page.