-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable larger video uploads for Jetpack customers with standalone VideoPress subs #16322
Enable larger video uploads for Jetpack customers with standalone VideoPress subs #16322
Conversation
With this commit, video uploads are enabled for all VideoPress subs via an explicit check for whether VideoPress is enabled. Previously, there was only a check for whether a user was on a free plan, which excluded those with standalone VideoPress subs.
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
You can test the changes on this Pull Request by downloading the APKs: |
This is to resolve the buildkite error being caused by the previously complex logic.
This allows removal of nested ifs and the duplication of the default flow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job tracking this down and finding a solution 👍 I tested this via the described steps on a Pixel 3a, physical device (and also reproduced the original issue in trunk
), and confirmed that this PR fixes the issue. I also manually tested a Business site as well as a free site for regressions, and everything is still working as expected for those scenarios as well.
The code changes look good too.
While looking at the code, I saw an opportunity to refactor things a bit to reduce some unnecessary complexity (not introduced in your PR). I've opened a PR to address that here: #16375, please feel free to merge this into your PR, or merge this PR as is (the target branch on that PR should auto-update in that case). 😄
…loads-for-all-videopress-subscribers--refactor-suggestion Refactor video duration check to simplify the nested ifs
Thank you for the review @mkevins! 🙇♀️ I've gone ahead to approve and merge your PR into this one via #16375 (review). :D I'll go ahead to merge this one now, too. |
Fixes #16077
This PR addresses an issue where Jetpack-connected users with standalone VideoPress subscriptions were blocked from uploading videos via the app.
The reason for the block was that, as per #15719, users with free plans were recently prevented from uploading videos longer than five minutes in length via the app. If a Jetpack user has a standalone subscription, they're technically counted as being on a "free plan", even though they're paying for VideoPress.
Testing
Pre-requisites:
To test:
Code changes
isActiveModuleEnabled("videopress")
has been added alongside existing checks forhasFreePlan
. This new check will always returnfalse
for WordPress.com sites and only returntrue
in cases where a Jetpack site has the VideoPress module enabled, which can only be the case if there is an active VideoPress subscription.Note, the
IsVideoPressSupported
check was not used as it always returns asfalse
if there is no paid plan, even if there is a standalone VideoPress subscription. TheisActiveModuleEnabled("videopress")
check was the only method I could find to fix our specific use case, where we need to determine if a site has a standalone VideoPress subscription.Regression Notes
This PR shouldn't impact or block the way other users are able to upload videos. Those with free WordPress.com plans should still not be able to upload videos while those with a self-hosted site should be able to.
I went through the manual testing steps on the following site types:
No automated tests were added as this is a small change that I didn't feel warranted such tests.
PR submission checklist:
RELEASE-NOTES.txt
if necessary.