Created
January 22, 2020 21:28
-
-
Save shaunkuschel/18718ce2fcb7fd6ceb2eb1c4db5aae6f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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