Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix want to hide billing first name text box

Discussion in 'Misc WordPress Requests' started by s10dulkar, Dec 30, 2017.

  1. s10dulkar

    Guest

    want to hide billing first name text box, by s10dulkar

    it was working fine with code i added in functions.php file, but after updates now billing first name text box is not getting hidden. it always displays and its confusing for my clients what to put into it. please anybody help. i was using below code in functions.php
    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_state']);
    unset($fields['billing']['billing_phone']);

    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_city']);
    return $fields;
    }

    and it was working fine before

    i also tried using woo checkout manager and other plugins but nothing is hiding billing first name text box.

    want to hide billing first name text box
     
    #1

Share This Page

Monarch Social Sharing Plugin