PHPCS ignore only what is necessary
This commit is contained in:
parent
096e92554b
commit
8388325985
|
@ -1097,7 +1097,7 @@ class WC_Product_Data_Store_CPT extends WC_Data_Store_WP implements WC_Object_Da
|
||||||
|
|
||||||
$query .= ' AND meta_key IN ( "' . implode( '","', array_map( 'esc_sql', $meta_attribute_names ) ) . '" );';
|
$query .= ' AND meta_key IN ( "' . implode( '","', array_map( 'esc_sql', $meta_attribute_names ) ) . '" );';
|
||||||
|
|
||||||
$attributes = $wpdb->get_results( $query ); // phpcs:ignore
|
$attributes = $wpdb->get_results( $query ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
|
||||||
|
|
||||||
if ( ! $attributes ) {
|
if ( ! $attributes ) {
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1106,7 +1106,7 @@ class WC_Product_Data_Store_CPT extends WC_Data_Store_WP implements WC_Object_Da
|
||||||
$sorted_meta = array();
|
$sorted_meta = array();
|
||||||
|
|
||||||
foreach ( $attributes as $m ) {
|
foreach ( $attributes as $m ) {
|
||||||
$sorted_meta[ $m->post_id ][ $m->meta_key ] = $m->meta_value; // phpcs:ignore
|
$sorted_meta[ $m->post_id ][ $m->meta_key ] = $m->meta_value; // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue