Hey, thanks for the post link:
I used that code:
add_filter( 'woocommerce_checkout_fields', 'bbloomer_set_checkout_field_input_value_default' );
function bbloomer_set_checkout_field_input_value_default($fields) {
$fields['billing']['billing_city']['default'] = 'Kadapa';
$fields['billing']['billing_state']['default'] = 'Andhra Pradesh';
return $fields;
}
The city name changed, but it was still editable
But the state name did not change, we want both the state and city name to be not editable. Please guide!