• Hello,

    we found an issue related to postcode validation when using WooCommerce Checkout Manager.Scenario

    • Customer selects United Arab Emirates as billing/shipping country.
    • WooCommerce correctly hides the postcode field because UAE does not use ZIP/postal codes.
    • However, when the customer submits the checkout/payment form, validation fails with an error saying that the postcode is required.
    • If we temporarily disable the Required option for the postcode field in WooCommerce Checkout Manager, checkout works as expected.

    This suggests that the field is correctly hidden on the frontend according to the country locale, but it is still treated as required during checkout validation.Expected behavior

    If WooCommerce defines:

    $locale[$country]['postcode']['required'] === false

    then the plugin should automatically skip postcode validation for that country, while keeping postcode required for countries where WooCommerce defines it as mandatory.Possible approach

    One possible solution could be to rely on WooCommerce country locale settings (WC()->countries->get_country_locale()) and dynamically set the required flag for billing_postcode and shipping_postcode according to the selected country.

    We tested a custom filter that adjusts the required property based on postcode.required, but we did not deploy it because we’d prefer a plugin-level solution if possible.

    Could you please investigate whether WooCommerce Checkout Manager is overriding WooCommerce’s native postcode requirements during checkout validation?

    Ideally, the fix should:

    • keep postcode required for countries that use it;
    • automatically make it optional for countries where WooCommerce sets postcode.required = false;
    • avoid hardcoded country exceptions where possible.

    Thank you.

You must be logged in to reply to this topic.