When a customer reaches the checkout page, the billing section is automatically populated with the default country field. However, if you want to disable this feature and require customers to select their country & state fields from a dropdown instead, here is the solution.
add_filter( 'default_checkout_billing_country', 'ts_change_default_checkout_country' ); add_filter( 'default_checkout_billing_state', 'ts_change_default_checkout_state' ); function ts_change_default_checkout_country() { return null; } function ts_change_default_checkout_state() { return null; }
Output
The following output shows that the WooCommerce checkout page does not populate the country & state field by default.
Similarly, you can also restrict billing to a particular country on the WooCommerce checkout page.