Skip to content

Instantly share code, notes, and snippets.

@adrianduffell
Created July 24, 2024 08:29
Show Gist options
  • Save adrianduffell/779f67b53b12d75e8608b1bb1a758203 to your computer and use it in GitHub Desktop.
Save adrianduffell/779f67b53b12d75e8608b1bb1a758203 to your computer and use it in GitHub Desktop.
WooCommerce usage tracking opt-out
<?php
/*
* Plugin Name: WooCommerce usage tracking opt-out
* Author: Adrian Duffell
* Description: Automatically opts-out of usage tracking in WooCommerce. https://woocommerce.com/usage-tracking/
* Version: 1.0.0
*/
add_filter('pre_option_woocommerce_allow_tracking', 'opt_out_woocommerce_tracking');
function opt_out_woocommerce_tracking() {
return 'no';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment