Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • 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