woocommerce / woocommerce

A customizable, open-source ecommerce platform built on WordPress. Build any commerce solution you can imagine.
https://woocommerce.com
9.22k stars 10.74k forks source link

[Enhancement]: ignore hidden autofilled shipping address form fields #34986

Open itsonit opened 1 year ago

itsonit commented 1 year ago

Describe the solution you'd like

If ship_to_different_address is false, all shipping address fields will be ignored in the checkout process.

Describe alternatives you've considered

No response

Additional context

A growing size of clients autofill this hidden form fields with not valid data the customer won't see in case the ship_to_different_address option is disabled by default.

itsonit commented 1 year ago

After a quickdive into the code, from

I realized that ignoring the shipping address only works for virtual products. Mind you regardless of whether the customer has checked the box for a different shipping address or not.

This does not make much sense to me. In most cases billing address and shipping address match. For the remaining cases, the customer should check the box that it should be sent to a different shipping address and fill in or correct the form fields.