WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Portugal ! (4 posts)

  1. velotastic
    Member
    Posted 1 year ago #

    Hi

    We're running Woocommerce 2.01 on our site: http://velotastic.co.uk.

    We've had a customer in Portugal contact us with an issue.

    When he selects his country at checkout the state/province/county box disappears.

    However this is a mandatory field so when he hits the place order button the site flags up that this field has not been completed.

    Is their either hack to put this field back on the site when Portugal is selected or alternatively a way of removing the form verification script for this box.

    many thanks

    Paul

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

  2. velotastic
    Member
    Posted 1 year ago #

    We have just done a bit more digging and done a short term fix by removing Portugal from the list of countries that a state field is not show in the class_wc_countries.php file.

  3. charliezl
    Member
    Posted 1 year ago #

    Yes I have the same problem, they need to fix this soon! All the surrounding countries are fine, just Portugal is causing this issue.

  4. charliezl
    Member
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic