Closed gglobalstep closed 8 months ago
@james-allan (current reviewer) – can you try reproducing this? My read on the report is that subscriptions can't be purchased with payment request (i.e. Chrome Pay).
That sounds serious, though perhaps there's something about the store or shipping config that makes this unlikely in the real world.
Assuming this is reproducible and marking as high priority.
Potential case reported in 5553160-zen but it is not connected to a subscription but rather a simple product. Waiting to get more details from the customer to confirm it's not a conflict with another plugin.
Some quick notes on my findings so far. This is still reproducible and occurs only when there's no shipping zones defined. State validation is failing here due to needs_shipping_address()
returning true
here. It's returning true because WC Subscriptions is filtering woocommerce_cart_needs_shipping_address
here. For comparison, needs_shipping_address
returns false for a simple product under the same conditions and the purchase can complete. I'm considering filtering woocommerce_cart_needs_shipping_address
just for this scenario, but will do a bit more research first.
@pierorocca correcting the error on this issue would be good, but maybe we should prioritize an effort to detect this condition and educate merchants ahead of time. This almost feels like something that should be considered as part of a Woo core onboarding checklist.
This is still reproducible and occurs only when there's no shipping zones defined.
I have a recurring wine club membership and I'm set to "pickup" so it is possible to have no zones yet still support local pickup or even local delivery (e.g. food, appliances).
Where shipping is offered and a zone MUST be setup, I agree @c-shultz either this falls under a core configuration improvement either through improved onboarding/documentation, improved admin notifications e.g. "warning, no shipping zones have been set and shipping is enabled." or by setting a default.
So this is likely a broader issue than PRBs. How does this create problems for standard checkout credit card shoppers? Incorrect or free shipping?
This almost feels like something that should be considered as part of a Woo core onboarding checklist.
@c-shultz - Core does include a task to review shipping options:
A zone is added as well, which appears to be selected based on the shop location, and a Free Shipping Method added. So it seems that this scenario would be deliberate, though I can't readily think of a use case for having no shipping methods and not using virtual products. Though a notification of some type could possibly be triggered when a store attempts to publish a physical / non-virtual product and no shipping methods exist.
I have a recurring wine club membership and I'm set to "pickup" so it is possible to have no zones yet still support local pickup or even local delivery (e.g. food, appliances).
@pierorocca - This also seems like a scenario where either a local pickup(core shipping method) or local delivery shipping method could be used. If not needed, then this would become a virtual product which doesn't require shipping.
With this said, I've been operating under the idea that there is most likely some use case for this setup. Having 0 shipping methods doesn't block purchase for other product types via credit card or PRBs. Subscriptions can also be purchased via credit card when 0 shipping methods are configured on the store. The problem is only apparent with PRBs and only because Woo Subscriptions triggers a filter that the cart needs shipping when a non-virtual subscription is in the cart. Unlike other payment methods, PRBs are validating on that and an error is thrown.
@mdmoore the wine feels quite physical in my belly :) That makes sense that local pickup and local delivery (if that existed) would be considered shipping methods from a core perspective.
Bug Description:
When Shipping zone is not defined and user tries to purchase a subscription product from cart page via payment request, an error message stating "The Payment Request button is not supported in United States (US) because some required fields couldn't be verified." is displayed.
Environment:
Woocommerce Version : WooCommerce 5.5.1 WooCommerce Payments: v2.7.0-test-3
PC: Windows 10, Mac 10.14.6 Chrome(Version 91.0.4472.77) Firefox(Version 88.0) Safari: v14.0
Steps To Reproduce:
Actual Result:
"The payment request button is not supported.... " error message is displayed while purchasing a subscription product via Payment request from the cart page.
Expected Result:
User should be able to complete the payment via payment request for subscription product from Cart page.
Screenshot:
Isolating the problem (mark completed items with an [x]):