Are you looking to change the “Ship to Different Address” field open by default on the checkout page, then here is the solution.
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
add_filter( 'woocommerce_ship_to_different_address_checked', '__return_true' );
add_filter( 'woocommerce_ship_to_different_address_checked', '__return_true' );
add_filter( 'woocommerce_ship_to_different_address_checked', '__return_true' );
Output
The output below shows that the “Ship to a different address” field is expanded by default on the WooCommerce checkout page, with the corresponding checkbox already enabled.

Sometimes, instead of having the shipping address option open by default, you can also hide the “Ship to a Different Address” Checkbox in WooCommerce checkout page.