woocommerce_customer_get_total_spent_query

woocommerce_customer_get_total_spent_query

Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_customer_get_total_spent_query') is found 1 times:

  • /includes/data-stores/class-wc-customer-data-store.php line 493
    			 * @param string The SQL query to use.
    			 * @param WC_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 );
    			//phpcs:enable WooCommerce.Commenting.CommentHooks.MissingSinceComment
    
    			$spent = $wpdb->get_var( $sql );
    			//phpcs:enable WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
    
    			if ( ! $spent ) {