As you know, WooCommerce allows you to sell only in specific countries, like only in Italy or in Unites States.
What if you want to sell only in a specific province, or only in California for example?
There’s a little snippet of code to add to your site. In this example i want to sell only in California so i need to update the states dropdown in the checkout page to include only that state.
To do so, open your functions.php file located in wp-content/themes/your-theme-name/ and add this code at the end of the file:
<?php first line if you are having errors come up after saving the file.*
Done! Now you will see only California in the states dropdown on your checkout page.
If you need a list of all the states/regions/provinces/counties available in WooCommerce, you can find them in wp-content/plugins/woocommerce/i18n/states/.