WooCommerce PHP Beginner Requires WooCommerce

Untick “Ship to a Different Address” by Default

Start the classic checkout with "Ship to a different address?" unticked, so most customers only fill in one address.

Tested on WordPress 7.1 PHP 8.3 Updated
functions.php 1 lines
add_filter( 'woocommerce_ship_to_different_address_checked', '__return_false' );

Where to add this

Recommended A code snippets plugin Survives theme changes and is easy to switch off.
Child theme At the end of your child theme's functions.php file.
Must-use plugin As a .php file in wp-content/mu-plugins, starting with <?php.

Always add PHP to a staging site first, or have FTP or file manager access ready, so you can undo it if something goes wrong.

Most customers ship to their billing address. If your checkout opens with the shipping address form expanded, they have to fill in or close an extra section. This snippet keeps it closed until they tick it.

How it works

The classic checkout reads woocommerce_ship_to_different_address_checked to decide the box’s starting state. Returning false starts it unticked. Customers can still tick it to enter a separate address.

Things to watch

  • WooCommerce’s “Shipping destination” setting under Settings → Shipping → Shipping options controls this too. The filter overrides it.
  • The block-based Checkout has its own “Use same address for billing” checkbox and doesn’t use this filter.

How to test it

Open checkout in a private window. The “Ship to a different address?” box should be unticked and the shipping form hidden.

This website uses cookies to enhance your browsing experience and ensure the site functions properly. By continuing to use this site, you acknowledge and accept our use of cookies.

Accept All Accept Required Only