-
Notifications
You must be signed in to change notification settings - Fork 466
fix: Only use Appsero add_plugin_data if the Appsero Client is v1.2.1 or higher #2599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Only use Appsero add_plugin_data if the Appsero Client is v1.2.1 or higher #2599
Conversation
wp-graphql.php
Outdated
| // @phpstan-ignore-next-line | ||
| $client->insights()->add_plugin_data()->init(); | ||
| // If the Appsero client is version 1.2.0 or higher, add plugin data | ||
| if (version_compare( $client->version, '1.2.1', '>=' ) ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be more future proof if we did a class/method_exists() instead of version_compare(), JIC they remove/rename the method in a later release - and even if it is more futureproof, do we care?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good (sans the spacing issue CI picked up), and testing manually with WP Maximum Upload File Size, it works as expected.
Left some CodeQuality suggestions that are probably just my penchant for premature optimization and can be ignored.
…raphql#2597-appsero-add_plugin_data-bug # Conflicts: # wp-graphql.php
|
Code Climate has analyzed commit bc71c1b and detected 0 issues on this pull request. View more on Code Climate. |
What does this implement/fix? Explain your changes.
Does this close any currently open issues?
closes #2597