We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b66120a commit 85a4a8fCopy full SHA for 85a4a8f
plugin.php
@@ -13,9 +13,12 @@
13
require __DIR__ . '/vendor/autoload.php';
14
}
15
16
-global $wp_parser;
17
-$wp_parser = new WP_Parser\Plugin();
18
-$wp_parser->on_load();
+// Check the class exists, to avoid fatals when composer hasn't been run.
+if ( class_exists( 'WP_Parser\Plugin' ) ) {
+ global $wp_parser;
19
+ $wp_parser = new WP_Parser\Plugin();
20
+ $wp_parser->on_load();
21
+}
22
23
register_activation_hook( __FILE__, array( 'P2P_Storage', 'init' ) );
24
register_activation_hook( __FILE__, array( 'P2P_Storage', 'install' ) );
0 commit comments