Remove Woocommerce Checkout Fields With Brewpy


Woocommerce checkout fields remove

Quick and easiest way of removing Woocommerce field using Brewpy

As a fulltime WordPress Developer working with a clients on daily basis, I often get enquieries from the clients asking to do adjustments to their Woocommerce websites. Usual adjustments are making Woocommerce fields non-required or to completely remove Woocommerce checkout fields.

What is Woocommerce?

Woocommerce is the most popular plugin for WordPress when it comes to setting up shopping store on WordPress platform. With over 5 million active installations and 5 stars rating, Woocommerce is the ultimate tool for anyone looking to setup shop on website. Looks like Woocommerce never stops growing and currently 22% of the top 1 million ecommerce websites uses Woocommerce according to a research by hostingtribunal.com


Why remove WordPress Woocommerce checkout fields?

There can be many reasons why you may want to remove specific fielf from Woocommerce checkout page, our clients often change payment providers so need for a specific fields may become obsolete. Other reason is that you may switched to digital products and you may not need ZIP field for example. Luckily, with Brewpy you can remove any Woocommerce checkout field, no matter if it is on billing or shipping section.

How to remove Woocommerce checkout fields?

With brewpy, removing any field is easy and just a click away from you! First step is to visit Woocommerce checkout fields editor.

As you can see there is two tabs called "Billing fields" and "Shipping Fields", depending on which field you want to remove. For this example we will remove "Company" field from Shipping Fields so click "Shipping Fields" tab

Next step is to click "Activate this generator" to actually generate code with all fields currently active. Now click "Company" checkbox to remove this field from your checkout page. As you can see Brewpy auto-generated code, no need to refresh page or click buttons...sweet!

On the right side you can copy generated code which should look something like this:

<?php
	//Custom Woocommerce checkout fields remover generated by Brewpy.app
	add_filter( 'woocommerce_checkout_fields' , 'brewpy_wc_fields_remover_1640533419377' );
	function brewpy_wc_fields_remover_1640533419377( $fields ) {
	 unset( $fields['shipping']['shipping_company']);
	 return $fields;
	}
	?>

Next and final step is to add this code to your theme functions.php file. You can do it in two ways, through FTP and through WordPress Dashboard.

Add code to functions.php through Dashboard

To add code through Dashboard go to Appearance and then Editor. On the right side find file named functions.php and add code to bottom of the file and click save. Now you are done!

Add code through FTP

Open your favorite FTP tool and connect to your hosting provider where your WordPress website is hosted. Now go to "wp-content/themes/THEME/" and find functions.php file and right click and "Edit". Now add autogenerated code to the bottom and save file and reupload. You are done now!

Conclusion

Adding or removing fields from Woocommerce checkout page is easy as breeze with Brewpy. Now when all is done you may want to make woocommerce checkout fields not required