The title might seem a simple fix but it is indicating it is a required field - yet checkout is allowed without an option being chosen and the select option just showing.
I am using Change WooCommerce checkout country field default option displayed label answer code to my previous question, this way:
add_filter( 'woocommerce_form_field_country', 'filter_form_field_country', 10, 4 );
function filter_form_field_country( $field, $key, $args, $value ) {
// Only in checkout page for "billing" city field
if ( is_checkout() && 'billing_country' === $key ) {
$search = esc_html__( 'Select a country / region…', 'woocommerce' ); // String to search
$replace = esc_html__( 'Select option to pay correct tax', 'woocommerce' ); // Replacement string
$field = str_replace( $search, $replace, $field );
}
return $field;
}
add_filter( 'woocommerce_checkout_fields', 'custom_override_checkout_fields' );
function custom_override_checkout_fields( $fields ) {
$fields['billing']['billing_country']['label'] = __('Are you purchasing as a Company Y/N or from the UK?', 'woocommerce');
$fields['billing']['billing_country']['required'] = true;
return $fields;
}
Does anybody see any conflict?