I use conditional checkout fields as given at Conditionally unset checkout field in woocommerce . But, It doesn't remove required validation fields? How can I pass conditional statement within "if (true)" to remove required validation ? At the other words, how can I check which option is selected? Regards
if( true ){ // pass conditional statement here
unset($fields['billing']['add_house_name']); // remove field
$fields['billing']['add_building_name']['required'] = false; // remove required validation
}
return $fields;