• Resolved SplashMedia

    (@keith679)


    Good Morning

    Glitch ?

    when a user selects country it’s shows choices. For example if United Kingdom is chosen it’s should associate state/province of Aberdeen City, Aberdeenshire, Angus and so on, but it doesn’t have choices just a normal text field (blank) is this a glitch or is there a setting I’m missing ?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter SplashMedia

    (@keith679)

    Update !! It works for some countries as in USA,Canada, Afghanistan but after that it’s a hit or a miss ? What’s going on ??

    Thread Starter SplashMedia

    (@keith679)

    invoicing/includes/data/states.php doesn’t have GB states ?

    • This reply was modified 1 year, 10 months ago by SplashMedia.
    Plugin Contributor Brian Mutende

    (@picocodes)

    Hi,

    We don’t have UK states that’s why it displays a normal text box instead of a dropdown.

    We’ll discuss this internally but you can add the following snippet to your site as a quick fix. It adds UK counties as states.

    function getpaid_add_uk_counties_as_states( $states ) {
    
        $states['GB'] = array(
            'AV' => 'Avon',
            'BE' => 'Bedfordshire',
            'BK' => 'Berkshire',
            'BU' => 'Buckinghamshire',
            'CA' => 'Cambridgeshire',
            'CH' => 'Cheshire',
            'CL' => 'Cleveland',
            'CO' => 'Cornwall',
            'CD' => 'County Durham',
            'CU' => 'Cumbria',
            'DE' => 'Derbyshire',
            'DV' => 'Devon',
            'DO' => 'Dorset',
            'ES' => 'East Sussex',
            'EX' => 'Essex',
            'GL' => 'Gloucestershire',
            'HA' => 'Hampshire',
            'HE' => 'Herefordshire',
            'HT' => 'Hertfordshire',
            'IW' => 'Isle of Wight',
            'KE' => 'Kent',
            'LA' => 'Lancashire',
            'LE' => 'Leicestershire',
            'LI' => 'Lincolnshire',
            'LO' => 'London',
            'ME' => 'Merseyside',
            'MI' => 'Middlesex',
            'NO' => 'Norfolk',
            'NH' => 'North Humberside',
            'NY' => 'North Yorkshire',
            'NS' => 'Northamptonshire',
            'NL' => 'Northumberland',
            'NT' => 'Nottinghamshire',
            'OX' => 'Oxfordshire',
            'SH' => 'Shropshire',
            'SO' => 'Somerset',
            'SM' => 'South Humberside',
            'SY' => 'South Yorkshire',
            'SF' => 'Staffordshire',
            'SU' => 'Suffolk',
            'SR' => 'Surrey',
            'TW' => 'Tyne and Wear',
            'WA' => 'Warwickshire',
            'WM' => 'West Midlands',
            'WS' => 'West Sussex',
            'WY' => 'West Yorkshire',
            'WI' => 'Wiltshire',
            'WO' => 'Worcestershire',
            'ABD' => 'Scotland / Aberdeenshire',
            'ANS' => 'Scotland / Angus',
            'ARL' => 'Scotland / Argyle & Bute',
            'AYR' => 'Scotland / Ayrshire',
            'CLK' => 'Scotland / Clackmannanshire',
            'DGY' => 'Scotland / Dumfries & Galloway',
            'DNB' => 'Scotland / Dunbartonshire',
            'DDE' => 'Scotland / Dundee',
            'ELN' => 'Scotland / East Lothian',
            'EDB' => 'Scotland / Edinburgh',
            'FIF' => 'Scotland / Fife',
            'GGW' => 'Scotland / Glasgow',
            'HLD' => 'Scotland / Highland',
            'LKS' => 'Scotland / Lanarkshire',
            'MLN' => 'Scotland / Midlothian',
            'MOR' => 'Scotland / Moray',
            'OKI' => 'Scotland / Orkney',
            'PER' => 'Scotland / Perth and Kinross',
            'RFW' => 'Scotland / Renfrewshire',
            'SB' => 'Scotland / Scottish Borders',
            'SHI' => 'Scotland / Shetland Isles',
            'STI' => 'Scotland / Stirling',
            'WLN' => 'Scotland / West Lothian',
            'WIS' => 'Scotland / Western Isles',
            'AGY' => 'Wales / Anglesey',
            'GNT' => 'Wales / Blaenau Gwent',
            'CP' => 'Wales / Caerphilly',
            'CF' => 'Wales / Cardiff',
            'CAE' => 'Wales / Carmarthenshire',
            'CR' => 'Wales / Ceredigion',
            'CW' => 'Wales / Conwy',
            'DEN' => 'Wales / Denbighshire',
            'FLN' => 'Wales / Flintshire',
            'GLA' => 'Wales / Glamorgan',
            'GWN' => 'Wales / Gwynedd',
            'MT' => 'Wales / Merthyr Tydfil',
            'MON' => 'Wales / Monmouthshire',
            'PT' => 'Wales / Neath Port Talbot',
            'NP' => 'Wales / Newport',
            'PEM' => 'Wales / Pembrokeshire',
            'POW' => 'Wales / Powys',
            'RT' => 'Wales / Rhondda Cynon Taff',
            'SS' => 'Wales / Swansea',
            'TF' => 'Wales / Torfaen',
            'WX' => 'Wales / Wrexham',
            'ANT' => 'Northern Ireland / County Antrim',
            'ARM' => 'Northern Ireland / County Armagh',
            'DOW' => 'Northern Ireland / County Down',
            'FER' => 'Northern Ireland / County Fermanagh',
            'LDY' => 'Northern Ireland / County Londonderry',
            'TYR' => 'Northern Ireland / County Tyrone',
        );
        return $states;
    
    }
    add_filter( 'wpinv_get_states', 'getpaid_add_uk_counties_as_states' );
    Thread Starter SplashMedia

    (@keith679)

    Good Morning

    Did a temp fix for now added

    ‘GB’ => array( // Aberdeen states.

    ‘GB-ABE’ => __(‘Aberdeen City’, ‘invoicing’ ),

    ‘GB-ABD’ => __(‘Aberdeenshire’, ‘invoicing’ ),

    ),

    to invoicing/includes/data/states.php,

    I only need that 2 as local business.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘State / Province selector’ is closed to new replies.