Update WPCS sniff name from WordPress.WP.PreparedSQL.NotPrepared to WordPress.DB.PreparedSQL.NotPrepared

The name of the sniff changed in WPCS 1.0
This commit is contained in:
Rodrigo Primo 2018-11-23 15:29:53 -02:00
parent eb76ac9f65
commit 8d5b428a29
1 changed files with 2 additions and 2 deletions

View File

@ -876,7 +876,7 @@ class WC_Product_Data_Store_CPT extends WC_Data_Store_WP implements WC_Object_Da
}
return $wpdb->get_results(
// phpcs:disable WordPress.WP.PreparedSQL.NotPrepared
// phpcs:disable WordPress.DB.PreparedSQL.NotPrepared
$wpdb->prepare(
"SELECT post.ID as id, post.post_parent as parent_id FROM `$wpdb->posts` AS post
LEFT JOIN `$wpdb->postmeta` AS meta ON post.ID = meta.post_id
@ -1155,7 +1155,7 @@ class WC_Product_Data_Store_CPT extends WC_Data_Store_WP implements WC_Object_Da
$related_product_query = (array) apply_filters( 'woocommerce_product_related_posts_query', $this->get_related_products_query( $cats_array, $tags_array, $exclude_ids, $limit + 10 ), $product_id, $args );
// phpcs:ignore WordPress.VIP.DirectDatabaseQuery.DirectQuery, WordPress.WP.PreparedSQL.NotPrepared
// phpcs:ignore WordPress.VIP.DirectDatabaseQuery.DirectQuery, WordPress.DB.PreparedSQL.NotPrepared
return $wpdb->get_col( implode( ' ', $related_product_query ) );
}