Skip to content
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

Make Stats Commercial "Annual" plan the default billing term. #80341

Merged
merged 2 commits into from
Aug 9, 2023

Conversation

elliottprogrammer
Copy link
Contributor

This PR makes the Stats Commercial yearly/annual billing term the default plan when selected to purchase (as opposed to the monthly billing term product).

Proposed Changes

  • Makes the necessary code modifications to make the Stats Commercial yearly plan as default.

Testing Instructions

  • If code-D118168 is not merged yet, you will first need to apply patch code-D118168 to your sandbox, and sandbox public-api.wordpress.com, and define( 'USE_STORE_SANDBOX' ); in 0-sandbox.php file.

  • Checkout this PR and run yarn start.

  • Go to: http://calypso.localhost:3000/stats/purchase/:SITE (where :SITE is the site slug of a self-hosted Jetpack site connected to your account)

  • Select "Commercial site" and verify the Stats Commercial "yearly" billing product is shown at $8.33/mo USD. (See screenshot).
    Markup 2023-08-08 at 16 44 29

  • Select the "Get Jetpack Stats" button and verify you are taken to checkout with the "yearly" Stats Commercial product in the cart.

  • Go back to the http://calypso.localhost:3000/stats/purchase/:SITE page and select "Personal site" this time. Verify the Personal site slider works the same as it always has prior to this PR.

Bonus:

  • Test the Stats Commercial annual product in some other currencies (Change your currency in Store Admin) and verify the price display is accurate and looks fine.

Stats Commercial "Yearly/annual" prices are as follows:

currency per_unit_fee
USD 100.00
EUR 120.00
AUD 156.00
GBP 96.00
BRL 408.00
CAD 144.00
CHF 108.00
CZK 2400.00
DKK 804.00
HKD 804.00
HUF 57588.00
IDR 1919940.00
ILS 384.00
INR 5532.00
JPY 12504.00
MXN 1752.00
NOK 1008.00
NZD 180.00
PHP 3852.00
PLN 396.00
RUB 7644.00
SEK 1104.00
SGD 156.00
THB 2808.00
TWD 3204.00
TRY 696.00

.

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-ajp-p2)?

@elliottprogrammer elliottprogrammer added [Feature] Stats Everything related to our analytics product at /stats/ Jetpack [Feature Group] WPCOM Store & Purchases All things billing on WordPress.com. This includes the backend store, plans, and billing management. labels Aug 8, 2023
@elliottprogrammer elliottprogrammer self-assigned this Aug 8, 2023
@matticbot
Copy link
Contributor

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

App Entrypoints (~28 bytes added 📈 [gzipped])

name           parsed_size           gzip_size
entry-stepper        +42 B  (+0.0%)      +16 B  (+0.0%)
entry-main           +42 B  (+0.0%)      +17 B  (+0.0%)

Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

Sections (~35 bytes added 📈 [gzipped])

name                               parsed_size           gzip_size
site-purchases                          +222 B  (+0.0%)      +30 B  (+0.0%)
purchases                               +222 B  (+0.0%)      +30 B  (+0.0%)
domains                                 +222 B  (+0.0%)      +31 B  (+0.0%)
checkout                                +222 B  (+0.0%)      +30 B  (+0.0%)
settings-jetpack                        +217 B  (+0.0%)      +26 B  (+0.0%)
scan                                    +217 B  (+0.0%)      +26 B  (+0.0%)
purchase-product                        +217 B  (+0.1%)      +26 B  (+0.1%)
plans                                   +217 B  (+0.0%)      +26 B  (+0.0%)
jetpack-search                          +217 B  (+0.1%)      +26 B  (+0.0%)
jetpack-connect                         +217 B  (+0.0%)      +26 B  (+0.0%)
jetpack-cloud-settings                  +217 B  (+0.0%)      +26 B  (+0.0%)
jetpack-cloud-pricing                   +217 B  (+0.0%)      +26 B  (+0.0%)
jetpack-cloud-plugin-management         +217 B  (+0.0%)      +26 B  (+0.0%)
jetpack-cloud-partner-portal            +217 B  (+0.0%)      +26 B  (+0.0%)
jetpack-cloud-features-comparison       +217 B  (+0.0%)      +26 B  (+0.0%)
jetpack-cloud-agency-dashboard          +217 B  (+0.0%)      +26 B  (+0.0%)
email                                   +217 B  (+0.0%)      +26 B  (+0.0%)
backup                                  +217 B  (+0.0%)      +26 B  (+0.0%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Async-loaded Components (~98 bytes added 📈 [gzipped])

name                                              parsed_size           gzip_size
async-load-calypso-my-sites-checkout-modal             +222 B  (+0.0%)      +30 B  (+0.0%)
async-load-calypso-blocks-editor-checkout-modal        +222 B  (+0.0%)      +30 B  (+0.0%)
async-load-calypso-my-sites-stats-stats-purchase       +217 B  (+0.4%)      +68 B  (+0.4%)

React components that are loaded lazily, when a certain part of UI is displayed for the first time.

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.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

Base automatically changed from add/stats-annual-plan-constants to trunk August 8, 2023 21:11
@elliottprogrammer elliottprogrammer requested a review from a team August 8, 2023 21:14
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Aug 8, 2023
@kangzj kangzj requested a review from a team August 9, 2023 01:38
Copy link
Contributor

@kangzj kangzj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested under NZD and it works well. The changes look reasonable as well. Thanks for working on this 👍 👍

@elliottprogrammer elliottprogrammer merged commit e6ea55f into trunk Aug 9, 2023
@elliottprogrammer elliottprogrammer deleted the update/make-annual-stats-default-plan branch August 9, 2023 15:47
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature Group] WPCOM Store & Purchases All things billing on WordPress.com. This includes the backend store, plans, and billing management. [Feature] Stats Everything related to our analytics product at /stats/ Jetpack
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants