If you have yet to install the WooCommerce plugin for your WordPress site, you may simply think of it as a simple, free plugin that does not offer much in the way of customization. In fact, you would be hard-pressed to find another plugin that offers the same levels of potential. Launched back in 2011, WooCommerce now supports an impressive slice of the evolving eCommerce market. In fact, this simple plugin boasts over 1.6 million downloads from users across the globe.
This open-source platform offers users numerous features, with a great user-friendly interface. This helps to make the WooCommerce plugin a great option for eCommerce start-ups looking to kickstart their online businesses. Also, this plugin won’t cost you an arm or a leg!
Being a free plugin hasn’t made WooCommerce a rigid platform. In fact, you will find there is actually a lot of room to customize and tweak your own online store to showcase the unique elements of your brand. In this article, we’re going to be focussing on how you can hide fields in your WooCommerce checkout.
WooCommerce Checkout Fields
If you’re already a WooCommerce user, you’ll be happy to hear that there is a handy plugin option that you can easily install for removing and creating new checkout fields. This is called Checkout Field Editor.
The WooCommerce Checkout Field Editor plugin will give you access to an interface where you can easily edit, remove and also add new fields to your checkout page. With this plugin, you’ll easily be able to add and remove fields from both the billing and shipping sections. You can also insert new fields after both of these sections next to the standard ‘order notes’.
It’s fairly easy to customize the checkout fields offered on your WooCommerce store. This can be done using both filters and actions. Installing the WooCommerce Checkout Fields Editor will override any code already implemented on your site.
How Are Checkout Fields Loaded in WooCommerce?
In WooCommerce, both the shipping and the billing fields available at checkout pull from both the get_address_fields function and the countries class. This allows users to either enable or disable fields in the WooCommerce checkout section based on the location of their users. Before returning these specific fields, WooCommerce will automatically put these different fields through a filter. This means that you can then edit the fields by themes and third-party plugins, as well as your own custom code.
If you choose to hook into the woocommerce_checkout_fields filter, you’ll easily be able to override any fields. If you’re looking to hide fields in your WooCommece checkout, you’ll need to target a specific field. To do this, you will first need to add the section where you’ll be able to locate the field. This will either be order, account, shipping or billing. Then, you’ll be able to specify the exact field. Once you’re able to remove a checkout field, you can then access countless options, including hiding certain fields.
As you can see, when it comes to WooCommerce checkout, there are a countless number of conditions you can choose to add on or change.
Already using the WooCommerce Checkout Field Editor plugin? Let us know what you think in the comments below.