Spacing in query

This commit is contained in:
Mike Jolley 2016-10-19 11:13:08 +01:00
parent d705f4ceff
commit 2a5a9faa61
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ class WC_Product_Grouped extends WC_Product {
*/ */
public function is_on_sale() { public function is_on_sale() {
global $wpdb; global $wpdb;
$on_sale = 1 === $wpdb->get_var( "SELECT 1 FROM $wpdb->postmeta WHERE meta_key='_sale_price' AND meta_value>0 AND post_id IN (" . implode( ',', array_map( 'esc_sql', $this->get_children() ) ) . ");" ); $on_sale = 1 === $wpdb->get_var( "SELECT 1 FROM $wpdb->postmeta WHERE meta_key = '_sale_price' AND meta_value > 0 AND post_id IN (" . implode( ',', array_map( 'esc_sql', $this->get_children() ) ) . ");" );
return apply_filters( 'woocommerce_product_is_on_sale', $on_sale, $this ); return apply_filters( 'woocommerce_product_is_on_sale', $on_sale, $this );
} }