I\"m using the WooCommerce API to get the country list. I am doing:
$woo_countries = new WC_Countries();
$countries = $woo_countries->get_allowed_countrie
This is referred to as the "base country" by WooCommerce:
$woo_countries = new WC_Countries();
// Get default country
$default_country = $woo_countries->get_base_country();
// Get states in default country
$states = $woo_countries->get_states( $default_country );
Read more in the API docs.
It should be noted that the default WooCommerce billing form template logic ensures that the default country and state are pre-selected. Here's what it looks like:
checkout_fields['billing'] as $key => $field ) : ?>
get_value( $key ) ); ?>
The third argument passed to woocommerce_form_field() ensures that the default country and state are pre-populated.