Description
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
- Add a product to the cart
- Go to checkout, select
CN
as the billing country - Go back to the product page or the cart page
Actual behavior
The BNPL messaging attempts to render, but fails.
Screenshots
Expected behavior
The BNPL messaging element shouldn't render if the country is not supported.
Additional context
p1736962049965999-slack-CU6SYV31A