Skip to content

Conversation

@jasonbahl
Copy link
Collaborator

What does this implement/fix? Explain your changes.

  • Only add plugin data to Appsero if the Appsero client is 1.2.0 or higher

Does this close any currently open issues?

closes #2597

@coveralls
Copy link

coveralls commented Nov 2, 2022

Coverage Status

Coverage remained the same at 82.193% when pulling bc71c1b on jasonbahl:bug/#2597-appsero-add_plugin_data-bug into 6338f30 on wp-graphql:develop.

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', '>=' ) ) {
Copy link
Collaborator

@justlevine justlevine Nov 2, 2022

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?

justlevine
justlevine previously approved these changes Nov 2, 2022
Copy link
Collaborator

@justlevine justlevine left a 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
@qlty-cloud-legacy
Copy link

Code Climate has analyzed commit bc71c1b and detected 0 issues on this pull request.

View more on Code Climate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plugin doesn´t activate after installation

3 participants