updated plugin Jetpack Protect version 4.0.0

This commit is contained in:
2025-04-29 21:19:56 +00:00
committed by Gitium
parent eb9181b250
commit ebd40ef928
265 changed files with 11864 additions and 3987 deletions

View File

@ -5,6 +5,54 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [3.0.8] - 2025-03-21
### Changed
- Internal updates.
## [3.0.7] - 2025-03-12
### Changed
- Internal updates.
## [3.0.6] - 2025-03-05
### Changed
- Internal updates.
## [3.0.5] - 2025-02-24
### Changed
- Update dependencies.
## [3.0.4] - 2025-02-03
### Changed
- Internal updates.
## [3.0.3] - 2025-01-20
### Changed
- Code: Use function-style exit() and die() with a default status code of 0. [#41167]
## [3.0.2] - 2024-12-02
### Changed
- Exclude revoked licenses from results when filtering unattached licenses in `Licensing::get_user_licenses()`. Only unattached and valid licenses are now returned. [#40215]
## [3.0.1] - 2024-11-25
### Changed
- Updated dependencies. [#40286]
## [3.0.0] - 2024-11-14
### Removed
- General: Update minimum PHP version to 7.2. [#40147]
## [2.0.12] - 2024-11-04
### Added
- Enable test coverage. [#39961]
## [2.0.11] - 2024-10-29
### Changed
- Internal updates.
## [2.0.10] - 2024-09-23
### Changed
- Update dependencies.
## [2.0.9] - 2024-09-05
### Changed
- Update dependencies.
@ -288,6 +336,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Licensing: Add support for Jetpack licenses
[3.0.8]: https://github.com/Automattic/jetpack-licensing/compare/v3.0.7...v3.0.8
[3.0.7]: https://github.com/Automattic/jetpack-licensing/compare/v3.0.6...v3.0.7
[3.0.6]: https://github.com/Automattic/jetpack-licensing/compare/v3.0.5...v3.0.6
[3.0.5]: https://github.com/Automattic/jetpack-licensing/compare/v3.0.4...v3.0.5
[3.0.4]: https://github.com/Automattic/jetpack-licensing/compare/v3.0.3...v3.0.4
[3.0.3]: https://github.com/Automattic/jetpack-licensing/compare/v3.0.2...v3.0.3
[3.0.2]: https://github.com/Automattic/jetpack-licensing/compare/v3.0.1...v3.0.2
[3.0.1]: https://github.com/Automattic/jetpack-licensing/compare/v3.0.0...v3.0.1
[3.0.0]: https://github.com/Automattic/jetpack-licensing/compare/v2.0.12...v3.0.0
[2.0.12]: https://github.com/Automattic/jetpack-licensing/compare/v2.0.11...v2.0.12
[2.0.11]: https://github.com/Automattic/jetpack-licensing/compare/v2.0.10...v2.0.11
[2.0.10]: https://github.com/Automattic/jetpack-licensing/compare/v2.0.9...v2.0.10
[2.0.9]: https://github.com/Automattic/jetpack-licensing/compare/v2.0.8...v2.0.9
[2.0.8]: https://github.com/Automattic/jetpack-licensing/compare/v2.0.7...v2.0.8
[2.0.7]: https://github.com/Automattic/jetpack-licensing/compare/v2.0.6...v2.0.7

View File

@ -4,13 +4,14 @@
"type": "jetpack-library",
"license": "GPL-2.0-or-later",
"require": {
"php": ">=7.0",
"automattic/jetpack-connection": "^4.0.0"
"php": ">=7.2",
"automattic/jetpack-connection": "^6.7.7"
},
"require-dev": {
"automattic/wordbless": "@dev",
"yoast/phpunit-polyfills": "^1.1.1",
"automattic/jetpack-changelogger": "^4.2.6"
"automattic/jetpack-test-environment": "@dev",
"yoast/phpunit-polyfills": "^3.0.0",
"automattic/jetpack-changelogger": "^6.0.2",
"automattic/phpunit-select-config": "^1.0.1"
},
"suggest": {
"automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package."
@ -22,10 +23,11 @@
},
"scripts": {
"phpunit": [
"./vendor/phpunit/phpunit/phpunit --colors=always"
"phpunit-select-config phpunit.#.xml.dist --colors=always"
],
"test-coverage": [
"php -dpcov.directory=. ./vendor/bin/phpunit-select-config phpunit.#.xml.dist --coverage-php \"$COVERAGE_DIR/php.cov\""
],
"post-install-cmd": "WorDBless\\Composer\\InstallDropin::copy",
"post-update-cmd": "WorDBless\\Composer\\InstallDropin::copy",
"test-php": [
"@composer phpunit"
]
@ -40,7 +42,7 @@
"link-template": "https://github.com/Automattic/jetpack-licensing/compare/v${old}...v${new}"
},
"branch-alias": {
"dev-trunk": "2.0.x-dev"
"dev-trunk": "3.0.x-dev"
}
},
"config": {

View File

@ -287,7 +287,7 @@ class Licensing {
/**
* Load current user's licenses.
*
* @param bool $unattached_only Only return unattached licenses.
* @param bool $unattached_only Only return unattached and not revoked licenses.
*
* @return array
*/
@ -304,7 +304,7 @@ class Licensing {
$items = array_filter(
$items,
static function ( $item ) {
return $item->attached_at === null;
return $item->attached_at === null && $item->revoked_at === null;
}
);
}
@ -353,7 +353,7 @@ class Licensing {
&& apply_filters( 'jetpack_connection_user_has_license', false, $licenses, $plugin_slug )
) {
wp_safe_redirect( '/wp-admin/admin.php?page=my-jetpack#/add-license' );
exit;
exit( 0 );
}
}
}