Fixes 1196341175636977-as-1198514641268289
.
Changes proposed in this Pull Request
- Create a new Plans screen-specific selector called
getAnnualBillingDiscount
.
- Source discount percentage from new selector instead of hard-coding annual discounts as text.
- Add unit tests for
getAnnualBillingDiscount
.
Testing instructions
In your testing environment, on either Calypso or Jetpack.com:
- Select a Jetpack site and go to any variant of the Plans page where the annual billing discount should be visible.
- For the currency associated with your user account, verify that the percentage mentioned matches the highest available discount for the products and plans that are visible. Examples:
- CRO v1 / USD: 20% (Jetpack Security Daily)
- CRO v1 / EUR: 17% (Jetpack Backup Daily)
- CRO v2 / JPY: 18% (Jetpack Security Daily)
- CRO v2 / INR: 43% (Jetpack Security Real-time)
- Test this page with different currencies by changing the currency associated with your user account.
NOTE: Discounts can be calculated with the following formula: 1 - <yearly cost per month> / <monthly cost per month>
.
Screenshots
Unfortunately, no screenshots were provided by the developer.