Skip to content

Conversation

@ObliviousHarmony
Copy link
Contributor

All Submissions:

Changes proposed in this Pull Request:

With the increased cadence of releases it becomes necessary that we address the WC tested up to header's usefulness. It isn't practical to require everyone to update their extensions every month, especially given that we are only doing backwards compatible minor releases. The only case I can think of where we might want to check the minor version is if the Stable tag on Core is downgraded, but due to the naming of the header, this doesn't make any sense.

I considered making this a wildcard of some kind but I think most would bind to a full major version anyway and so this isn't worth the time to add it. As an aside, the tests in plugin-updates.php seem to indicate that a header of WC tested up to: 4 would apply to the entire major version cycle, so wildcards already exist!

Closes #26248

How to test the changes in this Pull Request:

  1. Add this dummy plugin to your test site:
<?php
/**
 * Plugin Name: Version Test Plugin
 * Version: 1.0.0
 * Requires at least: 5.2
 * Requires PHP: 7.0
 *
 * WC tested up to: 4.1
 */
  1. Change the version in the woocommerce.php header to 4.0.0 and the version string in includes/class-woocommerce.php to 4.0.0. Without the PR there is a notice for "Version Test Plugin" under the WooCommerce Update on the plugins page. With the PR, the notice does not appear.
  2. Change the version in the WooCommerce files to 3.9.0. Also change the tested header in the plugin you created above to 3.9.0 as well. Both with and without the PR the plugin update will list the notice for the plugin as a major update.

As a bonus, try doing all of the above without this PR but the tested version as a major only. WC tested up to: 3 when looking at the major update and WC tested up to: 4 when looking at the minor update. We've always supported wildcards 😄

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully run tests with your changes locally?

Changelog entry

Dev - Adjusted the WC tested up to check to only apply to major versions.

With the increased cadence of releases it becomes necessary that we address the `WC tested up to` header's usefulness. It isn't practical to require everyone to update their extensions every month, especially given that we are only doing backwards compatible minor releases. The only case I can think of where we might want to check the minor version is if the Stable tag on Core is downgraded, but due to the naming of the header, this doesn't make any sense.

I considered making this a wildcard of some kind but I think most would bind to a full major version anyway and so this isn't worth the time to add it. As an aside, the tests in `plugin-updates.php` seem to indicate that a header of `WC tested up to: 4` would apply to the entire major version cycle, so wildcards already exist!
Copy link
Contributor

@rrennick rrennick left a comment

Choose a reason for hiding this comment

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

@ObliviousHarmony Nice to see a fix that is all red. Works great.

@peterfabian peterfabian merged commit 0c96b14 into master Jun 15, 2020
@peterfabian peterfabian deleted the fix/26248 branch June 15, 2020 19:40
@woocommercebot woocommercebot added release: add changelog Mark all PRs that have not had their changelog entries added. [auto] release: add testing instructions PRs that have not had testing instructions added to the wiki. [auto] labels Jun 15, 2020
@peterfabian peterfabian added release: highlight Issues that have a high user impact and need to be discussed/paid attention to. and removed release: add testing instructions PRs that have not had testing instructions added to the wiki. [auto] labels Jun 15, 2020
@peterfabian
Copy link
Contributor

Marking as high impact so that we don't forget to mention it in the beta post.

@peterfabian peterfabian removed the release: add changelog Mark all PRs that have not had their changelog entries added. [auto] label Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: highlight Issues that have a high user impact and need to be discussed/paid attention to.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change WooCommerce untested extension checks to use major versions

5 participants