To customize the WooCommerce checkout and remove the address fields, you’ll typically want to create a child theme (to prevent updates from overwriting your changes) and then use hooks to modify the checkout page fields.
Here’s how to do it:
1. Add Custom Code in Your Child Theme’s functions.php
If you haven’t set up a child theme yet, it’s best to do that first so your changes are preserved during theme updates. Then, add the following code to the functions.php file in your child theme:
Explanation
Billing Fields: The woocommerce_billing_fields filter modifies the billing section. We unset all the address fields (like billing_address_1, billing_city, etc.).
Shipping Fields: Similarly, woocommerce_shipping_fields modifies the shipping section. The code unsets the address fields for shipping.
2. Optional: Disable Shipping Fields Entirely
If you don’t need shipping information at all, you can disable the shipping fields by adding this code:
3. Save and Test
After adding the code, go to your WooCommerce checkout page, and you should see that the address fields are removed from both billing and shipping sections.







