woocommerce_analytics_customer_roles filter-hookWC 4.0.0

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

Usage

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(array)
List of customer roles.

Changelog

Since 4.0.0 Introduced.

Where the hook is called

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' ) );

Where the hook is used in WooCommerce

Usage not found.