$args = array(
'post_type' => 'product',
'posts_per_page' => -1
);
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
global $product;
$product->set_reviews_allowed( 'yes' );
$product->save();
endwhile;
wp_reset_query();
No comments:
Post a Comment