Make WooCommerce checkout shipping fields visible and remove "Ship to different address?" checkbox

0

Issue

I am wondering if there is a way to remove the checkbox "Ship to a different address?" in woocommerce checkout page, but keep the shipping fields visible. I have tried:

add_filter( 'woocommerce_cart_needs_shipping_address', '__return_false');

It works, however it won’t show any field in the "shipping field tab".

Solution

If you want the shipping address fields to always be visible you can use CSS.

Try adding these lines to your active theme’s stylesheet:

/* hides the checkbox */
#ship-to-different-address-checkbox {
    display:none;
}

/* disable touch event or mouse click */
#ship-to-different-address label {
    pointer-events: none;
}

If you want you can translate the text Ship to a different address? using any translation plugin. For example Polylang or Loco Translate.

Answered By – Vincenzo Di Gaetano

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More