woocommerce_customer_get_total_spent_query, $sql, $customer
woocommerce_customer_get_total_spent_query, $sql, $customer
Appears in: woocommerce.11.0.0
Hook Type: filter
Displaying hooks found in version: woocommerce.11.0.0apply_filters('woocommerce_customer_get_total_spent_query, $sql, $customer') is found 1 times:
- /includes/data-stores/class-wc-customer-data-store.php line 563
* @param string $sql The SQL query to use. * @param WC_Customer $customer The customer to get the total spent for. * @return string The actual SQL query to use. */ $sql = apply_filters( 'woocommerce_customer_get_total_spent_query', $sql, $customer ); $spent = $wpdb->get_var( $sql ); //phpcs:enable WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.PreparedSQL.InterpolatedNotPrepared if ( ! $spent ) { $spent = 0;