If I change a country as a user, for example from Belgium to Belau. I see the state/county field appearing. In Belgium, you don't have states, so this is good that WooCommerce doesn't show this field if you have selected Belgium.
If I try to write a plugin that makes use of add_filter( 'woocommerce_checkout_fields' , 'custom_function' );, this filter is not reloaded after a user changed the selected country.
You can listen to it through jQuery like $('select#billing_country').change, but then you get a hacky solution where you have to wait for an unknown time and then trigger a reload page.
So my question is: What is the best approach to customize checkout fields, for multiple countries, where the user can switch between countries?
Thanks, regards, Peter