WordPress.org

Support

Support » Plugins and Hacks » WooCommerce » Unable to checkout in Portugal-gives "State / County is a required field." Error

Unable to checkout in Portugal-gives "State / County is a required field." Error

  • I think this was an issue long ago for Countries without States or provinces.

    Anyways, Portugal has no state or provinces and the validation will not pass even though no option was given to input state or province.

    This issue occurred in 2.0.4.

    Can the validation for State/Prov be turned off if the Country do not have a State, other wise disable state as a whole.

    http://wordpress.org/extend/plugins/woocommerce/

Viewing 3 replies - 1 through 3 (of 3 total)
  • I have found the permanent fix for this. It seems to be the developer’s error for leaving Portugal out of the main countries array. Simplly add this piece of code

    'PT' => array(
    	'state'	=> array(
    	'required' => false
          ),
    ),

    to the get_country_locale() function of the class-wc-countries.php in woocommerce classes folder.

    I have the same problem, hope this fix solves the problem.

    Thanks, this fix worked perfectly for Portugal.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Unable to checkout in Portugal-gives "State / County is a required field." Error’ is closed to new replies.
Skip to toolbar