How to Remove Field in Billing Address From Checkout in Magento 2

How to Remove Field in Billing Address From Checkout in Magento 2

As an online store owner, it is your responsibility to optimize the checkout step and make it easy for the customer to complete their order.

According to Baymard, 21% of US online shoppers have abandoned an order in the past quarter solely due to a “too long/complicated checkout process”.

A complex checkout process can break a sale and prompt customers to bounce to your competitor.

In order to avoid such things in Magento 2 store, remove the extra fields that are unnecessary for your business.

For example, if you are offering a downloadable product type, you can afford to remove the city field. Downloadable products need not get delivered to a physical address.

Depending on the business requirements, you may skip collecting customer details on the checkout that are not necessary for marketing purpose or for order completion.

The programmatic solution to remove field in billing address from checkout in Magento 2 is given below using layoutprocesser.

Solution to Remove Field in Billing Address From Checkout in Magento 2:

  1. Create di.xml file at app/code/vendor/Exenstion/etc/frontend
  2. Create BillingAddressLayoutProcessor.php file at app/code/vendor/Exenstion/Plugin/Checkout
    In the above code, make changes in ‘remove_field’ to remove the desired field based on your requirement.

That’s it.

Questions related to this post? Feel free to ask in the Comment section below.

I would be happy to answer your questions.

Do consider sharing this post with Magento Community via social media.

Thank you.

Get Weekly Updates

Never miss Magento tips, tricks, tutorials, and news.

Thank you for subscribing.

Something went wrong.

5
(based on 12 Reviews)

Dipak is a Magento Developer at Meetanshi. Apart from work, he loves playing cricket with his friends. Traveling and exploring new places is something that he is passionate about.

Leave a reply:

Your email address will not be published.