Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #981657

    Hello,
    I had to remove some fields from WooCommerce checkuoy page and I used:

    add_filter( 'woocommerce_checkout_fields' , 'custom_remove_woo_checkout_fields' );
     
    function custom_remove_woo_checkout_fields( $fields ) {
    
        // remove billing 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['billing']['billing_email']);
       
        // remove shipping fields 
        unset($fields['shipping']['shipping_first_name']);    
        unset($fields['shipping']['shipping_last_name']);  
        unset($fields['shipping']['shipping_company']);
        unset($fields['shipping']['shipping_address_1']);
        unset($fields['shipping']['shipping_address_2']);
        unset($fields['shipping']['shipping_city']);
        unset($fields['shipping']['shipping_postcode']);
        unset($fields['shipping']['shipping_country']);
        unset($fields['shipping']['shipping_state']);
        
        // remove order comment fields
        unset($fields['order']['order_comments']);
        
        return $fields;
    }

    It works fine, but now I have fields not well aligned,
    please see at https://www.seduzioneolistica.it, trying to place an order.
    I’d like name and email field of the same width and possibly on the same row. Anyway not like that you see.

    Thank you

    #982279

    Hey cocoguido2,

    Unfortunately, it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :)

    Best regards,
    Basilis

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.