My Country States For WooCommerce

By 2ByteCode

100+ active installationsVersion 1.2.0

Retired: this plugin will no longer be maintained. Get the same country states, and more, in the free All-in-One Utilities plugin.

Description

This plugin is being retired. It will no longer be maintained and will be closed soon.

The same country states are now part of the free All-in-One Utilities plugin (WooCommerce → Country States), along with many other tools for your site. Install it, turn on Country States, then deactivate this plugin.

With the All-in-One Utilities Woo Add-on you can also add, remove or hide the states of any country, for example ship only to Punjab while selling in Pakistan, or deliver only to California in the United States. Learn more.

My Country States For WooCommerce, the ultimate solution to a common WooCommerce limitation. As any international e-commerce store owner knows, providing a smooth and efficient checkout process is crucial. However, WooCommerce doesn’t include states or provinces for all countries by default, leading to frustrating manual entry for customers.

We’ve taken this challenge head-on and are proud to present a feature-packed solution. Our plugin adds support for over 160 countries, ensuring that when a customer selects their country, the corresponding states or provinces are automatically populated. No more tedious typing, no more errors in state names—just a seamless checkout experience that boosts user satisfaction and trust in your online store.

Whether you’re dealing with orders from Afghanistan to Zimbabwe, our plugin has you covered. It’s not just a time-saver; it’s an accuracy-enhancer. Shipping rates and tax calculations will be spot on, creating a more reliable shopping experience for your customers.

Key Features

  • Support for 160+ countries: No more missing states or provinces.
  • Automatic population: States are populated based on the selected country.
  • Error reduction: Eliminate mistakes from manual entry.
  • Seamless integration: Easy setup with no coding required. No admin settings as well. Just install, activate, and enjoy.
  • Works out of the box: A hassle-free enhancement to your WooCommerce store.

Upgrade your WooCommerce store today with ‘My Country States For WooCommerce.’ Elevate the user experience, increase operational efficiency, and drive customer satisfaction to new heights. Your global customers deserve nothing less.

Installation

Requieres WooCommerce

This section describes how to install the plugin and get it working.

From within WordPress

  1. Visit Plugins > Add New
  2. Search for My Country States For WooCommerce
  3. Install and activate My Country States For WooCommerce for WordPress from your Plugins menu from WordPress.

Manually

  1. Download the plugin.
  2. Unzip the file.
  3. Upload the my-country-states-for-woocommerce/ folder to the /wp-content/plugins/ directory by using cPanel or SFTP/FTP.
  4. Activate the plugin through the Plugins menu in WordPress.

FAQ

Is this plugin still maintained?

No. It is being retired and will be closed soon. Please switch to the free All-in-One Utilities plugin, which includes the same country states. Its Woo Add-on also lets you add, remove or hide the states of any country.

Does this plugin change the states WooCommerce already has?

No. Since 1.2.0 it only adds states for countries WooCommerce has none for. A country WooCommerce lists states for is left exactly as WooCommerce sets it.

How do I set up the plugin?

No configuration required. All states are automatically for countries whose states are not implemeted in the WooCommerce.

How can I customize the list of states for a country implemented by this plugin?

You can customize the list of states for any country by using the mcsfwc_states_of_{TWO_CHARACTER_COUNTRY_CODE_IN_LOWER_CASE} filter hook provided by the plugin. For example, if you want to override the states for Afghanistan, use mcsfwc_states_of_af filter hook, for Singapore use mcsfwc_states_of_sg filter hook

How can I customize the list of states for Afghanistan?

The mcsfwc_states_of_af filter hook allows you to customize the list of states for Afghanistan in your WooCommerce checkout or other parts of your site where states are listed.

Here is an example of how to use the filter in your theme’s functions.php file:

<?php
function custom_afghanistan_states( $states ) {
    $states = array(
        'BDS' => 'Badakhshan',
        'BGL' => 'Baghlan',
        'BAL' => 'Balkh',
        // Add your custom states here
        'KAB' => 'Kabul',  // Example: Adding a custom state
    );
    return $states;
}
add_filter( 'mcsfwc_states_of_af', 'custom_afghanistan_states' );
?>

Is there any interface in Admin panel where I can customize the States listing?

No, currently you can customize the states list using the avaibale filter hooks. We are planning to implemente this feature in the next paid version.

Screenshots

Changelog

1.2.0

  • Notice: This plugin is being retired and will no longer be maintained. Its country states are now part of the free All-in-One Utilities plugin.
  • Fix: No longer replaces the states WooCommerce already has for Croatia, Morocco and Saint Kitts and Nevis, so addresses saved with WooCommerce’s state codes stay valid.
  • Fix: The State field is now only shown and required for the countries this plugin adds states for. Other countries, such as Germany, Switzerland and New Zealand, are left as WooCommerce sets them, and the County field in the United Kingdom stays optional.
  • Fix: Removed duplicate states for the Bahamas, Luxembourg, Madagascar, the Marshall Islands, Russia and Vietnam.
  • Fix: Completed the list of Russian regions.
  • New: States for Kosovo.
  • New: A warning when All-in-One Utilities is active but its Country States feature is switched off, so the states aren’t lost when this plugin is deactivated.
  • New: Declared compatibility with WooCommerce High-Performance Order Storage and the Cart and Checkout blocks.
  • New: WooCommerce is now listed as a required plugin.
  • Update: Tested with WordPress 7.1 and WooCommerce 11.3.

1.1.0

  • Update: Check for compatibility with WC 9.0.1 and WordPress 6.6.1
  • New: Add support for the WooCommerce Cart and Checkout Blocks
  • Improvement: Code readability

1.0

  • Initial release.