Skip to content

A4A: Dismiss checkout errors after leaving checkout - #113345

Merged
cleacos merged 6 commits into
trunkfrom
a4a-3163/dismiss-checkout-errors-after-leaving-checkout
Aug 7, 2026
Merged

A4A: Dismiss checkout errors after leaving checkout#113345
cleacos merged 6 commits into
trunkfrom
a4a-3163/dismiss-checkout-errors-after-leaving-checkout

Conversation

@cleacos

@cleacos cleacos commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Resolves A4A-3163

Proposed Changes

  • Add an A4A-owned cart-message cleanup lifecycle inside Billing Dragon checkout.
  • Remove regular and persistent checkout error notices when A4A checkout unmounts.
  • Clear cached cart messages on exit so old endpoint errors cannot replay.

Why are these changes being made?

WPCOM cart validation errors currently use persistent global notices. They can remain visible outside A4A checkout and replay from cached cart state after the user fixes the problem.

Testing Instructions

  • Use an agency with an existing yearly Pressable plan.
  • Select a monthly Pressable upgrade, add it to the cart, and open checkout.
  • Verify that the cart validation error appears.
  • Go back and change the selected upgrade to a yearly Pressable plan.
  • Open checkout again.
  • Verify that the previous notice was dismissed after leaving checkout, does not appear again, and checkout loads normally.

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?
  • For UI changes, have you tested the affected components in dark mode?
  • 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 you 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)?

— ClemenAgent (Powered by Codex)

Scope Billing Dragon cart errors to the active checkout session. Remove tracked notices and clear cached cart messages on unmount to prevent stale errors from replaying.
@cleacos cleacos self-assigned this Aug 6, 2026
@cleacos
cleacos requested a review from a team August 6, 2026 12: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 Aug 6, 2026
@cleacos
cleacos marked this pull request as ready for review August 6, 2026 13:15
cleacos added 3 commits August 6, 2026 14:35
Keep the checkout lifecycle behavior inside Billing Dragon so shared cart consumers remain unchanged. Remove A4A checkout notices and clear cached cart messages when the checkout unmounts.

@vitozev vitozev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It works as expected. I wonder whether this could be an issue we may have on the WP.com checkout too, and if that's the case, it's probably worth fixing the issue there. But let's ship this and reach out to Shillings for feedback.

@cleacos
cleacos merged commit 5623fc9 into trunk Aug 7, 2026
16 checks passed
@cleacos
cleacos deleted the a4a-3163/dismiss-checkout-errors-after-leaving-checkout branch August 7, 2026 11:13
@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 7, 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