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.

I am using WooCommerce and have 3000+ products. With WooCommerce, there is an option to enable/disable reviews for each product. The box looks like this on my edit product page:

snapshot

Unfortunately, the checkbox (highlighted in red) doesn't come checked by default. I have contacted WooCommerce about this and they told me that this box being checked depends on whether or not I have comments enabled in Settings > Discussion. However, comments are, and have always been enabled, yet none of my products have the reviews option checked by default.

This is a huge burden because this would potentially mean that I would have to browse through each of the 3000+ products and check off the box manually.

Is another way I can "mass check" these boxes for each of my products?

share|improve this question
    
There's a chance. It depends on how the option is implemented. If you know how the value is stored, it's possible to write a script to update each of your products so that the checkbox is enabled. –  marfarma Aug 29 '12 at 19:11

2 Answers 2

up vote 2 down vote accepted

If you have database access, and are familiar/comfortable with MySQL, you could write a simple update script on the product table, replacing all 'review_status' to be 'yes'.

I am not familiar with WooCommerce back end, but you will just need to find the proper table, column, and value, and it would be a 5-10 second long ordeal.

UPDATE [wp_woo_products_table] SET [product_status]='[enabled/yes]'

Ignore the square brackers [] in the line above, they simply mean placeholders for the proper values.

share|improve this answer
    
Thanks! This suggestion helped me do it another way. I downloaded the DB Manager plugin and ran this query: UPDATE wp_posts SET comment_status = "open" ; –  Desi Aug 29 '12 at 19:32
    
Glad to help. :) –  Eric Holmes Aug 30 '12 at 12:48
    
@Desi just make sure you only do that for products and not all post types, something like: UPDATE wp_posts SET comment_status = 'open' WHERE post_type = 'product'; –  Bainternet Sep 11 at 12:39

This can be done within Wordpress. Goto the Products tab. Select all the products displayed (tick box at the top). Then from the dropdown above choose Edit. This lets you bulk edit all the selected products.

Click Apply to see the available options. One of the options will be Comments. Change this to Allow and click Update. This will enable reviews on all the products.

Usually WP limits the posts-types to 20 per page and it can be laborious to go through dozens of pages doing the same bulk action. In this instance I suggest clicking on Screen Options (top right of screen). From here you can amend the no. of products per page. Change this to view all your products and bulk change them all in one go. It is advisable to change this back afterwards.

share|improve this answer

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.