You can have WooCommerce override the default setting that makes the field required by adding a filter to your theme's functions.php
. It would be best practice is to create a child theme so it won't get overwritten each time you update the theme.
For example, this code will remove the "required" state from the billing and shipping postal codes during checkout (if the shipping country is not 'US'):
add_filter( 'woocommerce_checkout_fields','custom_override_default_address_fields' );
function custom_override_default_address_fields($fields){
global $woocommerce;
$country = $woocommerce->customer->get_shipping_country();
if($country !== 'US'){
$fields['billing']['billing_postcode']['required'] = false;
$fields['shipping']['shipping_postcode']['required'] = false;
}
return $fields;
}
For more details on filters and fields available to edit via filtering see WooCommerce Customizing checkout fields using actions and filters doc