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

feat: payment element styles on "Add payment method" page #8413

Closed
frosso opened this issue Mar 18, 2024 · 4 comments · Fixed by #8999
Closed

feat: payment element styles on "Add payment method" page #8413

frosso opened this issue Mar 18, 2024 · 4 comments · Fixed by #8999
Assignees
Labels
focus: checkout payments priority: medium The issue/PR is medium priority—non-critical functionality loss, minimal effect on usability type: enhancement The issue is a request for an enhancement.

Comments

@frosso
Copy link
Contributor

frosso commented Mar 18, 2024

Description

When the payment element is rendered at checkout, we use pass some styles to Stripe. These styles are auto-generated based on the site's look & feel.

The payment element is also rendered on the "Add payment method" page, in the customer's "My account" pages.

If styles have been previously calculated at checkout, those styles will be used by the "My account" page.
However, if no styles are present (e.g.: because the nonce used as cache expired), the default payment element styles will be used.

It would be great to ensure that the styles on the "my account" page could also be auto-generated.

Acceptance criteria

  • Payment Element styles are calculated and used on the "My account" pages

Designs

N/A

Testing instructions

  • Clear your nonces (or comment out these lines)
  • As a customer, go to the "Add payment method" page

Dev notes

Using a separate nonce/cache for the "my account" page would likely be beneficial, rather than reusing the one from checkout.

Additional context

This issue has been highlighted after working on #8383

@frosso frosso added priority: medium The issue/PR is medium priority—non-critical functionality loss, minimal effect on usability focus: checkout payments labels Mar 18, 2024
@zmaglica
Copy link
Contributor

Hi @pierorocca. Could Shopper Experience team work on this issue? I am asking this since I am doing Gamma Triage process PcreKM-yM-p2, and based on the applied label, this issue could be for them.

@pierorocca
Copy link
Contributor

pierorocca commented Mar 18, 2024

Thanks @zmaglica yes. If you could add missing type: bug or type: enhancement labels, the Shopper project board will auto-ingest the issue.

@frosso frosso added the type: enhancement The issue is a request for an enhancement. label Mar 21, 2024
@danielmx-dev
Copy link
Contributor

Please add your planning poker estimate with Zenhub @FangedParakeet

@danielmx-dev danielmx-dev self-assigned this Jun 19, 2024
@danielmx-dev
Copy link
Contributor

Regarding the following information:

If styles have been previously calculated at checkout, those styles will be used by the "My account" page.
However, if no styles are present (e.g.: because the nonce used as cache expired), the default payment element styles will be used.

And:

This issue has been highlighted after working on #8383

After trying to reproduce the issue, I wasn't able to do it. It looks like the issue that prevented the styles from being calculated in the Add Payment Method page when the transient didn't exist was fixed in this PR: #8421

However, the same PR introduced a small regression that prevents the styles from being calculated as intended in the shortcode/classic checkout.

I'll fix the regression and implement the separate transient as part of this issue's work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: checkout payments priority: medium The issue/PR is medium priority—non-critical functionality loss, minimal effect on usability type: enhancement The issue is a request for an enhancement.
Projects
None yet
4 participants