Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Add this code to your themes function.php file.

    add_action(‘admin_head’, ‘hide_address’);
    function hide_address() {
    ?>
    <style>
    table#fieldset-billing ,
    table#fieldset-shipping {
    display: none !important;
    }
    </style>’;
    <?php
    }

    Hope this will resolve your issue.

    Regards

    add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
     
    function custom_override_checkout_fields( $fields ) {
        unset($fields['billing']['billing_first_name']);
        unset($fields['billing']['billing_last_name']);
        unset($fields['billing']['billing_company']);
        unset($fields['billing']['billing_address_1']);
        unset($fields['billing']['billing_address_2']);
        unset($fields['billing']['billing_city']);
        unset($fields['billing']['billing_postcode']);
        unset($fields['billing']['billing_country']);
        unset($fields['billing']['billing_state']);
        unset($fields['billing']['billing_phone']);
        unset($fields['order']['order_comments']);
        unset($fields['billing']['billing_address_2']);
        unset($fields['billing']['billing_postcode']);
        unset($fields['billing']['billing_company']);
        unset($fields['billing']['billing_last_name']);
        unset($fields['billing']['billing_email']);
        unset($fields['billing']['billing_city']);
        return $fields;
    }
    Plugin Support Riaan K.

    (@riaanknoetze)

    Some cool answers here to date 🙂

    If you’re looking for a non-code approach, you could also make use of https://woocommerce.com/products/woocommerce-checkout-field-editor/

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘How to disable these fields in wp admin’ is closed to new replies.