Automattic / woocommerce-subscriptions-core

Subscriptions core package for WooCommerce
Other
82 stars 29 forks source link

"Invalid recurring shipping method" error during checkout with a minimum required amount free shipping option #409

Closed james-allan closed 1 year ago

james-allan commented 1 year ago

Describe the bug

When you attempt to checkout using a limited free shipping method, where free shipping is available to a recurring cart but isn't available to the initial cart, you are blocked and cannot complete the purchase.

Screenshot 2023-02-17 at 6 17 50 pm

To Reproduce

  1. Add a free shipping option that is limited to carts that exceed $100 (screenshot)
  2. Add a flat rate option (screenshot)
  3. Add a enough free trial subscription products to exceed the $100 requirement and at least 1 other product with an initial cost (subscription or standard product).
  4. Now visit the checkout. You should have standard shipping available to the initial cart, and free shipping available to the recurring cart that exceeds $100. (see screenshot example above).
  5. Choose free shipping.
  6. Attempt to checkout.
  7. You should get the error message "Invalid recurring shipping method." and be blocked from checking out.

Expected behavior

You should be able to choose free shipping and have checkout be successful in the scenario above.

Actual behavior

For some reason, this combination of things causes free shipping to be available for it to be displayed but not available when it is validated.

Product impact