Home Plugins all countries counties for wc
All Countries Counties For WooCommerce logo

All Countries Counties For WooCommerce

by hoshomoh on WordPress.org

A Wordpress WooCommerce Plugin that add counties/provinces/states for WooCommerce Countries

(2)
The WooCommerce state field converted to a drop down.

The WooCommerce state field converted to a drop down.

All Countries Counties For WooCommerce is a plugin that automatically pre-populate your WooCommerce state fields to allows customers select from preconfigured states rather than typing it in manually.

It also have support for local governments. So, countries whose states have local government would automatically have a local government dropdown field on checkout page.

The local government feauture is only available in Nigeria at the moment.

Supported Countries

  • United Kingdom
  • Nigeria
  • Chile
  • Kenya
  • Guatemala

= Overriding local governments in theme function.php

add_filter( 'wc_add_counties_local_government', 'my_custom_lga' );

function my_custom_lga( $local_governments ) { 
    my_custom_lga_array = [
        '' => __( 'Select an option...' , 'woocommerce' ),
        'Agege/ijaiye' => __( 'Agege/ijaiye', 'woocommerce' ),
        'Ajeromi/ifelodun' => __( 'Ajeromi/ifelodun', 'woocommerce' ),
        'Alimosho' => __( 'Alimosho', 'woocommerce' ),
        'Amuwo Odofin' => __( 'Amuwo Odofin', 'woocommerce' ),
        'Apapa' => __( 'Apapa', 'woocommerce' ),
    ];

    $local_governments['NG']['LA'] = my_custom_lga_array;

    return $local_governments;
}
Active installations30+
Weekly downloads
14-12.50%
Version1.1.1
Last updated3/19/2019
WordPress version4.1
Tested up to5.1.19
Tags
e-commercewoocommerce-chile-countieswoocommerce-countieswoocommerce-nigerian-stateswoocommerce-uk-provinces
All Countries Counties For WooCommerce | Plugin0