• Resolved beng56

    (@beng56)


    Hello,

    I would like to use WooCommerce reviews but with a special behavior. From what I’ve seen, in the free version of the plugin, we can allow review only to logged-in users and we can simply disable all reviews for a product.
    What I’m looking for is a way to hide reviews to everybody expect admin and the user itself who left a review. It’s lie a “private mode”. The users can review several times this product but this part is already allowed in WooCommerce if I’m not mistaken. This behavior should only be for one product but I don’t mind if all the products act this way too.

    Thanks a lot for your support,

    Best,

    Benoit

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @beng56 ,

    Okay, this is an interesting idea.

    Most of the customization regarding this will go to the template file –
    \wp-content\plugins\woocommerce\templates\single-product-reviews.php

    You have to incorporate all of your conditions and wrap the area that you want to for each of these conditions. For example to determine if the user is admin or not you can see this example code – https://stackoverflow.com/questions/44631312/how-to-get-particular-product-quantity-from-the-cart-page-in-the-woocommerce

    I do not have a direct example code for other conditions. This is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.

    You can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.

    If you need a paid solution, you can consider taking help from one of our partner’s website.

    Thank you 🙂

    Hi there,

    We’ve not heard back from you in a while, so I’m marking this thread as resolved.

    Hopefully, you were able to find a solution to your problem! If you have further questions, please feel free to open a new topic.

    Thank you 🙂

    Thread Starter beng56

    (@beng56)

    Hi,

    Thanks for your answer. I was just hoping to get lucky with other help but I guess it is a complicated topic I was addressing. I’ll see what I can do. I might simply hide every review on front end and only keep review info on backend. This topic might be easier to address.

    Thanks again for your help !

    Best,

    Benoit

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

The topic ‘WooCommerce review special behavior’ is closed to new replies.