woocommerce_customer_get_total_spent хук-фильтрWC 3.0.0

Return how much money this customer has spent.

Использование

add_filter( 'woocommerce_customer_get_total_spent', 'wp_kama_woocommerce_customer_get_total_spent_filter' );

/**
 * Function for `woocommerce_customer_get_total_spent` filter-hook.
 * 
 * @param  $customer 
 *
 * @return 
 */
function wp_kama_woocommerce_customer_get_total_spent_filter( $customer ){

	// filter...
	return $customer;
}
$customer
-

Список изменений

С версии 3.0.0 Введена.

Где вызывается хук

WC_Customer_Data_Store::get_total_spent()
woocommerce_customer_get_total_spent
woocommerce/includes/data-stores/class-wc-customer-data-store.php 453-457
$spent = apply_filters(
	'woocommerce_customer_get_total_spent',
	get_user_meta( $customer->get_id(), '_money_spent', true ),
	$customer
);

Где используется хук в WooCommerce

Использование не найдено.