Skip to content

Commit

Permalink
MyJetpack: add has_required_plan for VideoPress product class (#33410)
Browse files Browse the repository at this point in the history
* add has_required_plan for VideoPress product class

* changelog

* use Current_Plan class to get supported feature

* fix versions with changelogger

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/6550843415
  • Loading branch information
CGastrell authored and matticbot committed Oct 17, 2023
1 parent b5e0693 commit 9356418
Show file tree
Hide file tree
Showing 10 changed files with 104 additions and 85 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"automattic/jetpack-config": "^1.15.4",
"automattic/jetpack-connection": "^1.58.1",
"automattic/jetpack-identity-crisis": "^0.11.0-alpha",
"automattic/jetpack-my-jetpack": "^3.8.2",
"automattic/jetpack-my-jetpack": "^3.9.0-alpha",
"automattic/jetpack-search": "^0.39.2",
"automattic/jetpack-stats": "^0.6.6-alpha",
"automattic/jetpack-status": "^1.18.5",
Expand Down
8 changes: 8 additions & 0 deletions jetpack_vendor/automattic/jetpack-my-jetpack/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).

## [3.9.0-alpha] - unreleased

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

### Added
- Add has_required_plan method for VideoPress product class, check plan purchase exists for site

## [3.8.2] - 2023-10-16
### Changed
- Updated package dependencies. [#33429, #33584]
Expand Down Expand Up @@ -1057,6 +1064,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Created package

[3.9.0-alpha]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.8.2...3.9.0-alpha
[3.8.2]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.8.1...3.8.2
[3.8.1]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.8.0...3.8.1
[3.8.0]: https://github.com/Automattic/jetpack-my-jetpack/compare/3.7.0...3.8.0
Expand Down
2 changes: 1 addition & 1 deletion jetpack_vendor/automattic/jetpack-my-jetpack/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"link-template": "https://github.com/Automattic/jetpack-my-jetpack/compare/${old}...${new}"
},
"branch-alias": {
"dev-trunk": "3.8.x-dev"
"dev-trunk": "3.9.x-dev"
},
"version-constants": {
"::PACKAGE_VERSION": "src/class-initializer.php"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Initializer {
*
* @var string
*/
const PACKAGE_VERSION = '3.8.2';
const PACKAGE_VERSION = '3.9.0-alpha';

/**
* HTML container ID for the IDC screen on My Jetpack page.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

namespace Automattic\Jetpack\My_Jetpack\Products;

use Automattic\Jetpack\Current_Plan;
use Automattic\Jetpack\My_Jetpack\Hybrid_Product;
use Automattic\Jetpack\My_Jetpack\Wpcom_Products;

Expand Down Expand Up @@ -156,4 +157,14 @@ public static function get_manage_url() {
return admin_url( 'admin.php?page=jetpack#/settings?term=videopress' );
}
}

/**
* Checks whether the current plan (or purchases) of the site already supports the product
*
* @return boolean
*/
public static function has_required_plan() {
// using second argument `true` to force fetching from wpcom
return Current_Plan::supports( 'videopress-1tb-storage', true );
}
}
2 changes: 1 addition & 1 deletion jetpack_vendor/automattic/jetpack-search/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"automattic/jetpack-constants": "^1.6.23",
"automattic/jetpack-status": "^1.18.5",
"automattic/jetpack-config": "^1.15.4",
"automattic/jetpack-my-jetpack": "^3.8.2"
"automattic/jetpack-my-jetpack": "^3.9.0-alpha"
},
"require-dev": {
"automattic/jetpack-changelogger": "^3.3.11",
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 @@ -38,7 +38,7 @@
),
'jetpack-my-jetpack' => array(
'path' => 'jetpack_vendor/automattic/jetpack-my-jetpack',
'ver' => '3.8.2',
'ver' => '3.9.0-alpha1697564255',
),
'jetpack-password-checker' => array(
'path' => 'jetpack_vendor/automattic/jetpack-password-checker',
Expand Down
56 changes: 28 additions & 28 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-a8c-mc-stats",
"reference": "532544e02e84caa65892871c6b2e9bfb11ba37e2"
"reference": "ab05dd99e9169548810e9cf5570764ae5f5613d8"
},
"require-dev": {
"automattic/jetpack-changelogger": "^3.3.11",
Expand Down Expand Up @@ -57,7 +57,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-admin-ui",
"reference": "09756aaf7684dc37ea8856ba73c1c273af95732e"
"reference": "2572237a0f546cdce54d40750ee8438defea7c5e"
},
"require-dev": {
"automattic/jetpack-changelogger": "^3.3.11",
Expand Down Expand Up @@ -119,7 +119,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-assets",
"reference": "44491351f12f39a6d1dda7affa977c52b0483308"
"reference": "b176309d5708fb3552ae80c6be40b5322031e015"
},
"require": {
"automattic/jetpack-constants": "^1.6.23"
Expand Down Expand Up @@ -187,7 +187,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-autoloader",
"reference": "6c5bf4189426a45a677529eb26107c7dc6fd76d2"
"reference": "9895eccd889df8f1b10270ef29771ef868f3cfc5"
},
"require": {
"composer-plugin-api": "^1.1 || ^2.0"
Expand Down Expand Up @@ -252,7 +252,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-composer-plugin",
"reference": "e65a787280ee3685f3efb8a0a05a7157802f911c"
"reference": "2ab3461de728170ead059375fdc9b5ba1ff844e5"
},
"require": {
"composer-plugin-api": "^2.1.0"
Expand Down Expand Up @@ -311,7 +311,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-config",
"reference": "80ef8450b401f47293de8dfddb0b3104d25b4255"
"reference": "e62fd50cea87de4c4234b864d0f95a7021bfd878"
},
"require-dev": {
"automattic/jetpack-changelogger": "^3.3.11"
Expand Down Expand Up @@ -353,7 +353,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-connection",
"reference": "6f32be3171883e3a85d6644cdce0695bdb359785"
"reference": "e688531ffe1bef271d1aad18189185e5f60626ca"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^1.4.22",
Expand Down Expand Up @@ -431,7 +431,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-constants",
"reference": "ad6b174dc08dd5d4c2c83bd123ab81382ab3bced"
"reference": "e386dfc32d183ae6407e3a888aa6525f69303f87"
},
"require-dev": {
"automattic/jetpack-changelogger": "^3.3.11",
Expand Down Expand Up @@ -482,7 +482,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-device-detection",
"reference": "e0429db8381bb5f85e67a7222232b360372a1ccd"
"reference": "a5af2fe47ba5367602c459fc5ce4677ed0f66530"
},
"require-dev": {
"automattic/jetpack-changelogger": "^3.3.11",
Expand Down Expand Up @@ -532,7 +532,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-identity-crisis",
"reference": "87a7385293990ce976b7c807637031bf453430f0"
"reference": "ef2d5775252dbabb9ae1e70b71d86159edef5031"
},
"require": {
"automattic/jetpack-assets": "^1.18.12",
Expand Down Expand Up @@ -610,7 +610,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-ip",
"reference": "cc37b39fdd4bee0022f167750616a374a32de95f"
"reference": "4fef8b63340b856778a279774537910660cc9b90"
},
"require-dev": {
"automattic/jetpack-changelogger": "^3.3.11",
Expand Down Expand Up @@ -665,7 +665,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-jitm",
"reference": "039a11f0bbda422035eeab51686fc5ab8ae442ad"
"reference": "fd9f1115cd5291458a56628e4505b89d80d4e60f"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^1.4.22",
Expand Down Expand Up @@ -740,7 +740,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-licensing",
"reference": "2afb3e2f5c2d0e1b8b709e325e7dc38305bde2b1"
"reference": "6671151ddc6c3e2cf2193d70399bfbb583428229"
},
"require": {
"automattic/jetpack-connection": "^1.58.1"
Expand Down Expand Up @@ -801,7 +801,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-logo",
"reference": "79834f7e1536f98a54646fefb7a3749fcb8efb96"
"reference": "45971c226e192462fa7ca1a5ee7125bf52f5553a"
},
"require-dev": {
"automattic/jetpack-changelogger": "^3.3.11",
Expand Down Expand Up @@ -846,12 +846,12 @@
},
{
"name": "automattic/jetpack-my-jetpack",
"version": "3.8.2",
"version_normalized": "3.8.2.0",
"version": "3.9.0-alpha.1697564255",
"version_normalized": "3.9.0.0-alpha1697564255",
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-my-jetpack",
"reference": "c2c7571b1a8a51af6789e5ea405a93b024ebc6dd"
"reference": "c260b300688061484d3c83afa60266c691b4c7b9"
},
"require": {
"automattic/jetpack-admin-ui": "^0.2.23",
Expand Down Expand Up @@ -881,7 +881,7 @@
"link-template": "https://github.com/Automattic/jetpack-my-jetpack/compare/${old}...${new}"
},
"branch-alias": {
"dev-trunk": "3.8.x-dev"
"dev-trunk": "3.9.x-dev"
},
"version-constants": {
"::PACKAGE_VERSION": "src/class-initializer.php"
Expand Down Expand Up @@ -941,7 +941,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-partner",
"reference": "159a010c59a7d9c3b979005c8a26c27f26ed17bd"
"reference": "261208bfaaa38aa5cb1dede329191b03faa5b57b"
},
"require": {
"automattic/jetpack-connection": "^1.58.1",
Expand Down Expand Up @@ -1003,7 +1003,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-password-checker",
"reference": "40437877e7a3a56a78d6d0da58b2dc23bf1e38eb"
"reference": "b418a22acb5d9d01306956b455defb9b0f33edf5"
},
"require-dev": {
"automattic/jetpack-changelogger": "^3.3.11",
Expand Down Expand Up @@ -1061,7 +1061,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-plugins-installer",
"reference": "e863c977484616518a49904b84132c81b9e43eaf"
"reference": "8a31cc1211a7bde1d7071c0fe143a01c7f2d01d0"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^1.4.22"
Expand Down Expand Up @@ -1115,7 +1115,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-redirect",
"reference": "097fa4735c7163194e2dafdfa8acf56f043dee96"
"reference": "eb665b23a266a126d2ca9c23d4ed36f508b5e7db"
},
"require": {
"automattic/jetpack-status": "^1.18.5"
Expand Down Expand Up @@ -1169,7 +1169,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-roles",
"reference": "47e167bdbe969c2dd93ec87d1751952b31c3bf02"
"reference": "a6cabd0fc6f58ec452bfcb444936b1900a038a16"
},
"require-dev": {
"automattic/jetpack-changelogger": "^3.3.11",
Expand Down Expand Up @@ -1220,14 +1220,14 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-search",
"reference": "de7635c217384f99748d67167f8ac458cff3fa41"
"reference": "a1e6071e5a47b8354116dc9bbb0edc249a023672"
},
"require": {
"automattic/jetpack-assets": "^1.18.12",
"automattic/jetpack-config": "^1.15.4",
"automattic/jetpack-connection": "^1.58.1",
"automattic/jetpack-constants": "^1.6.23",
"automattic/jetpack-my-jetpack": "^3.8.2",
"automattic/jetpack-my-jetpack": "^3.9.0-alpha",
"automattic/jetpack-status": "^1.18.5"
},
"require-dev": {
Expand Down Expand Up @@ -1306,7 +1306,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-stats",
"reference": "c0c0559c2afc0f4f580822fb693d4779671bb072"
"reference": "085c581fe611e844368c5618bbc7164aa30a2824"
},
"require": {
"automattic/jetpack-assets": "^1.18.12",
Expand Down Expand Up @@ -1370,7 +1370,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-status",
"reference": "03117e05fc06f420eeffdb459553df7348db1668"
"reference": "41a2cfce2428b158dd0a0da611bb93c2bb4bd5b9"
},
"require": {
"automattic/jetpack-constants": "^1.6.23"
Expand Down Expand Up @@ -1425,7 +1425,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-sync",
"reference": "e750acbee72592e22b8096f2cf50173feab3089f"
"reference": "3fe434181f9d034e90be3261496b26cbb7b0954d"
},
"require": {
"automattic/jetpack-connection": "^1.58.1",
Expand Down
Loading

0 comments on commit 9356418

Please sign in to comment.