WordPress at Your Fingertips
filter is not described

woocommerce_customer_get_total_spent_query filter-hook . WC 1.0

phpcs:disable WordPress.DB.PreparedSQL.NotPrepared

Usage

add_filter( 'woocommerce_customer_get_total_spent_query', 'filter_function_name_3005', 10, 2 );
function filter_function_name_3005( $string, $customer ){
	// filter...

	return $string;
}
$string
-
$customer
-

Where the hook is called

WC_Customer_Data_Store::get_total_spent()
woocommerce_customer_get_total_spent_query
woocommerce/includes/data-stores/class-wc-customer-data-store.php 416-428
apply_filters(
	'woocommerce_customer_get_total_spent_query',
	"SELECT SUM(meta2.meta_value)
	FROM $wpdb->posts as posts
	LEFT JOIN {$wpdb->postmeta} AS meta ON posts.ID = meta.post_id
	LEFT JOIN {$wpdb->postmeta} AS meta2 ON posts.ID = meta2.post_id
	WHERE   meta.meta_key       = '_customer_user'
	AND     meta.meta_value     = '" . esc_sql( $customer->get_id() ) . "'
	AND     posts.post_type     = 'shop_order'
	AND     posts.post_status   IN ( 'wc-" . implode( "','wc-", $statuses ) . "' )
	AND     meta2.meta_key      = '_order_total'",
	$customer
)

Where in WP core the hook is used WooCommerce

Usage not found.