Woocommerce to Remove Shipping Address completely

by | Aug 2, 2013 | Business, Tools | 17 comments

In a recent Woocommerce update the steps in this tutorial stopped working. I’m searching for a new fix (for you, and for me).
woocommerce_logoFor the moment, these are the best tips I have on removing the shipping address completely from WooCommerce. Hats off to Marc Bell Marketing for his tutorial. I’ve made a few revisions to shorten up the task a little. I have had to repeat these steps after each Woocommerce update, so I thought it would be handy to have a post to easily reference before the next update inevitably happens. I hope it helps you too!

If you don't use Woocommerce, skip this blog post. 
It is information you don't need.

 

We’re doing this in two parts. The first one will remove the fields from the check out area (phone, country, province/state, etc) and the second part will remove the text “Billing Adress” from the checkout area. This part is a little finicky. You may want to use Dreamweaver to edit the files and upload via Filezilla (or your favorite ftp), or do what I did, and use the built in editor through the cpanel at Hostgator. Either way, be super careful with the last step. The first one won’t really damage anything, but in the 2nd part you really could create some serious problems with even just removing one extra little bracket or adding one letter in the wrong place.

Update: Since writing this post I’ve created a unique plugin for my website & instead of copying the code I provide for you in Step 1 to the Woocommerce plugin, I have now added the code to my own plugin & it should not be impacted by updates. Consider trying it too?  There’s a great tutorial here to create your own plugin. Then just copy the code I’ve given you into the new plugin.

Part 1: Remove unwanted fields from your checkout process

Step 1: Go to Dashboard > Plugins > Editor

 

Step 2: Select Woocommerce from the drop down menu and “select”

Step 3: Search for the plugin file named “Countries”

Note: I use Cntrl + F to “find” the word country on this page because this plugin has so very many .php files. You’re looking for the file with this name woocommerce/classes/class-wc-countries.php

Step 4: Paste this code directly below the last bracket & “Update File”

Update: After writing this, I realized I had literally include ALL fields in the list below. I ultimately want my customers to fill in their name and email address (so they can receive a receipt at the very least), so I’ve edited the code below. If you want absolutely everything gone, click through to the 1st .txt file I’ve included. The second .txt file include name & email address

// Hook in
add_filter( ‘woocommerce_checkout_fields’ , ‘custom_override_checkout_fields’ );

// Our hooked in function – $fields is passed via the filter!
function custom_override_checkout_fields( $fields ) {
unset($fields[‘order’][‘order_comments’]);
unset($fields[‘billing’][‘billing_company’]);
unset($fields[‘billing’][‘billing_address_1’]);
unset($fields[‘billing’][‘billing_address_2’]);
unset($fields[‘billing’][‘billing_city’]);
unset($fields[‘billing’][‘billing_postcode’]);
unset($fields[‘billing’][‘billing_country’]);
unset($fields[‘billing’][‘billing_state’]);
unset($fields[‘billing’][‘billing_phone’]);

return $fields;

}

Or Download the files:

Removing ALL field (including email address and name) .txt file

Removing all fields except first, last name & email address .txt file

 

Part 2:  Remove the words “Billing Address”

Step 5: Navigate to your file manager to WP-Content > Woocommerce > Templates > Checkout > form-billing.php

 

Be VERY Careful with this last step. I have copied the text here before making changes so I can paste it back again if I make a mistake

Step 6: Remove the words Billing Address from between the quotes. Leave the quotes.

Save the file & then refresh to make sure your shop page looks like it should.

 

Please, please be careful with this last step & only delete text between the ‘quote’ or replace new words in that one space.

And, let me know if this tutorial helped you by leaving a comment below or sending me a tweet with the buttons below.

News & Updates

Sign up for Biz Tips!

You May Also Like…

