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

Open
frosso opened this issue Jan 17, 2025 · 0 comments
Open
Labels
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

No branches or pull requests

1 participant