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

Country eligibility check for BNPL messaging element on product/cart pages #10179

Closed
frosso opened this issue Jan 17, 2025 · 2 comments · Fixed by #10424
Closed

Country eligibility check for BNPL messaging element on product/cart pages #10179

frosso opened this issue Jan 17, 2025 · 2 comments · Fixed by #10424
Assignees
Labels
focus: checkout payments priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. priority: medium The issue/PR is medium priority—non-critical functionality loss, minimal effect on usability type: bug The issue is a confirmed bug.

Comments

@frosso
Copy link
Contributor

frosso commented Jan 17, 2025

Describe the bug

The BNPL messaging element is rendered in a few pages:

  • Product pages
  • Block-based cart & checkout
  • Shortcode-based cart & checkout

As it currently stands, the implementation for checkout pages is different than the ones on cart & product pages.
On the checkout pages, the eligibility check is done on the selected customer's billing country (or the store's country), and whether that country is allowed for the BNPL payment methods.

On the product & cart pages, this check doesn't seem to be implemented.

So, if the customer's billing country is not supported by any of the enabled BNPL methods (e.g.: billing country CN), the BNPL messaging element will still attempt to render, and then fail.
Sometimes, this failure is just present in the browser's console.
Other times, this failure can be visible in the store's front-end (if you're admin and have error logging enabled).

We should implement the same checks in the product & cart implementations for BNPL messaging eligibility.

To Reproduce

  1. Add a product to the cart
  2. Go to checkout, select CN as the billing country
  3. Go back to the product page or the cart page

Actual behavior

The BNPL messaging attempts to render, but fails.

Screenshots

Image

Expected behavior

The BNPL messaging element shouldn't render if the country is not supported.

Additional context

p1736962049965999-slack-CU6SYV31A

@frosso frosso added priority: medium The issue/PR is medium priority—non-critical functionality loss, minimal effect on usability type: bug The issue is a confirmed bug. labels Jan 17, 2025
@anu-rock
Copy link
Contributor

Triaging alert: This issue concerns checkout and BNPL. Sending it to @Automattic/heisenberg as per Pc2DNy-3z-p2 by adding the relevant focus label. cc @FangedParakeet

@pierorocca pierorocca added the priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. label Jan 23, 2025
@timur27 timur27 self-assigned this Feb 17, 2025
@timur27
Copy link
Contributor

timur27 commented Feb 21, 2025

There's also an issue of global intermittently being unavailable during the execution when opening the block-based cart. I might create a separate PR for that, depending on what the change will look like.

Screen.Recording.2025-02-21.at.11.57.25.mov

UPDATE: I added a check for global before the execution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: checkout payments priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. priority: medium The issue/PR is medium priority—non-critical functionality loss, minimal effect on usability type: bug The issue is a confirmed bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants