woocommerce_tracks_event_properties хук-фильтрWC 4.1.0

Allow event props to be filtered to enable adding site-wide props.

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

add_filter( 'woocommerce_tracks_event_properties', 'wp_kama_woocommerce_tracks_event_properties_filter', 10, 2 );

/**
 * Function for `woocommerce_tracks_event_properties` filter-hook.
 * 
 * @param  $event_properties 
 * @param  $event_name       
 *
 * @return 
 */
function wp_kama_woocommerce_tracks_event_properties_filter( $event_properties, $event_name ){

	// filter...
	return $event_properties;
}
$event_properties
-
$event_name
-

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

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

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

WC_Tracks::get_properties()
woocommerce_tracks_event_properties
WC_Site_Tracking::add_tracking_function()
woocommerce_tracks_event_properties
woocommerce/includes/tracks/class-wc-tracks.php 115
$properties = apply_filters( 'woocommerce_tracks_event_properties', $event_properties, $event_name );
woocommerce/includes/tracks/class-wc-site-tracking.php 77
$filtered_properties = apply_filters( 'woocommerce_tracks_event_properties', $client_tracking_properties, false );

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

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