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

fix: Update admin notice for minimum required WordPress version #3001

Merged
merged 3 commits into from
May 15, 2024

Conversation

gchtr
Copy link
Member

@gchtr gchtr commented May 15, 2024

Related:

Issue

In #2970, we update the minimum required WordPress version to 6.0.0. But we forgot a check done in the WordPress admin.

Solution

Update the check.

Impact

Better error messages.

Usage Changes

None.

Considerations

None.

Testing

No.

@gchtr gchtr added this to the 2.2.0 milestone May 15, 2024
@gchtr
Copy link
Member Author

gchtr commented May 15, 2024

The tests are failing because we test for the function to return true in https://github.com/timber/timber/blob/2.x/tests/test-timber-admin.php.

So I’m wondering, do we need that test? It doesn’t actually do a lot. If there’s a PHP error, it would show up in our tests. So I would just remove that test class.

@gchtr gchtr removed the request for review from jarednova May 15, 2024 08:48
src/Admin.php Outdated
$upgrade_url = \admin_url('update-core.php');
self::show_notice("<a href='https://github.com/timber/timber'>Timber 2.0</a> requires <strong>WordPress 5.3</strong> or greater, but you are running <strong>WordPress $wp_version</strong>. Please <a href='$upgrade_url'>upgrade WordPress</a> in order to use Timber 2.0.");

self::show_notice("<a href='https://github.com/timber/timber'>Timber 2.0</a> requires <strong>WordPress 5.3</strong> or greater, but you are running <strong>WordPress $wp_version</strong>. Please <a href='$upgrade_url'>update WordPress</a> in order to use Timber 2.0.");
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't it be 6.0?

@gchtr gchtr requested a review from nlemoine May 15, 2024 11:29
src/Admin.php Show resolved Hide resolved
@gchtr gchtr merged commit 66e92a5 into 2.x May 15, 2024
24 checks passed
@gchtr gchtr deleted the 2.x-minimum-requirements branch May 15, 2024 12:48
This was referenced May 15, 2024
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.

None yet

3 participants