WooCommerce: Set country by default in checkout page
Update (Since WooCommerce 3) This are the woocommerce hooks and code to be used for this purpose for country (and optionally state): add_filter( ‘default_checkout_billing_country’, ‘change_default_checkout_country_and_state’ ); add_filter( ‘default_checkout_shipping_country’, ‘change_default_checkout_country_and_state’ ); add_filter( ‘default_checkout_billing_state’, ‘change_default_checkout_country_and_state’ ); add_filter( ‘default_checkout_shipping_state’, ‘change_default_checkout_country_and_state’ ); function change_default_checkout_country_and_state( $default ) { return null; } Or even shorter: add_filter( ‘default_checkout_billing_country’, ‘__return_null’ ); add_filter( ‘default_checkout_shipping_country’, … Read more