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 "Hide shipping costs until an address is entered" #27143
Conversation
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.
Tested this PR and it works great!
Documenting my experience below:
- With
Hide shipping costs until an address is entered
enabled:
There is no shipping calculator on the cart. The shipping charge appears on the Checkout page only when the user enters country, states, and postcode:
- With both
Enable the shipping calculator on the cart page
andHide shipping costs until an address is entered
enabled:
There is a link to the shipping calculator on the Cart page as expected. When the user enters the country, state, and the postcode, the shipping charge appears:
Noting that I also tested this with Geolocation enabled and MaxMind integration set up - everything works as expected as described in this PR.
Also unit test ❤️
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.
Nice job. Looks good to me 👍. Unit tests look good, and the test plan works great.
No need for country and state. We get country from geolocation and state is useless with postcode (most accurate) Asking for 3x customer input, is asking for 3x sanitize, mistakes, correction workload. Let alones, customer UX After postcode input, in frontend is better to echo "this country, this state, this postcode -> click here to change" instead of "nothing -> click here to work for me" Will we be able to use postcode alone? |
All Submissions:
Changes proposed in this Pull Request:
Currently by enabling
woocommerce_shipping_cost_requires_address
will display shipping costs if finds a country or if a state + postcode, what doesn't really reflects what the settings says.This PR makes
woocommerce_shipping_cost_requires_address
a little more strict by displaying shipping costs only when a customer enters a country, state and postcode, those are all required information to proper calculate shipping zones and costs.Closes #26876.
How to test the changes in this Pull Request:
WooCommerce/Settings/Shipping/Shipping options
and select the following checkboxes:Hide shipping costs until an address is entered
is selected. Note that the address may get partially entered by the geolocation option or from the store location:Other information:
Changelog entry