woocommerce: short codes in billing fields do not work

WooCommerce: 3.5.1
WordPress: 4.9.8

I want to set up automatic billing fields with GeoIP short code data, but it does not work.

add_filter (& # 39; woocommerce_checkout_fields & # 39 ;, & # 39; set_checkout_field_input_value_default & # 39;);

function set_checkout_field_input_value_default ($ fields) {
$ fields['billing']['billing_city']['default']    = & # 39;[geoip_detect2 property="city"]& # 39 ;;
$ fields['billing']['billing_state']['default']    = & # 39;[geoip_detect2 property="mostSpecificSubdivision"]& # 39 ;;
returns $ fields;
}

This solution did not help: Shortcode does not work inside the html entry

Exit