Skip to content
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

Update shows when key is invalid #20

Open
jamesckemp opened this issue Aug 3, 2023 · 0 comments
Open

Update shows when key is invalid #20

jamesckemp opened this issue Aug 3, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@jamesckemp
Copy link
Contributor

Steps to reproduce:

  1. On your test site, install and activate the latest version (for example, 1.2.0)
  2. On PUE, the latest release should be less than your test version (for example, 1.1.0)
  3. Enter an invalid license key on the test site.

The issue:

Code: https://github.com/stellarwp/uplink/blob/main/src/Uplink/Resources/Plugin.php#L72-L78

These lines of code add a "fake update" if the update response is expired or invalid. The reason this "fake update" is added, is so we can display a message on the plugins list about updating your license.

CleanShot 2023-08-03 at 16 41 16@2x

However, these lines are added outside of the version check, which means they are added even if no update is available.

Because these lines are added to the transient, WordPress sees that an update is available and shows it on the update-core.php admin page as available.

CleanShot 2023-08-03 at 16 40 21@2x

Potential solution:

These lines should be added inside the version check conditional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant