WooCommerce: Simplify Free Checkout

If your WooCommerce store occasionally offers free products—whether as part of a promotion, a free trial, or a lead magnet—you may have noticed that the default checkout still displays all billing (and shipping) fields. This creates unnecessary friction for customers who don’t need to enter full address or payment information just to get something for free.

Thankfully, there’s a simple way to customize this behavior and show only the checkout fields you truly need. With a few lines of code, you can conditionally reduce the checkout form when there’s no payment required. This improves the user experience, boosts conversions, and keeps things clean and relevant.

I actually use this exact snippet on Business Bloomer whenever someone “purchases” one of my free WooCommerce mini plugins—just a name and email, no extra hassle.

In this example, we’ll indeed keep just the billing email and billing first name fields when the cart total is zero. You can easily tweak the snippet to include any other fields depending on your needs.

Here’s how to make it happen.

Screenshot: only billing first name and billing email are shown during free checkout on Business Bloomer.

PHP Snippet: Remove Unnecessary Fields at Free WooCommerce Checkout

This snippet hooks into the woocommerce_checkout_fields filter and checks whether the current cart requires a payment. If not—meaning everything in the cart is free—it replaces the full list of billing fields with a limited selection. In this example, only the billing_email and billing_first_name fields are retained.

You can adjust the in_array() list to include or exclude any field you want. For example, if you also need a phone number or custom field, just add it to the array (‘billing_phone’, etc.).

This approach helps streamline the checkout process for zero-cost orders, improves usability, and can increase freebie conversion rates without affecting regular paid checkouts.

/**
 * @snippet       Remove All Fields Except ___ @ WooCommerce Checkout
 * @tutorial      https://businessbloomer.com/woocommerce-customization
 * @author        Rodolfo Melogli, Business Bloomer
 * @compatible    WooCommerce 9
 * @community     https://businessbloomer.com/club/
 */

add_filter( 'woocommerce_checkout_fields', 'bbloomer_free_checkout_display_only_these_fields', 99999999 );

function bbloomer_free_checkout_display_only_these_fields( $fields ) {    
    if ( WC()->cart && ! WC()->cart->needs_payment() ) {
        $free_fields = [];
        foreach ( $fields['billing'] as $key => $value ) {
            if ( in_array( $key, [ 'billing_email', 'billing_first_name' ] ) ) {
                $free_fields['billing'][$key] = $value;
            }
        }
        return $free_fields;
    }
    return $fields;
}

Where to add custom code?

You should place custom PHP in functions.php and custom CSS in style.css of your child theme: where to place WooCommerce customization?

This code still works, unless you report otherwise. To exclude conflicts, temporarily switch to the Storefront theme, disable all plugins except WooCommerce, and test the snippet again: WooCommerce troubleshooting 101

Related content

Rodolfo Melogli

Business Bloomer Founder

Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as an independent WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza. Follow @rmelogli

Questions? Feedback? Customization? Leave your comment now!
_____

If you are writing code, please wrap it like so: [php]code_here[/php]. Failure to complying with this, as well as going off topic or not using the English language will result in comment disapproval. You should expect a reply in about 2 weeks - this is a popular blog but I need to get paid work done first. Please consider joining the Business Bloomer Club to get quick WooCommerce support. Thank you!

Your email address will not be published. Required fields are marked *