Skip to content

MSD Billing: Fix atomic plan revert confirmation checkbox#109400

Merged
chrismccluskey merged 1 commit intotrunkfrom
fix/msd-at-plan-revert-confirmation
Mar 20, 2026
Merged

MSD Billing: Fix atomic plan revert confirmation checkbox#109400
chrismccluskey merged 1 commit intotrunkfrom
fix/msd-at-plan-revert-confirmation

Conversation

@chrismccluskey
Copy link
Contributor

@chrismccluskey chrismccluskey commented Mar 19, 2026

Fixes CHE-457

Proposed Changes

  • Resolve an issue where Atomic plans with bundled domains could not be cancelled because the checkbox did not enable the remove button.

Why are these changes being made?

  • The application is expecting atomicRevertConfirmed to be true if the checkbox was checked, but this wasn't being set.

Testing Instructions

  • Try to remove a plan purchased with a domain for a site that has gone atomic in the MSD.
  • Check the checkbox to confirm that you understand your plan will change.
  • The "Remove" button should change from a disabled state to an enabled state.

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 tested accessibility for your changes? Ensure the feature remains usable with various user agents (e.g., browsers), interfaces (e.g., keyboard navigation), and assistive technologies (e.g., screen readers) (PCYsg-S3g-p2).
  • 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 UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • 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-aUh-p2)?

@matticbot
Copy link
Contributor

matticbot commented Mar 19, 2026

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • agents-manager
  • blaze-dashboard
  • help-center
  • notifications
  • odyssey-stats

To test WordPress.com changes, run install-plugin.sh $pluginSlug fix/msd-at-plan-revert-confirmation on your sandbox.

@chrismccluskey chrismccluskey marked this pull request as ready for review March 19, 2026 19:53
@chrismccluskey chrismccluskey requested review from a team as code owners March 19, 2026 19:53
@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 Mar 19, 2026
if ( atomicTransfer?.created_at ) {
onCustomerConfirmedUnderstandingChange( checked );
onCustomerConfirmedUnderstandingAtomicPlanRevert( checked );
return;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm explicitly calling both functions here, but I could just as easily only call the atomic plan revert function in the if ( atomicTransfer?.created_at ) block and remove the return. My concern is that doing so will rely on that return not being present when it might normally look like it should be given how the functions are named.

Copy link
Member

@sirbrillig sirbrillig left a comment

Choose a reason for hiding this comment

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

The code seems fine, and testing works as described, but... it also works without this PR.

Trying to cancel the Business plan subscription for my Atomic site (192446221):

Image

Is there something else I need to do to trigger the bug?

@chrismccluskey
Copy link
Contributor Author

The code seems fine, and testing works as described, but... it also works without this PR.

My mistake. This needs to be tested on an atomic site with a bundled domain. I have updated the PR description and testing instructions to reflect this.

Copy link
Member

@sirbrillig sirbrillig left a comment

Choose a reason for hiding this comment

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

Looks good!

@chrismccluskey chrismccluskey force-pushed the fix/msd-at-plan-revert-confirmation branch from 5b8b34b to 4c6e3c5 Compare March 20, 2026 16:50
@chrismccluskey chrismccluskey merged commit fcd6e5a into trunk Mar 20, 2026
14 checks passed
@chrismccluskey chrismccluskey deleted the fix/msd-at-plan-revert-confirmation branch March 20, 2026 17: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 Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants