Skip to content

Commit

Permalink
Package protect-status: Fix Current_Plan::supports from busting cache…
Browse files Browse the repository at this point in the history
… on every call. (#41010)

* Fix Protect-status Current_Plan::supports() from breaking the cache.

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/12810732336

Upstream-Ref: Automattic/jetpack@147fd7e
  • Loading branch information
elliottprogrammer authored and matticbot committed Jan 16, 2025
1 parent 040b93a commit b23eb43
Show file tree
Hide file tree
Showing 7 changed files with 113 additions and 105 deletions.
8 changes: 8 additions & 0 deletions jetpack_vendor/automattic/jetpack-protect-status/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ 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.2-alpha] - unreleased

This is an alpha version! The changes listed here are not final.

### Fixed
- Protect-status package: Fix Current_Plan::supports() call from breaking cache on every call.

## [0.4.1] - 2024-12-23
### Fixed
- Fix PHP warnings caused by uninstalled extensions. [#40622]
Expand Down Expand Up @@ -63,6 +70,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Updated package dependencies. [#37894]

[0.4.2-alpha]: https://github.com/Automattic/jetpack-protect-status/compare/v0.4.1...v0.4.2-alpha
[0.4.1]: https://github.com/Automattic/jetpack-protect-status/compare/v0.4.0...v0.4.1
[0.4.0]: https://github.com/Automattic/jetpack-protect-status/compare/v0.3.1...v0.4.0
[0.3.1]: https://github.com/Automattic/jetpack-protect-status/compare/v0.3.0...v0.3.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public static function has_required_plan( $force_refresh = false ) {
$products = array_column( Current_Plan::get_products(), 'product_slug' );

// Check for a plan or product that enables scan.
$plan_supports_scan = Current_Plan::supports( 'scan', true );
$plan_supports_scan = Current_Plan::supports( 'scan', $force_refresh );
$has_scan_product = count( array_intersect( array( 'jetpack_scan', 'jetpack_scan_monthly' ), $products ) ) > 0;
$has_scan = $plan_supports_scan || $has_scan_product;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
class Status {

const PACKAGE_VERSION = '0.4.1';
const PACKAGE_VERSION = '0.4.2-alpha';
/**
* Name of the option where status is stored
*
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/i18n-map.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
),
'jetpack-protect-status' => array(
'path' => 'jetpack_vendor/automattic/jetpack-protect-status',
'ver' => '0.4.1',
'ver' => '0.4.2-alpha1737036877',
),
'jetpack-publicize-pkg' => array(
'path' => 'jetpack_vendor/automattic/jetpack-publicize',
Expand Down
Loading

0 comments on commit b23eb43

Please sign in to comment.