This post will contain of two parts, depending on the reason you're reading this you'd want to skip one of them. 

In the first part I'll show how you can completely remove all the shipping fields, forcing the customer to ship their order to the billing address.
Skip to the second part in case you want to only remove the 'Ship to another address option' and force the customer to enter both a billing AND a shipping address.

Removing the Shipping Fields Completely

If your country or store only allow for shipping to the billing address of the customers there's no need to show the additional options to enter the shipping fields. Luckily there's an option available in WooCommerce to easily remove the shipping fields, without the need of a code snippet.

Head over to the WooCommerce > Settings > Shipping > Shipping Options section. On that page you'll find the 'Shipping destination' setting, which allows you to control which checkout fields should be used.

Use the 'Force shipping to the customer billing address' option to remove the shipping fields completely and use the billing fields for both billing and shipping. Plus points for WooCommerce on this, they automatically change the heading to show 'Billing & Shipping' on the checkout.

Remove the 'Ship to another address' Option and Force a Shipping Address

Although there's a setting in WooCommerce to check the 'Ship to another address' by default, it doesn't force entering the shipping address separately. To force the customer to enter both their billing and shipping address you can use the following code snippet to hide the 'Ship to another address' option.

Unfortunately this isn't a 100% waterproof solution as users with enough knowledge and willingness will be able to discover the hidden checkbox and show it / be able to uncheck it. WooCommerce (3.3.3) at the moment of writing does allow for a waterproof solution to force entering the shipping address fields. IF someone does uncover and uncheck the checkbox, the only thing they will be able to do is force the shipping fields to the billing address.

Although the code snippet overrides the "Shipping destination" setting in WooCommerce, be sure to NOT have it set to "Force shipping to the customer billing address". If you do WooCommerce may give some other unexpected results.

About the author: Jeroen Sormani is actively building WordPress, WooCommerce and Easy Digital Downloads plugins. Slightly obsessed by writing high quality code.
Follow Jeroen on Twitter

2 comments

Leave a Reply

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