Fixed coding standards

This commit is contained in:
Claudio Sanches 2019-12-04 15:53:48 -03:00
parent b76bebab8d
commit f07ed76e43
1 changed files with 8 additions and 2 deletions

View File

@ -1450,7 +1450,8 @@ function wc_update_product_lookup_tables_column( $column ) {
} else {
$meta_key = '_' . $column;
}
$column = esc_sql( $column );
$column = esc_sql( $column );
// phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
$wpdb->query(
$wpdb->prepare(
"
@ -1463,11 +1464,13 @@ function wc_update_product_lookup_tables_column( $column ) {
$meta_key
)
);
// phpcs:enable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
break;
case 'downloadable':
case 'virtual':
$column = esc_sql( $column );
$column = esc_sql( $column );
$meta_key = '_' . $column;
// phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
$wpdb->query(
$wpdb->prepare(
"
@ -1480,11 +1483,13 @@ function wc_update_product_lookup_tables_column( $column ) {
$meta_key
)
);
// phpcs:enable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
break;
case 'onsale':
$column = esc_sql( $column );
$decimals = absint( wc_get_price_decimals() );
// phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
$wpdb->query(
$wpdb->prepare(
"
@ -1503,6 +1508,7 @@ function wc_update_product_lookup_tables_column( $column ) {
$decimals
)
);
// phpcs:enable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
delete_option( 'woocommerce_product_lookup_table_is_generating' ); // Complete.
break;