woocommerce_ga_disable_tracking хук-фильтрWC 1.0

Filter to disable Google Analytics tracking.

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

add_filter( 'woocommerce_ga_disable_tracking', 'wp_kama_woocommerce_ga_disable_tracking_filter' );

/**
 * Function for `woocommerce_ga_disable_tracking` filter-hook.
 * 
 * @param boolean $disable_tracking If true, tracking will be disabled.
 *
 * @return boolean
 */
function wp_kama_woocommerce_ga_disable_tracking_filter( $disable_tracking ){

	// filter...
	return $disable_tracking;
}
$disable_tracking(true|false)
If true, tracking will be disabled.

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

GoogleAnalytics::enqueue_scripts()
woocommerce_ga_disable_tracking
woocommerce/packages/woocommerce-blocks/src/Domain/Services/GoogleAnalytics.php 62
if ( ! stristr( $settings['ga_id'], 'G-' ) || apply_filters( 'woocommerce_ga_disable_tracking', ! wc_string_to_bool( $settings['ga_event_tracking_enabled'] ) ) ) {

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

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