fix: Error in update checker when WPGraphQL is active as an mu-plugin#3283
Conversation
… get it from the list of plugins.
|
Code Climate has analyzed commit d54d4d0 and detected 0 issues on this pull request. View more on Code Climate. |
I should have time to look this over this weekend, but probably won't have time before. Just glancing at the diff, and it's a smart solve. |
|
I've done some tests and everything seems to work as expected with this change and all of the wpunit tests pass with this change as well. One thing to note is that much of the admin notice UI work won't show anywhere when WPGraphQL is an mu-plugin due to the fact that:
|
Curious how woo handles it 🧐 |
What does this implement/fix? Explain your changes.
This fixes a bug where wp-graphql can't be found in the array of plugins when WPGraphQL is active as an mu-plugin.
Does this close any currently open issues?
Closes #3282
Any relevant logs, error output, GraphiQL screenshots, etc?
BEFORE
Error shown when WPGraphQL is active as an MU plugin
AFTER
No error:
Any other comments?
I haven't done thorough testing yet to ensure this change doesn't accidentally cause unpredicted side-effects. The get_plugins function that we were using does use get_plugin_data under the hood, so I think this more direct call to get_plugin_data should do what we need with the added flexibility of working when WPGraphQL is a "regular" or "mu" plugin.
Would love @justlevine to confirm this change doesn't cause any unintended side effects.