17 Comments

  1. Adam

    It was really helpful! Thank you very much!

  2. Brad

    Thanks for sharing. I would like to share one recently launched Woo-commerce Plugins named WC Checkout Fields Editor. Check: https://goo.gl/YpR4Nk
    It has features as,
    ~ Supports 11 custom fields
    ~ Edit existing fields(Billing/Shipping) support
    ~ Remove fields & Change display field order
    ~ Product specific field visibility
    ~ Category specific field visibility
    ~ File upload custom field in additional settings
    ~ Display in Order Details page and Email
    ~ Cart total specific field visibility
    ~ User friendly admin panel
    ~ Restore to Default fields
    ~ Translation Ready

  3. Saimon

    Thanks for this great tutorial. It works for me..

  4. Chris

    Hi!

    Thank you for this post…it works like a charm:) but i have one little problem, when update woocommerce php (…./wc countries.php) file, after paying for the product and go back to the shop i dont know why but download link disappeared. when I go back to the previous settings (delete your code) everything is fine, download button is visible.
    Can you help me with this?

    Best,
    Chris.

    • Loralee Hutton

      Sorry I’m just seeing this now Chris. I’m hoping you found a solution. Did you? If not, please send me a note through the contact page & I’ll write back right away. Sometimes my comments go into the wrong folder 🙂

      And, hopefully you also saw my notes in the post about not making the edits directly to the php file (it will be overwritten during every update – quite a hassle). Instead, I’ve made my own site plugin to handle the changes to functions.php

      Hope you’ve got things sorted out.

  5. Noëlle Steegs

    Before the WooCommerce 2.1 update, I used to have mandatory billing address and shipping address fields at check-out. But for some reason, they decided to remove this feature and now only the fields for the billing address were visible at check-out.

    Since WooCommerce is a free theme I do not have any right to get support from WooThemes, so I decided to use the last steps above to change the title “Billing Address” to “Shipping Address” and it works perfectly!

    Big thanks!

    • Loralee Hutton

      SO happy to hear this worked for you Noelle! I’m like you… no room to complain about a really awesome free plugin. And, I love that it’s popular enough that we can google pretty much any challenge and find a great solution.

  6. Mauro Mascia

    Try this:

    add_action( ‘woocommerce_checkout_init’, ‘override_woocommerce_checkout_init’ );

    function override_woocommerce_checkout_init( $checkout ) {
    remove_action( ‘woocommerce_checkout_shipping’, array( $checkout, ‘checkout_form_shipping’ ) );
    }

    😉

  7. uh

    You can use WooCommerce Poor Guys Swiss Knife to achieve nearly all of this: http://wordpress.org/plugins/woocommerce-poor-guys-swiss-knife/

    This plugin allows you to manage your checkout forms. We will update the plugin these days to add a possibility to change/suppress the section titles (Billing, Shipping)

    Regards.
    uh

    • Loralee Hutton

      Looks great! I’ll give this a try on my test site & add an update here soon. Thanks for letting me know.

    • Bob

      Can’t wait for the update!!!! Been waiting for this.

  8. Alex

    Hello there.

    This post name is Woocommerce to Remove Shipping Address [b]completely[/b] but you still can see shipping adress on page checkout/order-received and in mail template. It may be helpfy write about this too.

    Best wishes, Alex.

    • Loralee Hutton

      Hi Alex,
      Would you be willing to share a screenshot with me? There were two .txt files (one that completely removes addresses & one that maintains the email address) and from my tests they don’t show shipping on checkout or mail after removing them. If you’re seeing something different I’d love to see it & update the blog post accordingly.

      Thanks for the heads up.

      Loralee

  9. WPShowCase

    Machiel is correct that plugins shouldn’t be edited (to prevent update problems).

    The correct way to do this would be to create another plugin which changes how WooCommerce works … but the above is much simpler and great for a simple tutorial on how to get WooCommerce to hide the billing address.

  10. Machiel

    Hi Loralee,

    I did find what I was looking for, but editting third party plugins is a bad practice.

    Suggested is that you edit these fields in either your functions.php or a stand alone plugin. Other than it is advised to copy the WooCommerce templates to your theme directory.

    This is because when the plugins are updated, all your changes will be overwritten.

    Other than that, thanks for the info!

    • Loralee Hutton

      brilliant suggestion Machiel. So many people offer tutorials with edits to the plugin itself, that I too thought it was okay. I’ll edit this post soon with some links to editing function.php without blowing up everything too.

  11. Okto

    Technical things is my biggest obstacle in blogging. Thanks for this post. Bookmark it.

Trackbacks/Pingbacks

  1. 워드프레스 우커머스(WooCommerce)에서 배송주소 입력란 숨기기 - […] Woocommerce to Remove Shipping Address completely(WooCommerce 배송주소 완전히 없애기) […]
  2. Woocommerce checkout pagina - […] Al goochelend kwam ik op het internet dit handige stukje code (“snippet”) tegen op  loraleehutton.com […]
  3. How to write a great year end review - Loralee Hutton - […] Woocommerce – to Remove Shipping Address Completely […]
%d bloggers like this: