-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Purchases: Hide plan controls for non-owners at site and account-level #45979
Purchases: Hide plan controls for non-owners at site and account-level #45979
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~352 bytes added 📈 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
showDismiss={ false } | ||
status="is-info" | ||
text={ translate( | ||
'This product was purchased by a different WordPress.com account. To manage this product, log in to that account or contact the account owner.' |
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.
ℹ️ String reuse speeds up translation and improves consistency. The following string might make a good alternative and has already been translated 21 times:
translate( 'This plan was purchased by a different WordPress.com account. To manage this plan, log in to that account or contact the account owner.' )
ES Score: 7
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.
This is a more generic use of the same sentence. We'll need to update it.
Thanks for the update @michaeldcain. @sirbrillig and @nbloomf, do you mind taking a look at this PR? |
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.
This is looking good! Just a few minor suggestions.
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.
I still can't figure out a way to get to a subscription that I don't own, but the code looks good and if you're able to test it, then it's probably safe. 👍
@sirbrillig if you have two accounts that are both admins on the same site, purchase a plan with one of them and then switch to the other to follow the testing instructions |
Awesome, thanks for testing again @sirbrillig. Just waiting for tests to clear again. |
00db3c8
to
9e9af33
Compare
9e9af33
to
7d940b1
Compare
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/4630077 Thank you @fditrapani for including a screenshot in the description! This is really helpful for our translators. |
Translation for this Pull Request has now been finished. |
Changes proposed in this Pull Request
This makes the subscription settings screen read-only for non-owners.
Before
After
Testing instructions
site-level-billing
flagFixes # #45838