Can someone tell how can I remove the specific country from woocommerce. There is option in woocommerce that said selling locations with All countries and specific.
However I want to sell to all countries except the 1 country that is US for example! then how can I remove US from the countries list. As if I use “specific countries” option then I will have to add all the countries except the US which is longer process.
Is there any code you can help me with that I can put into functions of theme so that US country will not appear in the list of countries during checkout?
Try this following snippet
Reference
http://www.boopathirajan.com/remove-specific-country-woocommerce-country-list/
If you want to keep an array of countries, but you only have the keys, do something like this: