Remove extra checkout field

Home Forums Legacy Support Support queries Setup issues Remove extra checkout field

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #377000
    krishipathsala
    Spectator
    I want to remove the extra checkout filed but not the "phone" filed. How can I achieve this. https://ibb.co/K0tLCmw
    #377030
    Veronica
    Moderator
    hi for that you can directly apply. the custom CSS code on checkout page to hide the fields for that you can provide us details like checkout URL so we can directly give you the code also point out the fields that you want to hide
    #377119
    krishipathsala
    Spectator
    https://krishipathshala.in/course-checkout/ this is the checkout page link. but as the field are mandatory making hide usisng css will not solve the problem. https://ibb.co/N9Wx3Q9
    #377246
    Veronica
    Moderator
    hi have you enabled the setting you have shared above? as the setting should not disable the phone number setting
    #377350
    krishipathsala
    Spectator
    This reply has been marked as private.
    #377478
    Veronica
    Moderator
    hi for that please make sure that product should be virtual and downloadable
    #377794
    krishipathsala
    Spectator
    the product is automatically created whenever I created a course. So every time I have to create a course I have to make this changes? Is there any relation between not hiding phone number and making a product virtual and downloadable?
    #377852
    Veronica
    Moderator
    hi then you can go with this plugin: https://wordpress.org/plugins/woo-checkout-field-editor-pro/
    #378013
    MrVibe
    Keymaster
    via fb chat.
    remove_filter( 'woocommerce_checkout_fields' , 'woo_remove_billing_checkout_fields');
    add_filter( 'woocommerce_checkout_fields' , function( $fields ) {
        
        if( woo_cart_has_virtual_product() || woo_cart_has_variable_product() ) {
          
          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['billing']['billing_address_2']);
          unset($fields['billing']['billing_postcode']);
          unset($fields['billing']['billing_company']);
          unset($fields['billing']['billing_city']);
        }
        
        return $fields;
    });
Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Remove extra checkout field’ is closed to new replies.