Merge pull request #28151 from woocommerce/add/requires-php-support

Add requires_php support
This commit is contained in:
Rodrigo Primo 2020-11-17 10:39:12 -03:00 committed by GitHub
commit 0e319f3293
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -57,6 +57,10 @@ class WC_Helper_Updater {
'upgrade_notice' => $data['upgrade_notice'],
);
if ( isset( $data['requires_php'] ) ) {
$item['requires_php'] = $data['requires_php'];
}
// We don't want to deliver a valid upgrade package when their subscription has expired.
// To avoid the generic "no_package" error that empty strings give, we will store an
// indication of expiration for the `upgrader_pre_download` filter to error on.