• Skip to primary navigation
  • Skip to main content
  • Skip to footer
Essential Premium WooCommerce Plugins - WP Desk
  • Plugins
  • Bundle
  • Support
  • Blog
  • My Account
  • 0

Stay updated on our how-to articles

WP Desk news, WooCommerce tips, promo codes - right to your inbox.

By entering your e-mail, you agree to our Terms & Conditions and Privacy Policy.

Tomasz Drzewiecki

How to show or hide a WooCommerce checkout field for a specific country

Updated: December 19, 2022 / Plugin Tutorials

Setting a shipping zone for a country opens the way to show or hide a WooCommerce checkout field only for customers from that country. All the necessary functions are included in the PRO version of the Flexible Checkout Fields plugin. This is mainly because it supports conditional logic on the Checkout based on shipping methods. See how to hide checkout fields in WooCommerce based on the country dropdown value.

Have you ever wanted to hide or add some of the checkout fields in WooCommerce based on the shipping zone or country? For example, to avoid questions from clients from one country about a certain checkout field that you need for the specific zone/ country?

Today, I will show you how to customize the WooCommerce checkout based on the country field with the Flexible Checkout Fields plugin! Hide checkout fields in WooCommerce in a few minutes!

Table of contents

  1. Customize checkout fields in WooCommerce
  2. How to show and hide WooCommerce Checkout fields - steps
    • Set up a separate shipping zone
    • Conditional Checkout Fields for a specific country
    • Hide WooCommerce checkout fields based on country dropdown
  3. Summary - WooCommerce checkout fields based on country

Customize checkout fields in WooCommerce

Flexible Checkout Fields is a plugin for easily customizing the Checkout page. Its field management is also very simple and comes with one click. The Pro version also has the option of using conditional logic. Thanks to this function it is possible to show or hide a checkout field only if a specific condition (or several of them combined) is met.

The WooCommerce checkout customizer plugin I will use:

Flexible Checkout Fields PRO WooCommerce £59

Remove country from WooCommerce checkout. With Flexible Checkout Fields, it's easier than never! Find out how to hide the country field and other checkout fields in WooCommerce!

Add to cart or View Details
WP Desk
80,000+ Active Installations
Last Updated: 2023-03-15
Works with WooCommerce 7.1 - 7.5.x

See how to hide checkout fields in WooCommerce

There are three types of rules to choose from:

  • conditional logic based on a product or category
  • conditional logic based on the checkbox/radio/select field added by the plugin
  • and conditional logic based on the shipping method
woocommerce hide checkout fields
Conditional Logic will help you to remove a country from the WooCommerce checkout

At first glance, there is no way to set conditional logic based on the selected option in the country field. But in practice, we get this functionality by using the shipping method, as a rule, to show or hide a WooCommerce checkout field because shipping methods are assigned to specific locations (like country).

Show/ hide WooCommerce Checkout fields - steps

Step 1: Set up a separate shipping zone

  1. Add a new shipping zone.
    WooCommerce > Settings > Shipping zones > Add shipping zone
  2. Set up the shipping zone.
    1. Enter a name.
    2. Select the country.
    3. Add at least one shipping method.
  3. Configure shipping methods.
  4. Organize shipping zones. 📦

    If the country, is in more than one shipping zone - please drag the newly created zone and drop it over the other zone. In this example, Poland also belongs to the "Europe" shipping zone. That is why the "Poland" zone should be placed above the "Europe" zone.

WooCommerce options are often insufficient - use the Flexible Shipping plugin to expand the functionality and shipping configuration.
woocommerce hide country field
Add shipping zone first

 

WooCommerce set shipping zones
Set up the shipping zone in WooCommerce

 

woocommerce checkout country dropdown shipping methods options
Configure shipping methods to set the default country at WooCommerce checkout

 

WooCommerce shipping zones - shipping methods for country
Organize zones and their shipping methods

 

Step 2: Configure conditional logic in Flexible Checkout Fields for a specific country

  1. Select the tab where you want to set the field with conditional logic (e.g. "Billing").
  2. Add a new field or select an existing one.
  3. Select the "Conditional Logic" tab and check the "" checkbox.
  4. Leave "Show this field if" turned on and click "Add rule".
  5. Select the created shipping zone along with the assigned shipping method. Then follow this step for each shipping method assigned to that shipping zone.
  6. Save.
woocommerce checkout fields for country dropdown
Choose a new checkout field
woocommerce checkout country dropdown
WooCommerce hides checkout fields based on the shipping zones

Step 3 - Hide WooCommerce checkout fields based on country dropdown

As a result - the field modified this way will be now hidden🥷🏽. But it will become visible when the customer selects this particular country in the "Country/Region" field. Also, it is possible to apply the opposite criterion - just select the "Hide this field if" option to hide that field from the customer.

hide WooCommerce fields based on the country dropdown value
Hide WooCommerce fields based on the country dropdown value

 

Flexible Checkout Fields show/ hide a field
The visible field for the selected value from the country dropdown in the WooCommerce checkout

PRO TIP - WooCommerce Debug mode

WooCommerce "Debug mode" is a helpful tool that shows at the Checkout if the customer from the selected country belongs to the dedicated shipping zone. Remember to turn it off before launching the store.

WooCommerce > Settings > Shipping > Shipping options > Enable debug mode

Summary - WooCommerce checkout fields based on country

In conclusion - there are many situations where it may be useful to customize the WooCommerce Checkout that way. Show or hide country-targeted fields to:

  • collect address data of better quality
  • place messages and labels in the language of a specific customer
  • decide whether the field for a given country will be required or not
  • and a lot more!

It is possible to test our plugin in action - our demo is waiting.

Flexible Checkout Fields PRO WooCommerce £59

Remove country from WooCommerce checkout. With Flexible Checkout Fields, it's easier than never! Find out how to hide the country field and other checkout fields in WooCommerce!

Add to cart or View Details
WP Desk
80,000+ Active Installations
Last Updated: 2023-03-15
Works with WooCommerce 7.1 - 7.5.x

Read more about shipping methods

  • Hide checkout fields based on the shipping method in WooCommerce

    remove shipping address woocommerce
    How to remove a shipping address (WooCommerce)? In this article we give you tips on how to remove a shipping address in WooCommerce.

  • Flexible Shipping - the best shipping plugin for WooCommerce

    shipping plugin woocommerce
    Flexible Shipping: The best shipping plugins - Don't let shipping cost you sales! Customize the WooCommerce shipping methods in the easiest and fastest way.

Tweet

3 minutes read11395 views

Tomasz Drzewiecki

From 2020 in WP Desk. First as a Happiness Engineer in the Rangers team. Now as a QA Engineer in the Sailors team.

Powered by WP Desk

WP Desk brings you great WooCommerce plugins. We strive to save your time and money by speeding up your processes. Use our plugins to build a better store. Awesome support included in the package.

Premium WooCommerce Plugins →

Stay updated on our how-to articles

WP Desk news, WooCommerce tips, promo codes - right to your inbox.

By entering your e-mail, you agree to our Terms & Conditions and Privacy Policy.

WP Desk › Plugin Tutorials › How to show or hide a WooCommerce checkout field for a specific country

Footer

WP Desk - WooCommerce Plugins

At WP Desk we create great WooCommerce plugins with awesome support. Save time and money with our e-commerce solutions. See how we can help you improve your e-store →

Secured by Comodo

WP Desk

  • About us
  • Giving Back
  • Blog
  • Contact us

Products

  • Premium Plugins
  • Get Support
  • WooCommerce Invoices
  • Email Marketing
  • Octolize

Legal

  • Terms & Conditions
  • Refund Policy
  • Support Policy
  • Privacy Policy

© 2023 WP Desk