woocommerce / woocommerce-blocks

(Deprecated) This plugin has been merged into woocommerce/woocommerce
https://wordpress.org/plugins/woo-gutenberg-products-block/
GNU General Public License v3.0
406 stars 218 forks source link

How to disable (remove) some field in checkout page of Woocommer Block #10060

Closed DuynNguyen closed 1 year ago

DuynNguyen commented 1 year ago

What do you like about the Cart & Checkout blocks?

What do you think is missing from the Cart & Checkout blocks?

Hi. I want to remove/disable some filed on the checkout page (for example: country, city, zipcode,.... field). How to do it? Besides that, I want to modify some field is optional, no need to fill in. How can do it? Thanks so much

tarunvijwani commented 1 year ago

@DuynNguyen Thank you for reaching out. Do you wish to disable fields for some specific countries?

Address fields are determined from the country locale. You can see how they are defined here:

https://github.com/woocommerce/woocommerce/blob/124aeb746710a258f4d66dec4d333dd6cc9818dc/includes/class-wc-countries.php#L795

If you log an issue or submit a Pull Request to WooCommerce core with the details of the locale you're targeting and fields that are not required, this can be changed.

mikejolley commented 1 year ago

As its been 3 weeks without feedback I will close this issue. Thank you.