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 uncaught error in block editor when UPE is enabled #3756

Merged
merged 5 commits into from
Feb 17, 2025

Conversation

Mayisha
Copy link
Contributor

@Mayisha Mayisha commented Jan 22, 2025

In block editor, the stripe payment elements fail to render because of getStripeServerData function not returning any data.

Changes proposed in this Pull Request:

  • In block checkout, the stripe data is present in 'stripe_data' on both frontend and editor. So getting the data from this attribute.

Testing instructions

  • Enable the card payment method on Stripe settings page.
  • Go to the block checkout editor and open the browser console.
  • In develop, notice an error in the console and the card payment element is empty.
Screenshot 2025-01-23 at 9 32 54 AM
  • In this branch notice that the console error is gone. And the card element is present.

@Mayisha Mayisha marked this pull request as draft January 22, 2025 00:18
@Mayisha Mayisha requested review from wjrosa and a team and removed request for wjrosa and a team January 22, 2025 00:43
@wjrosa wjrosa marked this pull request as ready for review January 23, 2025 13:28
Copy link
Contributor

@wjrosa wjrosa left a comment

Choose a reason for hiding this comment

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

Sorry I missed this PR! Works as expected 👍

@Mayisha Mayisha changed the title Show UPE element on block editor Fix uncaught error in block editor when UPE is enabled Feb 17, 2025
@Mayisha Mayisha merged commit 14b4041 into develop Feb 17, 2025
37 checks passed
@Mayisha Mayisha deleted the task/pe-in-editor branch February 17, 2025 13:34
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.

2 participants