Remove WooCommerce Billing Address Fields for Free Checkout
It can be a hassle to fill out your billing address if you aren’t actually paying any money. This plugin removes the billing address fields from WooCommerce checkout when the cart total is 0, ie: Free. Specifically the following fields are removed: billing_address_1 billing_address_2 billing_city bi
About this tool.
It can be a hassle to fill out your billing address if you aren’t actually paying any money. This plugin removes the billing address fields from WooCommerce checkout when the cart total is 0, ie: Free.
Specifically the following fields are removed:
- 01billing_address_1
- 02billing_address_2
- 03billing_city
- 04billing_state
- 05billing_postcode
- 06billing_country
- 07billing_phone
That’s it!
Support
Support is handled in the WordPress forums . Please note that support is very limited. Before posting a question, please confirm that the problem still exists with a default theme and with all other plugins disabled.
Please report any bugs, errors, warnings, code problems to Github
A closer look.
Getting started.
- 01Upload the plugin folder to the /wp-content/plugins/ directory
- 02Activate the plugin through the ‘Plugins’ menu in WordPress
Frequently asked questions.
How to exclude billing phone field from removal?
To achieve this you can add the following snippet to your theme’s functions.php or via the Code Snippets plugin .
/** * Do not remove billing phone * * @param array $fields The billing fields we are removing * @return array */ function kia_do_not_remove_billing_phone( $fields ) { return array_diff( $fields, array( 'billing_phone' ) ); } add_filter( 'wc_billing_fields_to_remove_for_free_checkout', 'kia_do_not_remove_billing_phone' );