Patrick's Programming Blog

Remove Billing Address for Free Virtual Orders in WooCommerce

writing
  1. Blogging for Benjamin Competition
  2. Why I'm Grateful to Work on the Web
  3. 24 Pull Requests
  4. Update Downloadable Product's Expiration Date in WooCommere
  5. Get Lost in the Flow and Work for More Than a Salary
  6. Why A Plugin's Popularity Matters
  7. Why You Should (Or Shouldn't) Use Premium Plugins
  8. WooCommerce Terms & Conditions
  9. Only Ship to Continental United States with WooCommerce
  10. Just Talk
  11. Why I Love Jetpack
  12. Making Jetpack Better
  13. Remove Billing Address for Free Virtual Orders in WooCommerce
  14. Notify Admin of Customer Address Change in WooCommerce
  15. Open Your Self Up To New Possibilities
  16. 2013 Resolutions Review
  17. Create a Community
  18. Tips for Starting a Community
  19. The Intent of Goals
  20. Create The Ultimate Invoicing System Using WooCommerce
  21. Change From Address in Ninja Forms
  22. Work With People Who Inspire You
  23. Contact Form 7 & MailPoet Integration
  24. Monotasking
  25. Giving Back to The Community
  26. Adding Fuctionality to Lean Plugins
  27. Choose Stripe For a Payment Gateway
  28. A Dip Into Entrepreneurship
  29. Reward Yourself
  30. Blogging for Benjamin Plugin
  31. Blogging for Benjamin Wrap Up

One of the best things about WooCommerce is the slick one page checkout. It's really fast since you don't need to reload any pages and it's smart enough to know when you don't need shipping information when you're only purchasing virtual/downloadable products. We like to make sure the site manager has all of the data available to them so if you have a free download available on your site WooCommerce still asks the user for all of their billing address fields which works great for most users.

Remove Billing Address Fields

The WooCommerce checkout page with the billing section removed.

If you don't need that extra data and would prefer fewer steps in the checkout process you can of course dig right into our awesome hooks system and remove those fields manually.

I wanted to look into this so I created a mini plugin which removes the billing fields if the order doesn't require shipping and if the order total is exactly zero. I’m including the plugin here for you to look at the code but you can also go the plugins home page and download it, extract the zip file, and upload the folder to your /wp-content/plugins/ directory of your site.

Modifying the Checkout Form Labels

Since this plugin removes all of the billing fields we should also probably remove the “Billing Address” header on the checkout page. I've gone ahead and removed it by using my favorite gettext filter and replacing the string with an empty string.

If you're using a different language you'll have to change my gettext filter or go into the woocommerce/templates/checkout/form-billing.php template and modify it. Here's a handy guide to modifying WooCommerce templates.

I hope this helps make your checkout page a little more slick! 🙂

Update 2014-04-25

Due to many of the comments I decided to update this script so that it removes all of the billing fields except the email field. This way you capture their email address and downloadable files can be emailed to them. If you want the older version which removes all of the fields go to the plugin homepage and click on Revisions to access the earlier versions.

Photo Credit: Abdulghani Alsooqi via Compfight cc

Exit mobile version