-
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
Add BNPL to cart summary #8427
Add BNPL to cart summary #8427
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: +26.2 kB (+2%) Total Size: 1.22 MB
ℹ️ View Unchanged
|
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.
@gpressutto5 Looks like this is due decimals being set to 0. The updated value is coming from the store API and isn't prepared like the initial amount is via |
@gpressutto5 The updated amount is correct now. It was also an issue on the cart block when decimal precision was not 2. It's resolved now when you have time for another look. |
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.
Fixes #8144
Changes proposed in this Pull Request
This adds the Stripe BNPL Payment Method Messaging Element to the cart summary on cart pages. For for classic cart, the PMME is mounted to a div that's added to the page. For the cart block, the Stripe
<PaymentMethodMessagingElement />
component is used. Using this element required updating thestripe/react-stripe-js
package. I've used the latest version of the package, so one thing to consider is whether this update will cause any issues and if an earlier package should be used.This also integrates the Appearance API based on #8421.
Testing instructions
Testing the Appearance API
For classic themes, add some custom CSS to change fonts and background colors, such as:
Closing the Customizer will clear the transient.
For block based themes, change to a dark style. In Twenty Twenty-Four, easy to go Appearance > Editor > Styles > Onyx. Saving this style doesn't clear the transient, unfortunately. It will have to be cleared manually.
npm run wp transient delete wcpay_upe_bnpl_cart_block_appearance
andnpm run wp transient delete wcpay_upe_bnpl_cart_block_appearance_theme
should do the trick.npm 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