How to Add a Shipping Address to Virtual Products in WooCommerce

WooCommerce is one of the most popular eCommerce platforms in use today. The platform consists of a free WordPress plugin that includes the core. WooCommerce makes their money by selling extensions that add functionality to the free core.

Ever since I started using and configuring WooCommerce for my own web store and my clients, I’ve been amazed at all the great features that come with it at no cost. You can sell unlimited products, variable products, downloadable products, virtual products – you name it.

Connecting your site to Jetpack and WordPress.com gives you access to live shipping rates in the US & Canada (UPDATE March 1st, 2019: The live shipping rates are no longer a free service but you can buy the official USPS Shipping Method here). You can also purchase and print shipping labels for orders right within the back end of your store and you actually save money because WooCommerce gets commercial shipping rates instead of retail.

…But it Misses Some Basics

As much as WooCommerce does for free, there are some seemingly simple things it does not do without buying an extension.

One of the limitations is for free shipping options. While WooCommerce does offer a free shipping setting, it applies to an entire order. If you have a single item in your store that offers free shipping, a customer will be offered the free shipping method for their entire order even if it contains other items that should not be shipped for free.

Doesn’t make much sense, does it? Fortunately, there’s a popular workaround: configure items for free shipping as virtual items instead of simple items. Since virtual items aren’t tangible, WooCommerce skips them in the order when calculating shipping. In effect, you get a free shipping item.

Marking an item as Virtual is as simple as checking the box in WooCommerce

For 90% of online stores, this workaround is adequate. But I recently had a client who needed a bit more.

Shipping Addresses for Virtual Products

This client sold virtual products (downloadable software), but their sales department was required to mail out thank you cards to all customers including ones who bought virtual items. WooCommerce doesn’t collect a shipping address for virtual items and cannot be natively configured to do so.

There is an extension called Per Product Shipping by WooCommerce but it costs $79/yr. and the client wasn’t willing to pay that for what seemed to be a simple request.

In addition to that, the client required the new order emails to display the shipping address for all orders because these emails were used by the sales department who wouldn’t have access to the back end of the site. WooCommerce also doesn’t offer this function.

Step 2: Force WooCommerce to display a shipping address on every new order email

The second step, which takes a tiny bit more energy, is to edit the WooCommerce email address template to ensure that the shipping address is always displayed in the order emails.

FTP into your web server (or use CPanel) and navigate through your website’s directory structure to /wp-content/plugins/woocommerce/templates/emails/. In this folder, you’ll find a file called email-addresses.php. Place a copy of this file into your child theme’s /woocommerce/emails/ folder. There’s a good chance you’ll have to create this folder unless you’ve already modified the WooCommerce email templates.

Once you’ve placed the email-addresses.php file in there you’ll need to modify it. Search for this line:

Once you’ve made those changes, every new order email will contain both a shipping and billing address.

Final Thoughts

While WooCommerce includes a ton of useful features out of the box, the reality is that some things which seem to be pretty basic are sometimes missing. But frequently, with just a tiny bit of code, you can get the features you want.

Sharif Jameel is a business owner, IT professional, runner, & musician. His professional certifications include CASP, Sec+, Net+, MCSA, & ITIL and others. He’s also the guitar player for the Baltimore-based cover band, Liquifaction.

If you found the information in this post to be useful, please consider subscribing up to our email list. There's no spam, we currently only send emails once a month or less.

Sharif Jameel

Sharif Jameel is a business owner, IT professional, runner, & musician. His professional certifications include CASP, Sec+, Net+, MCSA, & ITIL and others. He’s also the guitar player for the Baltimore-based cover band, Liquifaction.