• Hello again and sorry for the delay.

    I saw that you marked this topic resolved, but I’ve update the plugin and the error continues. But I think I could identify the error pattern.

    If I DON’T CHANGE COUNTRY manually (this field comes checked automatically), the zip error shows up and the adress don’t updates based in ZIP.

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Neah Plugins

    (@gplsaver)

    Are you getting this error with the other plugin (autocomplete?) on or off?

    Thread Starter birous

    (@birous)

    When it is on and when it is off. The only way to be rid is to (re)set the country manually as it comes autofilled from woocommerce settings

    Plugin Author Neah Plugins

    (@gplsaver)

    can you share a link to your site where I can see this? I can’t duplicate at my end.(With the other plugin off.) Also if you can share your setting ( country, country you sell to,shipping etc)

    • This reply was modified 9 years, 3 months ago by Neah Plugins.
    • This reply was modified 9 years, 3 months ago by Neah Plugins.
    Plugin Author Neah Plugins

    (@gplsaver)

    Sorry,
    I found this from the other thread:
    General Options
    Base Location – Brazil-Sao Paulo
    Selling Location(s) – Sell to All Countries
    Shipping Location(s) – Disable shipping & shipping calculations
    Default Customer Location – Geolocation

    I don’t get the error with your settings. Can you share a link to the site where this is happening without the other plugin?

    Thread Starter birous

    (@birous)

    Hello. Try with Default Customer Location set to Brazil, please

    Plugin Author Neah Plugins

    (@gplsaver)

    I have. Can you share a link to a test site where this is happening? with the sequence that you are using. In my tests if i put a correct zip code, then it is ok. if i put a wrong zip code then i get an error.

    “If I DON’T CHANGE COUNTRY manually”
    How else are you changing the country? Are you saying that you want the country to automatically change to the correct country by entering the zip code? Or are you getting an error with the CORRECT country and CORRECT zip code?

    This might be a conflict with another plugin. I am not sure.

    Thread Starter birous

    (@birous)

    “How else are you changing the country? Are you saying that you want the country to automatically change to the correct country by entering the zip code? Or are you getting an error with the CORRECT country and CORRECT zip code?”

    The country field comes checked automatically. I get to focus and change the country field, so the zip field autofills the address and the ZIP error goes away, capice?

    Plugin Author Neah Plugins

    (@gplsaver)

    I will try to reproduce this error and fix. I will notify as soon as i find something. the hard part is that i can’t reproduce it. there might be a conflict with another plugin that might not be obvious. sorry you had a hard time with this.

    Thread Starter birous

    (@birous)

    Try this settings

    General Options
    Base Location – Brazil-Sao Paulo
    Selling Location(s) – Sell to All Countries
    Shipping Location(s) – Disable shipping & shipping calculations
    Default Customer Location – Shop base address

    Try to complete a checkout as an user (use ZIP 29060110 for your address) and as a visitor

    Plugin Author Neah Plugins

    (@gplsaver)

    alright i will try it and let you know. thanks.

    Plugin Author Neah Plugins

    (@gplsaver)

    Tried all different ways and could not duplicate the error. All I can suggest at this point is to maybe see if there is a conflict with the theme or other plugins. I can’t duplicate the problem and I have asked other people to test with the same result. This probably does not work for you but you can basically disable zip code validation by adding this to your function.php.

    
    add_filter( 'woocommerce_validate_postcode', function($valid, $postcode, $country){return true;},100 )

    like i said this probably would not work for you since it would return ALL zip codes all valid which is probably what you don’t want. but i thought I would mention it anyway. Thank you.

    After adding the filter above, I did an order and it added a “United States (US)” at the end of the <address>.
    See here:
    Shipping

    Here is my setup in Woo
    Woo Settings

    Plugin Author Neah Plugins

    (@gplsaver)

    Ok. Remove that filter and replace it with this

    add_filter( 'woocommerce_default_address_fields' , 'gpls_woo_rfq_postcode_validate',100,1 );
     
    function gpls_woo_rfq_postcode_validate( $address_fields ) {
      $address_fields['postcode']['validate'] = array();
      return $address_fields;
    }

    Unfortunately that didn’t work either.

    So even with my Billing Country set as Australia, the input value remains as “US”.
    Billing Country Input

    So I’ve added some jQuery that does the trick.

    jQuery(document).ready(function() {
        jQuery(input[name="billing_country"]).val('AU');
    });
    Plugin Author Neah Plugins

    (@gplsaver)

    @thomasparkes,
    Thanks for sharing the workaround. That gave a good hint to the source of problem. I think it is fixed now in 1.7.986.

    Thank everyone for their patience with this.

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘Please enter a valid postcode/ZIP’ is closed to new replies.