Skip to content

Commit 3543b44

Browse files
committed
remove unsued sql
1 parent 09add22 commit 3543b44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

includes/Admin/Forms/Post/Templates/Post_Form_Template_WooCommerce.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ public function update_reviews( $post_id ) {
306306
$reviews = get_post_meta( $post_id, 'product_reviews', true );
307307
$status = ! empty( $reviews ) ? 'open' : 'closed';
308308
// wp_update_post( array( 'ID' => $post_id, 'comment_status' => $status ) );
309-
$comment_sql = "UPDATE {$wpdb->prefix}posts SET comment_status='{$status}' WHERE ID={$post_id} AND post_status='publish' AND post_type='product'";
309+
//$comment_sql = "UPDATE {$wpdb->prefix}posts SET comment_status='{$status}' WHERE ID={$post_id} AND post_status='publish' AND post_type='product'";
310310
$wpdb->get_results( $wpdb->prepare( "UPDATE {$wpdb->prefix}posts SET comment_status=%s WHERE ID=%d AND post_status='publish' AND post_type='product'", $status, $post_id ) );
311311
}
312312

0 commit comments

Comments
 (0)