0
votes

I'm customizing the shipping address fields of my WooCommerce site. I already change those fields in the order I want. Now I want to change the City field and instead of a text field use a select. This new select for city will only show the cities from the state previously selected. Something similar to the way country and state fields work: when I select a country just the states from that country are shown in the State field. I want to achieve the same but with State and City. Need javascript?

I already search core code but I couldn't find anything.

thanks

1

1 Answers

0
votes

add_filter( 'woocommerce_checkout_fields', 'your_function );

documentation here: tutorial-customising-checkout-fields-using-actions-and-filters