I am trying to modify WooCommerce check out fields. There are two points I want to reach.
Conditional fields
I want to make conditional fields for differe
@LoicTheAztec Thanks you for your reply, you gave me a great help. As you mentioned, required fields are the problem. As a result, I tried to use the code as below to solve the problem. Although it solved the problem about required fields, it cause the labels of the fields cannot be shown.
add_filter( 'woocommerce_shipping_fields', 'customizing_shipping_fields_required' );
function customizing_shipping_fields_required($fields) {
$fields['shipping_first_name'] = array(
'required'=>false
);
$fields['shipping_last_name'] = array(
'required'=>false
);
$fields['shipping_company'] = array(
'required'=>false
);
$fields['shipping_city'] = array(
'required'=>false
);
$fields['shipping_address_1'] = array(
'required'=>false
);
$fields['shipping_address_2'] = array(
'required'=>false
);
$fields['shipping_postcode'] = array(
'required'=>false
);
return $fields;
}