woocommerce_ga_disable_tracking

woocommerce_ga_disable_tracking

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

apply_filters('woocommerce_ga_disable_tracking') is found 1 times:

  • /src/Blocks/Domain/Services/GoogleAnalytics.php line 67
    		 * @since 4.9.0
    		 *
    		 * @param boolean $disable_tracking If true, tracking will be disabled.
    		 */
    		if ( apply_filters( 'woocommerce_ga_disable_tracking', ! wc_string_to_bool( $settings['ga_event_tracking_enabled'] ) ) ) {
    			return;
    		}
    
    		if ( ! wp_script_is( 'google-tag-manager', 'registered' ) ) {
    			// Using an array with strategies as the final argument to wp_register_script was introduced in WP 6.3.
    			// WC requires at least 6.3 at the point of adding this, so it's safe to leave in without version checks.