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 CheckboxWooCommerce 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 CustomizeWoo.com FREE
 * @author        Rodolfo Melogli
 * @testedwith    WooCommerce 3.9
 * @donate $9     https://businessbloomer.com/bloomer-armada/
 */


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 CustomizeWoo.com FREE
 * @author        Rodolfo Melogli
 * @testedwith    WooCommerce 3.9
 * @donate $9     https://businessbloomer.com/bloomer-armada/
 */

add_filter( 'woocommerce_ship_to_different_address_checked', '__return_false' );
Share:

Leave a Reply