Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MatthieuScarset/648f6c0ad111a712829b to your computer and use it in GitHub Desktop.
Save MatthieuScarset/648f6c0ad111a712829b to your computer and use it in GitHub Desktop.
WordPress - Show plugin activation errors
function show_activation_error() {
update_option( 'plugin_error', ob_get_contents() );
$error = get_option( 'plugin_error' );
wp_die($error);
}
add_action( 'activated_plugin', 'show_activation_error' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment