Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timmyc/5f994cfb4986823cd335bfaa38812b10 to your computer and use it in GitHub Desktop.
Save timmyc/5f994cfb4986823cd335bfaa38812b10 to your computer and use it in GitHub Desktop.
remove WooCommerce Analytics from Jetpack
<?php
/**
* @package Disable_Jetpack_WooCommerce_Analytics
* @version 1.0.0
*/
/*
Plugin Name: Disable Jetpack WooCommerce Analytics
Plugin URI: https://github.com/Automattic/jetpack
Description: This plugin disables the Jetpack WooCommerce Analytics module
Version: 1.0.0
Author URI: http://automattic.com
*/
add_filter( 'jetpack_tools_to_include', function( $tools ) {
$index = array_search( 'woocommerce-analytics/wp-woocommerce-analytics.php', $tools );
if ( $index ) {
unset( $tools[$index] );
}
return $tools;
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment