updated plugin Jetpack Protect version 2.2.0

This commit is contained in:
2024-06-27 12:10:57 +00:00
committed by Gitium
parent ec9d8a5834
commit 938cef2946
218 changed files with 7469 additions and 1864 deletions

View File

@ -5,6 +5,22 @@ 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).
## [0.4.7] - 2024-05-06
### Fixed
- Correctly reference `Store_Product_List` class in `Plans::get_plans()`. [#37201]
## [0.4.6] - 2024-04-25
### Changed
- Update dependencies.
## [0.4.5] - 2024-04-22
### Changed
- Internal updates.
## [0.4.4] - 2024-04-08
### Changed
- Internal updates.
## [0.4.3] - 2024-03-12
### Changed
- Internal updates.
@ -122,6 +138,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Deprecated
- Moved the options class into Connection. [#24095]
[0.4.7]: https://github.com/Automattic/jetpack-plans/compare/v0.4.6...v0.4.7
[0.4.6]: https://github.com/Automattic/jetpack-plans/compare/v0.4.5...v0.4.6
[0.4.5]: https://github.com/Automattic/jetpack-plans/compare/v0.4.4...v0.4.5
[0.4.4]: https://github.com/Automattic/jetpack-plans/compare/v0.4.3...v0.4.4
[0.4.3]: https://github.com/Automattic/jetpack-plans/compare/v0.4.2...v0.4.3
[0.4.2]: https://github.com/Automattic/jetpack-plans/compare/v0.4.1...v0.4.2
[0.4.1]: https://github.com/Automattic/jetpack-plans/compare/v0.4.0...v0.4.1

View File

@ -5,12 +5,12 @@
"license": "GPL-2.0-or-later",
"require": {
"php": ">=7.0",
"automattic/jetpack-connection": "^2.4.1"
"automattic/jetpack-connection": "^2.7.6"
},
"require-dev": {
"yoast/phpunit-polyfills": "1.1.0",
"automattic/jetpack-changelogger": "^4.1.1",
"automattic/jetpack-status": "^2.1.2",
"automattic/jetpack-changelogger": "^4.2.3",
"automattic/jetpack-status": "^3.0.2",
"automattic/wordbless": "@dev"
},
"suggest": {

View File

@ -11,6 +11,8 @@
namespace Automattic\Jetpack;
use Store_Product_List;
/**
* Fetch data about available Plans from WordPress.com
*/
@ -32,7 +34,7 @@ class Plans {
}
// We're on Jetpack, so it's safe to use this namespace.
$request = Automattic\Jetpack\Connection\Client::wpcom_json_api_request_as_user(
$request = \Automattic\Jetpack\Connection\Client::wpcom_json_api_request_as_user(
'/plans?_locale=' . get_user_locale(),
// We're using version 1.5 of the endpoint rather than the default version 2
// since the latter only returns Jetpack Plans, but we're also interested in
@ -41,7 +43,7 @@ class Plans {
array(
'method' => 'GET',
'headers' => array(
'X-Forwarded-For' => ( new Automattic\Jetpack\Status\Visitor() )->get_ip( true ),
'X-Forwarded-For' => ( new \Automattic\Jetpack\Status\Visitor() )->get_ip( true ),
),
),
null,