Created
July 4, 2018 12:23
-
-
Save patrickposner/6bf5aeee467909c1434aaf5f9f136fd6 to your computer and use it in GitHub Desktop.
deactivate gutenberg plugin conditional
This file contains hidden or 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
| /** | |
| * deactivate gutenberg and woocommerce products block plugins if activated | |
| */ | |
| add_action( 'admin_init', 'atomion_deactivate_gutenberg' ); | |
| function atomion_deactivate_gutenberg() { | |
| if ( is_plugin_active('gutenberg/gutenberg.php') ) { | |
| deactivate_plugins('gutenberg/gutenberg.php'); | |
| } | |
| if ( is_plugin_active('woo-gutenberg-products-block/woocommerce-gutenberg-products-block/.php') ) { | |
| deactivate_plugins('woo-gutenberg-products-block/woocommerce-gutenberg-products-block/.php'); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment