woocommerce_ga_disable_tracking filter-hookWC 4.9.0

Filter to disable Google Analytics tracking.

Usage

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.

Changelog

Since 4.9.0 Introduced.

Where the hook is called

GoogleAnalytics::enqueue_scripts()
woocommerce_ga_disable_tracking
woocommerce/src/Blocks/Domain/Services/GoogleAnalytics.php 67
if ( apply_filters( 'woocommerce_ga_disable_tracking', ! wc_string_to_bool( $settings['ga_event_tracking_enabled'] ) ) ) {

Where the hook is used in WooCommerce

Usage not found.