0

Remove Woocommerce default address fields

Use the following action hook to remove default address fields value from checkout page

[code language=”css”]
<pre><code>add_filter(‘woocommerce_default_address_fields’, override_address_fields’);
function override_address_fields( $address_fields ) {
$address_fields[‘address_1’][‘placeholder’] = ”;
$address_fields[‘address_2’][‘placeholder’] = ”;
$address_fields[‘city’][‘placeholder’] = ”;
$address_fields[‘state’][‘placeholder’] = ”;
$address_fields[‘postcode’][‘placeholder’] = ”;
return $address_fields;
}
</code>[/code]

Sandeep Kumar

Sandeep kumar is a web developer and a professinal blogger. He works for latest technologies and write articles what he learn. In ICodeHub he share web languages tutorials and other programming tips and tricks. if you need some help or have some suggestion then mail him at sandeep92pal@gmail.com without any hesitation. He believes in learning and sharing.