-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
fix: set correct shipping_method indexes in cart #48383
base: trunk
Are you sure you want to change the base?
Conversation
Hi , Apart from reviewing the code changes, please make sure to review the testing instructions as well. You can follow this guide to find out what good testing instructions should look like: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks good. For clarity, it may be worth noting that this change applies to the 'classic checkout' and not the default Blocks-driven checkout experience.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll also need to change the @version
tag in the template. Given where we are in the release cycle, 9.1.0
makes sense.
Submission Review Guidelines:
Changes proposed in this Pull Request:
The
$index
variable is never set withintemplates/cart/cart-shipping.php
is never set and so all of the shipping methods havename=shipping_method[0]
andwoocommerce_after_shipping_rate
always receives0
for the index.This change sets
$index
correctly within the loop:How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
WooCommerce > Settings > Shippings
and configure a Shipping Zone with multiple shipping methods available.input
elements should have sequential name attributes of the formshipping_method[i]
wherei
is their position in the list. You can use your browser's dev tools to verify this.Changelog entry
Will update manually.