WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WC_Site_Tracking::add_tracking_function() public WC 1.0

Adds the tracking function to the admin footer.

Это метод класса: WC_Site_Tracking{}

Хуков нет.

Возвращает

Null. Ничего.

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

$result = WC_Site_Tracking::add_tracking_function();

Код WC_Site_Tracking::add_tracking_function() WC 4.5.2

woocommerce/includes/tracks/class-wc-site-tracking.php
<?php
public static function add_tracking_function() {
	?>
	<!-- WooCommerce Tracks -->
	<script type="text/javascript">
		window.wcTracks = window.wcTracks || {};
		window.wcTracks.isEnabled = <?php echo self::is_tracking_enabled() ? 'true' : 'false'; ?>;
		window.wcTracks.recordEvent = function( name, properties ) {
			if ( ! window.wcTracks.isEnabled ) {
				return;
			}

			var eventName = '<?php echo esc_attr( WC_Tracks::PREFIX ); ?>' + name;
			var eventProperties = properties || {};
			eventProperties.url = '<?php echo esc_html( home_url() ); ?>'
			eventProperties.products_count = '<?php echo intval( WC_Tracks::get_products_count() ); ?>';
			if ( window.wp && window.wp.hooks && window.wp.hooks.applyFilters ) {
				eventProperties = window.wp.hooks.applyFilters( 'woocommerce_tracks_client_event_properties', eventProperties, eventName );
				delete( eventProperties._ui );
				delete( eventProperties._ut );
			}
			window._tkq = window._tkq || [];
			window._tkq.push( [ 'recordEvent', eventName, eventProperties ] );
		}
	</script>
	<?php
}