Skip to content

Fix payment method instructions for OC #4575

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

Merged
merged 6 commits into from
Aug 14, 2025

Conversation

wjrosa
Copy link
Contributor

@wjrosa wjrosa commented Aug 12, 2025

Fixes STRIPE-665

Changes proposed in this Pull Request:

This simple PR fixes the test payment method instructions not showing up when Optimized Checkout is enabled. When I updated the class name in the CSS file here, I broke the display of the instructions. The fix consists of simply checking if the .content paragraph we want to hide is the correct one (the empty one).

Testing instructions

  • Checkout and build this branch on your test environment (fix/payment-method-instructions-for-oc)
  • Connect your Stripe account
  • Enable the Optimized Checkout feature
  • Enable some payment methods with instructions (card, SEPA, etc)
  • As a shopper, add a product to your cart
  • Go to the block checkout page
  • Confirm instructions are correctly shown
  • Repeat the test for classic checkout

  • Covered with tests (or have a good reason not to test in description ☝️)
  • Tested on mobile (or does not apply)

Changelog entry

  • This Pull Request does not require a changelog entry. (Comment required below)
Changelog Entry Comment

Comment

Post merge

@wjrosa wjrosa self-assigned this Aug 12, 2025
@wjrosa wjrosa marked this pull request as ready for review August 12, 2025 13:27
@wjrosa wjrosa added this to the 9.9.0 milestone Aug 12, 2025
@wjrosa wjrosa requested review from a team, annemirasol and malithsen and removed request for a team August 12, 2025 13:34
Copy link
Contributor

@malithsen malithsen left a comment

Choose a reason for hiding this comment

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

I see the test instructions for some payment methods like SEPA. But for Cards, instructions show up for a second when the page is loading and then getsdisplay: none-ed

Image

@wjrosa
Copy link
Contributor Author

wjrosa commented Aug 14, 2025

@malithsen that's strange. I just tested it again, both shortcode and blocks, and it works just fine for me 🤔 . Did you try to rebuild the frontend files? And clear the cache for the browser?

Copy link
Contributor

@annemirasol annemirasol left a comment

Choose a reason for hiding this comment

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

I see test instructions for card, but not SEPA.

Split PE:
Screenshot 2025-08-14 at 9 36 53 AM

OC:
Screenshot 2025-08-14 at 9 37 10 AM

Same behavior for both block and classic checkout.

@annemirasol
Copy link
Contributor

I see test instructions for card, but not SEPA.

NVM, I see it above the payment methods!

Copy link
Contributor

@annemirasol annemirasol left a comment

Choose a reason for hiding this comment

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

Works as described for me!

@malithsen
Copy link
Contributor

that's strange. I just tested it again, both shortcode and blocks, and it works just fine for me 🤔 . Did you try to rebuild the frontend files? And clear the cache for the browser?

@wjrosa I still have the issue. I noticed that it only happens when I am testing as a logged in customer. For guest users, test instructions show up as expected.

@wjrosa
Copy link
Contributor Author

wjrosa commented Aug 14, 2025

@malithsen can you rebuild, clear your cache, and try again, please? I did fix the display: none issue, and maybe that's what was causing your bug somehow (it still works fine for me).

@wjrosa wjrosa requested a review from malithsen August 14, 2025 20:19
Copy link
Contributor

@malithsen malithsen left a comment

Choose a reason for hiding this comment

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

can you rebuild, clear your cache, and try again, please?

After rebuilding and clearing cache I was still seeing it. I then uploaded a build of this branch to a JN site, and test instructions show up as expected for both logged-in and guest users, so as you said, this is likely a caching issue on my local setup.

@wjrosa wjrosa merged commit abe8e05 into develop Aug 14, 2025
38 of 40 checks passed
@wjrosa wjrosa deleted the fix/payment-method-instructions-for-oc branch August 14, 2025 20:47
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