Automattic / Automattic/jetpack
VideoPress: module is still activated when downgrading plan
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
#### Steps to reproduce the issue
0. Start from a Jetpack site with an active Premium upgrade.
1. Go to Jetpack > Settings, and enable the VideoPress feature.
2. Remove the Premium upgrade from your account.
3. Go to Media > Library.
4. Upload a new video.
#### What I expected
Video should be uploaded correctly and not processed by VideoPress.
#### What happened instead
VideoPress intercepted the upload, but the video is not uploaded, probably because the API detects that we're missing an upgrade.

#### Additional info
We found this when testing https://github.com/Automattic/jetpack/pull/11193 (props to @dmsnell).
I noted that Jetpack loads the `/modules/videopress.php` file when we downgrade from Premium to Free. Furthermore, this stops happening as soon as you visit "Jetpack > Settings", so it seems that the VideoPress module is not deactivated during the downgrade, and we deactivate it when visiting the "Jetpack > Settings" page.
Contributor guide
Research direction
Reproduce the downgrade flow from the issue, then inspect modules/videopress.php and the module lifecycle around the plan change. Confirm that downgrading from Premium prevents VideoPress from intercepting new uploads, including before visiting Jetpack > Settings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100