diff --git a/includes/class-wc-validation.php b/includes/class-wc-validation.php index 5b0248e2e5d..82d11138af7 100644 --- a/includes/class-wc-validation.php +++ b/includes/class-wc-validation.php @@ -80,7 +80,7 @@ class WC_Validation { $valid = (bool) preg_match( '/([AC-FHKNPRTV-Y]\d{2}|D6W)[0-9AC-FHKNPRTV-Y]{4}/', wc_normalize_postcode( $postcode ) ); break; case 'JP': - $valid = (bool) preg_match( '/^([0-9]{3})([-])([0-9]{4})$/', $postcode ); + $valid = (bool) preg_match( '/^([0-9]{3})([-]?)([0-9]{4})$/', $postcode ); break; case 'PT': $valid = (bool) preg_match( '/^([0-9]{4})([-])([0-9]{3})$/', $postcode );