• Resolved rainbowguy

    (@rainbowguy)


    Hi. Just installed the plugin Woocommerce Customer Reviews.

    I would like to modify the layout according to my theme and also change the percentage shown next to each review star to numeric instead represented by the number of voters.

    Any advice on how to get started like developer documentation or hooks/filters available?

    Thx

    • This topic was modified 11 months, 2 weeks ago by rainbowguy.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support pistachio6321

    (@pistachio6321)

    Thank you for trying our plugin!

    You can override the default templates and modify layout as explained in this article: How to Override Default Templates.

    Thread Starter rainbowguy

    (@rainbowguy)

    Thanks.

    Yes, I did this and looking for more details on functions, filters on how to change functionality such as find number of votes per review star instead of percentage? Is there some kind of hook guide and list of functions?

    Plugin Support pear8398

    (@pear8398)

    Hi,

    I think that you want to adjust the display of the review summary bar on the reviews section. There isn’t a filter hook or template to modify this section. If you want to check the code, please take a look at the file wp-content/plugins/customer-reviews-woocommerce/includes/reviews/class-cr-reviews.php, function show_summary_table.

    Thread Starter rainbowguy

    (@rainbowguy)

    Thanks for the reply.

    I did find the answer as per below:

           echo '5 star' . $product->get_rating_count( 5 ) . ' votes <br>';
    echo '4 star' . $product->get_rating_count( 4 ) . ' votes <br>';
    echo '3 star' . $product->get_rating_count( 3 ) . ' votes <br>';
    echo '2 star' . $product->get_rating_count( 2 ) . ' votes <br>';
    echo '1 star' . $product->get_rating_count( 1 ) . ' votes <br>';

    It counts the number of votes per rating.

    Thread Starter rainbowguy

    (@rainbowguy)

    Also, I was going to post a new topic today about pear8398 answer but he replied to it beforehand 🙂 Thx!

    Indeed, I was looking for the template for the summary but couldn’t find it. The file you suggested is the one. Great!

    Thread Starter rainbowguy

    (@rainbowguy)

    @pear8398 Is it possible to customize like @pistachio6321 mentioned please?

    Plugin Support pistachio6321

    (@pistachio6321)

    The reviews summary bar is not part of the template, so you won’t be able to override it with your custom template. However, if you need to replace % of reviews with count of reviews, you can use the filter cr_reviews_summbar_rtn_prc as explained here: List of Filters. I hope it will be helpful!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Modify Reviews’ is closed to new replies.