is not a valid postcode / ZIP
-
Hi,
I have the latest version of WordPress, Woocommerce and Woocommerce Checkout Manager.
And I have a problem with a billing postcode field. It is setted as not required. But even when I fill it with valid data I get a validation error “is not a valid postcode / ZIP.” for unsigned user. I tried to deactivate the Woocommerce Checkout Manager Plugin. There is no error for unsigned user.
So I supposed that the post code data is not passed to validation function. When the user is logged in the WC validation function can take the postcode data from customer profile. I add a function for the filter:add_filter( ‘woocommerce_checkout_postcode_validation_notice’, ‘test_post_code_validation’ );
function test_post_code_validation($postcode_validation_notice, $country, $formatted_postcode) {
$country = WC()->customer->get_billing_country();
$postcode_validation_notice .= $country.’, ‘.$formatted_postcode;
return $postcode_validation_notice;
}And my supposition approved. A can see the country code, but the postcode is empty when the checkout posted data is validated.
Be so kind to help me with this issue.
The page I need help with: [log in to see the link]
The topic ‘is not a valid postcode / ZIP’ is closed to new replies.