72
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!
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://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://tutoraspire.com
*/
add_filter( 'woocommerce_ship_to_different_address_checked', '__return_false' );