Add a notice when the min php and wp version is not met - #86
Merged
Conversation
alecgeatches
approved these changes
Sep 13, 2024
alecgeatches
left a comment
Contributor
There was a problem hiding this comment.
Tested this change, it works! I also wanted to see what would happen if we used an old version of PHP or WordPress and tried to activate the plugin. Those scenarios look like this, where the plugin can't even be activated:
On PHP 7.4:
On WordPress 5.9.10:
The scenario this PR does work for is when we change the requirements for an already activated plugin. Below, I activated our plugin on a site with PHP 8.0, then updated the plugin's minimum PHP version to 8.2. With the plugin activated, this showed properly in the admin header:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
This is the same PR as this.
It enforces the minimum PHP and WP version that we support.