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

fix (ras-acc): make processing class unique to avoid clashes #1872

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

laurelfulford
Copy link
Contributor

All Submissions:

Changes proposed in this Pull Request:

This PR attempts to fix an issue where a subscription product with a free trial won't let you advance to the second screen of the modal checkout, because the 'Continue' button is greyed out.

My best guess is that something else (WooCommerce?) is removing the processing class before this check, causing it to fail and not finish the "unblock" process -- it's only happening with a very specific product setting, though, so there may be more to it than that.

See 1207817176293825-as-1208214895993707

How to test the changes in this Pull Request:

  1. Set up a few different checkout button blocks, plus a donate block for comparison. Make sure one of the checkout button blocks links to a subscription product with a free trial.
  2. On epic/ras-acc, run through a few trial checkouts with your buttons; for the subscription with a trial, note that the 'Continue' button is greyed out:

CleanShot 2024-09-04 at 14 20 31

  1. Apply this PR and run npm run build.
  2. Confirm that the subscription product with a free trial can be purchased, and that you can make it past the first screen.
  3. Smoke test the other checkouts (including using the NYP and coupon forms) and confirm the "processing" behaviour still works as expected.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Copy link
Contributor

@chickenn00dle chickenn00dle left a comment

Choose a reason for hiding this comment

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

Hey @laurelfulford,

Strangely, I can't reproduce on epic/ras-acc:

Screenshot 2024-09-05 at 09 03 50

I did just merge in https://github.com/Automattic/newspack-blocks/pull/1870/files, so I'm wondering if that extra update_checkout trigger might have something to do with this issue?

Are you still seeing the issue with the latest from epic/ras-acc?

@laurelfulford
Copy link
Contributor Author

Ah weird, @chickenn00dle! I can still reproduce it -- I wonder if it's something specific I'm doing when I set up subscriptions? I set up the checkout button that's still showing the issue on the ras-acc test site too 🤔

It's an absolute shot in the dark, but are you doing anything wildly different with your subscription product setup? I have NO idea what would cause the issue but ¯_(ツ)_/¯

CleanShot 2024-09-04 at 17 35 16

The other thing I noticed is that the Google Pay express checkout button won't show when the Continue Button is greyed out, too. I'll dig into that and see if it's somehow related!

@laurelfulford
Copy link
Contributor Author

Ahhhh, I think it's having WooPayments installed and activated (even if it's not enabled as the payment source).

@chickenn00dle When you have a moment, could you try enabling that plugin and see if you get the Continue weirdness? Thanks!

Copy link
Contributor

@chickenn00dle chickenn00dle left a comment

Choose a reason for hiding this comment

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

@chickenn00dle When you have a moment, could you try enabling that plugin and see if you get the Continue weirdness? Thanks!

Strange, I am still not able to reproduce with WooPayments active, both when it is enabled as a payment gateway AND when it is not.

That said, I am noticing the issue on ras-acc.newspackstaging.com and there is no harm in using a more specific classname generally speaking, so I'm gonna go ahead and approve this one anyway.

@laurelfulford
Copy link
Contributor Author

Thanks @chickenn00dle! Thank you for retesting it -- I was so sure I had the cause figured out, I wonder what's going on 🤔

I'm going to merge, but let me know if you think it'd be "tidier" to remove the processing class check from the unblockForm() function. I'm not sure if that would introduce other unintended side effects, but part of me is (irrationally) bothered by adding another processing class 😆

@laurelfulford laurelfulford merged commit 75290f0 into epic/ras-acc Sep 5, 2024
12 checks passed
@laurelfulford laurelfulford deleted the fix/free-trial-checkout-loading-issue branch September 5, 2024 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants