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 shaunkuschel/18718ce2fcb7fd6ceb2eb1c4db5aae6f to your computer and use it in GitHub Desktop.
Save shaunkuschel/18718ce2fcb7fd6ceb2eb1c4db5aae6f to your computer and use it in GitHub Desktop.
/**
* Never load Jetpack's WooCommerce Analytics tool.
*
* @param array $tools Array of additional tools loaded by Jetpack without any UI to turn them off.
*/
function jetpackcom_no_woo_analytics( $tools ) {
$index = array_search( 'woocommerce-analytics/wp-woocommerce-analytics.php', $tools );
if ( false !== $index ) {
unset( $tools[ $index ] );
}
return $tools;
}
add_filter( 'jetpack_tools_to_include', 'jetpackcom_no_woo_analytics' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment