-
Notifications
You must be signed in to change notification settings - Fork 69
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
Pass product, blocks cart, classic cart and checkout on get WooPay session #9138
Pass product, blocks cart, classic cart and checkout on get WooPay session #9138
Conversation
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
Size Change: +594 B (0%) Total Size: 1.33 MB
ℹ️ View Unchanged
|
@nikkivias @pierorocca, I'd like to get your attention on the classic checkout styling. Is the below behavior what we want to support on WooPay? For the classic checkout on UPE styles, we focus on getting the styles from the payment form instead of the body.
|
@hsingyuc I wonder if this is due to how the computed styles works and when they are re-computed? I'm going to guess that like me, you switched colors in the editor, and then the computed styles were off. According to @FangedParakeet in this Slack thread p1721251046334039-slack-CU6SYV31A the computed values are stored in transients. The values are currently only getting recalculated after the transient expires (24 hours -- but I don't think this is working properly) or when the theme is changed. I suspect we need a few more triggers to force a recompute. @hsingyuc could this be impacting your testing? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @hsingyuc!
Was this resolved?? |
This is how UPE styles prioritize getting the styles from the classic checkout page. They prioritize payment method section before I think what we want from WooPay might be different since UPE styles look like they are specific to Stripe elements and not an entire site like WooPay. |
@pierorocca It tests as expected by following/reusing UPE styles, but I don't think that's what we want for WooPay, so I'd like to double-check with you and @nikkivias. If that's not what we would like for WooPay to support Classic checkout styles, we can add new rules for WooPay and not use UPE styles. |
@hsingyuc I agree with this since the payment method section background colors are going to be slightly different than the body of the checkout form. We want WooPay to look like the Store Checkout/Brand rather than looking like UPE. Good catch. |
Thank you for confirming! I'll address this issue in another PR. |
Fixes https://github.com/Automattic/woopay/issues/2804
Changes proposed in this Pull Request
This PR extends from the pass Blocks checkout appearance on init WooPay PR and use
getAppearanceType
to get element selectors from each page since a shopper doesn't always visit the checkout page before going to the WooPay checkout page.EPIC https://github.com/Automattic/woopay/issues/2781
SPIKE here
PT here
Related WooPay PR
Screen.Recording.2024-07-19.at.10.49.35.AM.mov
Testing instructions
WooPay global theme support
feature flagOR
Test 1 ( The latest WooPayments version ):
getAppearance
on the merchant siteget_woopay_session
request from dev tools and seeappearance
is passing with the requestReturn to cart
-> Blocks checkout page -> WooPay buttonCheckout as guest
and initialize WooPay as a new WooPay shopper with the email field redirectReturn to cart
-> Blocks checkout pageTest 2 ( An older WooPayments version ):
7.6.0
that doesn't havegetAppearance
on the merchant site for regression testnpm run changelog
to add a changelog file, choosepatch
to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.Post merge