• Resolved ababinchak

    (@ababinchak)


    We have many non-USA customers. They used to be able to sign-up but can’t anymore. The form doesn’t accept their zipcode. For example select Manatoba but when you put in a zip code for them it kicks it out as invalid

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @ababinchak,

    What is the error you’re seeing?

    1. Is it this one? https://imgur.com/a/Z1rmtxX (apologies for bad quality – it was difficult to capture this error in a screenshot)

    2. Or is it a MailChimp error, like “Invalid MERGE field: Zip is invalid.”

    If it’s the first one, check out this article, https://yikesplugins.com/support/knowledge-base/received-following-error-error-address-field-please-enter-complete-address-may-want-consider-defaulting-zip-code/, specifically the section “How to use our filter to remove the zip code regex validation.”

    Cheers,
    Kevin.

    Thread Starter ababinchak

    (@ababinchak)

    Kevin,

    Yes it’s the first one. I’ve read the article and I think not validating the field will be fine. Where to I find this filter file?

    Amy

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi Amy,

    You need to add the following function to your site. The best place to add functions is to your child theme’s functions.php file. If you’re not using a child theme, I would recommend adding it to your theme’s functions.php file or using a plugin like My Custom Functions.

    This is the function.

    /**
    * Change the zip code regular expression to allow any characters.
    *
    * @param string | $regex_pattern| The regular expression used to validate the zip code
    * @param int	| $form_id	| The ID of the current form
    */
    function yikes_mailchimp_remove_zip_code_validation( $regex_pattern, $form_id ) {
    	return '.*';
    }
     
    add_filter( 'yikes-mailchimp-zip-pattern', 'yikes_mailchimp_remove_zip_code_validation', 10, 2 );

    Let me know if you need any help adding it to your site. You should be aware that editing your site’s code can temporarily break your website!

    All the best,
    Kevin.

    Thread Starter ababinchak

    (@ababinchak)

    That did the trick. Thanks!

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    You’re welcome!

    I apologize again about the hassle. I’ve had a lot of frustration trying to work with MailChimp address fields and I think everyone else has too.

    Cheers,
    Kevin.

    • This reply was modified 6 years, 6 months ago by yikesitskevin.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘No long allowing non-USA registrations’ is closed to new replies.