Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

By default in woocommerce when a user wants to add a review of a product, they click 'add a review' and this opens up a pop-up lightbox. I want to disable this part and just display the review form. Anybody has any ideas?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Here's a hack you can use.

Update: As Andrew Bartel mentioned below. It's best to copy the template files into your theme so that they override the default woo commerce template files.

In your woocommerce plugin folder, look for a file called product-reviews.php

woocommerce/templates/single-product-reviews.php

Look for a line that says

<div id="review_form_wrapper">

Either remove the class review_form_wrapper, or add a 1 in front of it. That will make the hidden form visible.

Next you will want to remove the other buttons that says ADD REVIEW (triggers lightbox), because you will already have the SUBMIT REVIEW button at the end.

You will want to modify these lines to your needs:

<a href="#review_form" class="inline show_review_form">submit yours</a>

<a href="#review_form" class="inline show_review_form button" title="' . __( 'Add Your Review', 'woocommerce' ) . '">' . __( 'Add Review', 'woocommerce' ) . '</a>

You could either remove the lines above, or you could just add a display:none to each paragraph element to hide the whole thing

 style="display:none"
share|improve this answer
    
Am I not supposed to answer plugin questions? Why was my answer down voted? –  gdaniel Apr 29 '13 at 18:29
    
Looks good to me. Thanks dude. –  Keith Donegan Apr 29 '13 at 19:47
    
I down voted because you're committing (basically) the same sin as hacking core. I know you put a caveat at the top of the answer but did you investigate an alternate solution? –  Andrew Bartel Apr 29 '13 at 21:46
    
My only other solution would be to change those lines with javascript. Something that would run after the page loads. But this would also be a temporary solution since those lines can chance with any update. What's a better solution? –  gdaniel Apr 30 '13 at 14:25
    
@Andrew Bartel What solution do you have? It's not hacking the core, these are template files are ok to modify. –  Keith Donegan May 1 '13 at 10:43
show 5 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.