Last active
November 15, 2022 22:05
-
-
Save mehdi-eybak/99fe22e63d2a7480a2074859e527fffb to your computer and use it in GitHub Desktop.
Use the filter below to delete the information of the plugin installed in WordPress and the WordPress plugins page. Note that in the first value, put the folder and the main file of the plugin, and in the second value, only the main file of the plugin without adding the folder.
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
<?php | |
add_filter( 'all_plugins', function ( $plugins ) { | |
$shouldHide = ! array_key_exists( 'show_all', $_GET ); | |
if ( $shouldHide ) { | |
$hiddenPlugins = [ | |
'woocommerce-checkout-manager/woocommerce-checkout-manager.php', | |
'woocommerce-checkout-manager.php', | |
]; | |
foreach ( $hiddenPlugins as $hiddenPlugin ) { | |
unset( $plugins[ $hiddenPlugin ] ); | |
} | |
} | |
return $plugins; | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment