Shortcodes in billing fields doesn't work
WooCommerce: 3.5.1 WordPress: 4.9.8
I want to set automaticly billing fields with data from GeoIP shortcodes, but it doesn't work.
add_filter( 'woocommerce_checkout_fields', 'set_checkout_field_input_value_default' );
function set_checkout_field_input_value_default($fields) {
$fields['billing']['billing_city']['default'] = '[geoip_detect2 property="city"]';
$fields['billing']['billing_state']['default'] = '[geoip_detect2 property="mostSpecificSubdivision"]';
return $fields;
}
This solution didn't help: Shortcode not working inside html input
Output
input type="text" class="input-text " name="billing_city" id="billing_city" placeholder="" value="[geoip_detect2 property=quot;cityquot;]" autocomplete="address-level2"