Make It Easy for Customers to Grab Your Freebies!
Do you sometimes offer fantastic free products in your WooCommerce store? Maybe it’s a special promotion, a valuable free trial, or a helpful lead magnet to build your customer base. That’s a smart move! However, you might have noticed that even when the order is completely free, WooCommerce still shows all those billing (and sometimes shipping!) fields at checkout. This can be a bit annoying for your customers – why do they need to fill out their full address if they’re not paying anything?
At CreateAgile, we understand that a smooth and easy experience is key to happy customers. That’s why we’re sharing a simple trick to make claiming your free products a breeze! With a tiny bit of code, you can tell your WooCommerce store to only show the essential information needed when someone is getting something for free. This means less hassle for your customers, potentially more people grabbing your freebies, and a cleaner checkout process overall.
Think about it: You’re offering a free sample of your amazing new product. A customer clicks “add to cart” and proceeds to checkout, only to be faced with a long form asking for their address and payment details – even though the total is $0! This extra step might make them think twice. But what if they only saw a field for their name and email? Much simpler, right?

Here’s how you can make this happen in your WooCommerce store:
This little piece of code tells your website to check if the customer’s cart is empty (meaning they don’t owe anything). If it is, it will only show the billing email and billing first name fields. You can even tweak it to ask for other info if you need it!
/**
* @snippet Remove All Fields Except Email & First Name @ WooCommerce Free Checkout @ CreateAgile
* @tutorial [Internal CreateAgile Knowledge Base Link Here]
* @author CreateAgile Team
* @compatible WooCommerce 9+
*/
add_filter( 'woocommerce_checkout_fields', 'createagile_free_checkout_display_only_these_fields', 99999999 );
function createagile_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 Do You Put This Code?
Don’t worry, it’s not as scary as it looks! The best place to add this code is in the functions.php file of your child theme.
What’s a child theme? Think of it as a safe place to make changes to your website without messing up your main theme. If you don’t have one set up, it’s a good idea to create one (you can usually find easy tutorials online by searching “how to create a WordPress child theme”).
How do I access functions.php? You can usually access your website’s files using something called FTP (File Transfer Protocol) or sometimes through the “Theme File Editor” in your WordPress dashboard (though FTP is generally recommended for code changes).
Make It Your Own!
See those lines in the code that say [ ‘billing_email’, ‘billing_first_name’ ]? That’s where you tell WooCommerce which fields to keep. If you also want to ask for a phone number for your freebies, you could add ‘billing_phone’ to that list, like this: [ ‘billing_email’, ‘billing_first_name’, ‘billing_phone’ ]. Just add the “code” name of the field you want to keep!
Why This is Great for Your Shop:
- Happier Customers: Less filling out forms means a quicker and easier experience for people getting your free stuff.
- More Freebie Downloads: When it’s super easy, more people are likely to grab your free offers.
Cleaner Checkout: Your checkout page will look less cluttered when no payment is involved. - Focus on What Matters: You get the essential info you need without asking for unnecessary details.
By adding this little snippet to your website, you can make a big difference in how your customers experience your free products. It’s a simple way to make your shop even more user-friendly and potentially boost your conversions!
Ready to give it a try? If you’re not comfortable editing code yourself, you might want to reach out to your web developer for assistance. They’ll be able to quickly and safely add this to your website for you!