Skip to content

Instantly share code, notes, and snippets.

@MjHead
Created November 3, 2017 13:27
Show Gist options
  • Save MjHead/4f9da0bd1a3cf4a37864259430c2daf9 to your computer and use it in GitHub Desktop.
Save MjHead/4f9da0bd1a3cf4a37864259430c2daf9 to your computer and use it in GitHub Desktop.
add_filter( 'woocommerce_get_plugins_for_woocommerce', '_tm_clear_woo_plugins', 10, 2 );
function _tm_clear_woo_plugins( $woo_plugins, $all_plugins ) {
$allowed_plugins = array(
'tm-woocommerce-package/tm-woocommerce-package.php' => true,
'tm-woocommerce-quick-view/tm-woocommerce-quick-view.php' => true,
'tm-woocommerce-ajax-filters/tm-woocommerce-ajax-filters.php' => true,
'tm-woocommerce-compare-wishlist/tm-woocommerce-compare-wishlist.php' => true,
'woocommerce-currency-switcher/index.php' => true,
'woocommerce-social-media-share-buttons/index.php' => true,
);
return array_diff_key( $woo_plugins, $allowed_plugins );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment