I tried to hide the country field in the checkout page and billing page. Here's my code :

<item name="region_id" xsi:type="array">
    <item name="visible" xsi:type="boolean">false</item>
    <item name="config" xsi:type="array">
        <item name="componentDisabled" xsi:type="boolean">true</item>
<item name="country_id" xsi:type="array">
    <item name="visible" xsi:type="boolean">false</item>

I could do checkout when i remove this code :

<item name="country_id" xsi:type="array">
    <item name="visible" xsi:type="boolean">false</item>

But, when i remove it, the country field still appeared. How can i hide the country field? I can't hide with CSS because the class for country field is class="field _required"

  • why do you want to remove?
    – Amit Bera
    Commented Sep 28, 2018 at 4:20
  • cause it's only in my country, and it should be default choose only 1 country Commented Sep 28, 2018 at 6:10
  • .fieldset.address div[name="shippingAddress.country_id"] {display: none;} Commented Feb 15, 2022 at 18:55

1 Answer 1


You can do this using plugin:

  $visible = [
       'visible' => false

  $country = &$jsLayout['components']['checkout']['children']['steps'] 

  $street = array_merge($country, $visible);
  • 1
    @AdityaShah @ Rutvee please be kind to each other. You are both wonderful people for helping out others with answers to their questions Commented Sep 28, 2018 at 9:42
  • hi @RutveeSojitra, i tried your pluggin, but it made the checkout page just blank, is there something wrong i did? Commented Oct 1, 2018 at 7:09
  • It's work for me, you just need to pass ['children']['company']['visible'] = false if you want to hide company field. +1 for this :) Commented Sep 3, 2019 at 10:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.