I’d like to reverse the behavior of “Ship to a different address” checkbox on checkout page. When its checked, Shipping form goes hide and Billing form takes the information. I found and changed this line in checkout.js
$( 'div.shipping_address' ).hide();
if ( $( this ).is( ':checked' ) ) {
$( 'div.shipping_address' ).slideDown();
}
to
$( 'div.shipping_address' ).slideDown();
if ( $( this ).is( ':checked' ) ) {
$( 'div.shipping_address' ).hide();
}
it works fine (display as reverse) but when we place order the shipping-form data also updating. How to fix it?
Below code will prevent updating shipping-form data during place an order