You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to purchase multiple subscriptions of varying periods with Apple/Google Pay, you will get an "Invalid recurring shipping method." error:
After some initial investigation, I believe this issue is caused by Stripe's payment request handler unintentionally wiping the recurring shipping methods from the chosen_shipping_methods session when it calls WC()->shipping->reset_shipping(), which is called when calculating the shipping options to display in the Apple/Google Pay pop-ups.
Before we wipe/clear the chosen shipping methods, we store them in a variable here so I think to fix this we'll need to restore any other chosen shipping methods that were wiped.
Additional details
Example of shipping_method data from payment button $_POST:
Originally reported in 4606-gh-woocommerce/woocommerce-subscriptions
Similar issue to Automattic/woocommerce-payments#8029
Describe the bug
When attempting to purchase multiple subscriptions of varying periods with Apple/Google Pay, you will get an "Invalid recurring shipping method." error:
After some initial investigation, I believe this issue is caused by Stripe's payment request handler unintentionally wiping the recurring shipping methods from the
chosen_shipping_methods
session when it callsWC()->shipping->reset_shipping()
, which is called when calculating the shipping options to display in the Apple/Google Pay pop-ups.Before we wipe/clear the chosen shipping methods, we store them in a variable here so I think to fix this we'll need to restore any other chosen shipping methods that were wiped.
Additional details
Example of shipping_method data from payment button $_POST:
Example from a default checkout process:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: