Skip to content

Commit d54d4d0

Browse files
committed
- use get_plugin_data and the path to wp-graphql instead of trying to get it from the list of plugins.
1 parent 5275220 commit d54d4d0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Admin/Updates/Updates.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,12 @@ public function register_assets(): void {
136136
* Disables plugins that don't meet the minimum `Requires WPGraphQL` version.
137137
*/
138138
public function disable_incompatible_plugins(): void {
139+
140+
// Get the plugin data.
141+
$plugin_data = get_plugin_data( WPGRAPHQL_PLUGIN_DIR . '/wp-graphql.php' );
142+
139143
// Initialize the Update Checker.
140-
$update_checker = new UpdateChecker( (object) get_plugins()['wp-graphql/wp-graphql.php'] );
144+
$update_checker = new UpdateChecker( (object) $plugin_data );
141145

142146
// Get the incompatible plugins.
143147
$incompatible_plugins = $update_checker->get_incompatible_plugins( WPGRAPHQL_VERSION, true );

0 commit comments

Comments
 (0)