To blank all WooCommerce shipping checkout fields, you will use the following:
add_filter('woocommerce_checkout_get_value', 'checkout_get_value_filter', 10, 2 );
function checkout_get_value_filter( $value, $input ) {
if ( strpos($input, "shipping_") === 0 ) {
return '';
}
return $value;
}
Or also this specifying each related shipping field key:
add_filter('woocommerce_checkout_get_value', 'checkout_get_value_filter', 10, 2 );
function checkout_get_value_filter( $value, $input ) {
$key_fields = array(
'shipping_first_name',
'shipping_last_name',
'shipping_company',
'shipping_country',
'shipping_address_1',
'shipping_address_2',
'shipping_city',
'shipping_country',
'shipping_state',
'shipping_postcode',
);
if ( in_array($input, $key_fields) ) {
return '';
}
return $value;
}
Code goes on functions.php file of your active child theme (or active theme). It should works.