woocommerce_analytics_customer_roles
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 | Введена. |
Где вызывается хук
woocommerce_analytics_customer_roles
woocommerce/src/Admin/API/Reports/Customers/DataStore.php 850
$customer_roles = (array) apply_filters( 'woocommerce_analytics_customer_roles', array( 'customer' ) );