Created
September 27, 2017 19:05
-
-
Save sfgarza/519e7d49a1bd4eb67f485446bc4cef47 to your computer and use it in GitHub Desktop.
Activate plugin using code (in another plugin)
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
<?php | |
$result = activate_plugin( 'jetpack/jetpack.php' ); | |
if ( is_wp_error( $result ) ) { | |
error_log( 'Couldnt activate plugin'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment