Home » WooCommerce: “Ship to a Different Address” Opened by Default

WooCommerce: “Ship to a Different Address” Opened by Default

by Tutor Aspire

When you have special shipping requirements, maybe you want checkout users to see the shipping form section visible on load.

Here’s how you do it. You’ll also find the opposite task in case you happen to have the shipping form opened by default and you want to hide it. Enjoy!

WooCommerce Ship to Different Address Checkbox
WooCommerce Ship to Different Address Checkbox

PHP Snippet: Open “Ship to A Different Address” by Default @ WooCommerce Checkout

/**
 * @snippet       Open Ship to Different Address @ Checkout Page
 * @how-to        Get tutoraspire.com FREE
 * @author        Tutor Aspire
 * @testedwith    WooCommerce 3.9
 * @donate $9     https://www.tutoraspire.com
 */


add_filter( 'woocommerce_ship_to_different_address_checked', '__return_true' );

PHP Snippet: Close “Ship to A Different Address” by Default @ WooCommerce Checkout

/**
 * @snippet       Close Ship to Different Address @ Checkout Page
 * @how-to        Get tutoraspire.com FREE
 * @author        Tutor Aspire
 * @testedwith    WooCommerce 3.9
 * @donate $9     https://www.tutoraspire.com
 */

add_filter( 'woocommerce_ship_to_different_address_checked', '__return_false' );

You may also like