I have a webshop in 5 languages now and we sell and ship our products all over Europe. I’ve made custom checkout fields in WooCommerce without problems.
For 1 country (Norway) we need to add an extra field (PID number). That’s no problem, but it should only be visible for Norway. All other countries shouldn’t see this custom checkout field.
How do we make a custom checkout field for 1 Country only?
2
Answers
You can use Checkout Field Editor (Checkout Manager) for WooCommerce plugin to achieve your functionality for adding an consditional field on checkout.
First, follow the How to Add a Custom Checkout Field tutorial to add a new field to the checkout page. It seems you already got that covered (either manually or through a plugin).
Then, use this jQuery snippet on the checkout page to show and hide your custom field depending on the selected country.