/wp-content/plugins/wc-prov-cant-dist
directory, or install the plugin through the WordPress plugins screen directly.No configuration required. All locations are automatically loaded to state, city, and postcode fields. However, it has three optional configurations: The first one removes the plugin priority for fields state, city, and postcode and keeps using the WooCommerce priority. The second one hides the postcode on the Checkout page, shipping calculator form, and billing and shipping form pages. And the last one allows you to debug the js plugin file printing the .js instead of .min.js.
The distribution of Country > State > City-District > Postcode is loaded from a .json file located on /assets/js/prov-cant-dist.json.
Yes, it can be overridden from your custom theme directory using the filter wcpcd_prov_cant_dist_json.
= Is it possible to make it compatible with another country?
Now it is possible, simply override the prov-cant-dist.json file in your custom theme. Then you can add your country (based on WC country code) followed by states, cities-districts and postcodes. Use the filter wcpcd_prov_cant_dist_json
and the snippet from this gist
= Having problems with the data origin (locations)?
You can check if the file with locations is being loaded to your site, simply go to the section Testing JSON of Locations
in the settings page of the plugin. If there are problems loading this file, a message will be shown and with the instructions and the snippet required to load the locations from your custom theme. If the problem persists, send me an email using the Contact me
link.