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

Return the number of orders this customer has.

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

add_filter( 'woocommerce_customer_get_order_count', 'wp_kama_woocommerce_customer_get_order_count_filter' );

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

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

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

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

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

WC_Customer_Data_Store::get_order_count()
woocommerce_customer_get_order_count
woocommerce/includes/data-stores/class-wc-customer-data-store.php 406-410
$count = apply_filters(
	'woocommerce_customer_get_order_count',
	get_user_meta( $customer->get_id(), '_order_count', true ),
	$customer
);

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

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