Skip to content

Add a notice when the min php and wp version is not met - #86

Merged
alecgeatches merged 1 commit into
trunkfrom
add/min-wp-php-notice
Sep 13, 2024
Merged

Add a notice when the min php and wp version is not met#86
alecgeatches merged 1 commit into
trunkfrom
add/min-wp-php-notice

Conversation

@ingeniumed

Copy link
Copy Markdown
Contributor

Description

This is the same PR as this.

It enforces the minimum PHP and WP version that we support.

@alecgeatches alecgeatches left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

activate-php-7 4

On WordPress 5.9.10:

activate-wp-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:

requirements-banner

@alecgeatches
alecgeatches merged commit 03afe98 into trunk Sep 13, 2024
@alecgeatches
alecgeatches deleted the add/min-wp-php-notice branch September 13, 2024 18:27
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.

2 participants