New Landing How can we help? Atelier Remove fields from ordering form at Checkout.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Posted in: Atelier
  • #221116
    eteokliz
    Member
    Post count: 25

    I have searched the forums and haven’t found a similar topic.

    Is it possible to remove a couple of fields from the Billing & Shipping Address form at Woocommerce Checkout?
    More specifically I would like to remove the Company & the Second Line Address field from both forms.

    Thanx in advance.

    #221275
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    For this you would need to log a ticket with WooCommerce support.

    Have you tried this: https://wordpress.org/plugins/woocommerce-checkout-manager/

    You can also activate your child theme and use a function such as this added to your child theme functions.php to remove certain fields:

    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;
    }

    Cheers,
    David.

    #221345
    eteokliz
    Member
    Post count: 25

    I had found this plugin but I would prefer not using one.

    Child theme seems like a safe solution to make alterations on,
    so I might create one.

    ‘resolved – thank you for your time – cheers

    #221442
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    You most welcome. Great thanks to David.
    Mohammad 🙂

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register