woocommerce_analytics_customer_roles хук-фильтрWC 4.0.0

Filter the customer roles, used to check if the user is a customer.

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

add_filter( 'woocommerce_analytics_customer_roles', 'wp_kama_woocommerce_analytics_customer_roles_filter' );

/**
 * Function for `woocommerce_analytics_customer_roles` filter-hook.
 * 
 * @param array $array List of customer roles.
 *
 * @return array
 */
function wp_kama_woocommerce_analytics_customer_roles_filter( $array ){

	// filter...
	return $array;
}
$array(массив)
List of customer roles.

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

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

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

DataStore::is_valid_customer()
woocommerce_analytics_customer_roles
woocommerce/src/Admin/API/Reports/Customers/DataStore.php 850
$customer_roles = (array) apply_filters( 'woocommerce_analytics_customer_roles', array( 'customer' ) );

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

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