• I have successfully hidden the Billing Address – Company Name, State/County fields during checkout.

    I disabled both fields and unchecked the appear in boxes for:
    Thank You Page
    My Account – address
    My Account – order
    Emails

    However they both appear at the bottom of the Billing Address screen when you edit the Billing Address.

    The only way I have been able to hide them in this location is by enabling both fields again and leaving the Appear In checkboxes unticked.

    However they both show up in Checkout then.

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Support Tomasz WP Desk

    (@tomaszwp)

    Hello @wngadmin

    Please let me know if we are talking about conditional logic.
    Conditional logic is available in the PRO version but on this forum we cannot discuss topics related to the PRO version. Please write to us directly if there are any questions about this feature.
    wpdesk.net/get-support/

    Thread Starter The Wicked Ninja

    (@wngadmin)

    Hi @tomaszwp,

    I am not referring to conditional logic. I am talking about the functionality for hiding and showing default WooCommerce fields. The options I am referring to are ones that are available in the free version provided here.

    Plugin Support Tomasz WP Desk

    (@tomaszwp)

    Hello @wngadmin

    I was unable to reproduce it on a test installation.
    Please send us a screenshot of the address editing page and the settings of these fields.

    Thread Starter The Wicked Ninja

    (@wngadmin)

    No problem sending you screenshots, and a description. What is the best email address to send these to please?

    Plugin Support Tomasz WP Desk

    (@tomaszwp)

    Hello @wngadmin

    Images should be placed here for others to see. Please put them on file hosting and paste the link.

    Plugin Support Tomasz WP Desk

    (@tomaszwp)

    I am marking this topic as resolved as we have not received any new replies.

    Thread Starter The Wicked Ninja

    (@wngadmin)

    I would have provided more, information, but I am unsure how to attach images to this thread. The toolbar at the top does not allow it.

    What service do you recommend that does not require registration to embed images into this topic please?

    Plugin Support Tomasz WP Desk

    (@tomaszwp)

    Hello @wngadmin

    I think Imgur should do the trick.
    Please drag and drop the screenshot files there and paste the links in the next answer.

    Thread Starter The Wicked Ninja

    (@wngadmin)

    Here are the images, as you can see I have disabled the two fields in question however they still appear on the edit Billing Details section of WooCommerce > My Account > Addresses section.

    What am I doing wrong please?

    View post on imgur.com

    View post on imgur.com

    View post on imgur.com

    Plugin Support Tomasz WP Desk

    (@tomaszwp)

    Hello @wngadmin

    The State/County field appears because WooCommerce requires this field for the selected country (UK).

    Please go to the Appearance > Customize tab. Select WooCommerce and then Checkout. Make the field with the company name hidden.

    Thread Starter The Wicked Ninja

    (@wngadmin)

    Thanks, that resolved the Company Name.

    For the State/County, if I set it up like this:

    View post on imgur.com

    View post on imgur.com

    The field disappears from here:

    View post on imgur.com

    But is still present here:

    View post on imgur.com

    It just feels odd you can hide it on checkout by disabling it, but it shows it in My Account > Addresses, but then if you enable it, it’s hidden in My Account > Addresses but then present on Checkout.

    Plugin Support Tomasz WP Desk

    (@tomaszwp)

    Hello @wngadmin

    If that is not a problem – please run a quick troubleshooting and see if this behavior is due to a conflict.

    Troubleshooting steps

    1. Install and activate the Storefront template
    2. Disable plugins which are not ours or WooCommerce.
    3. Disable the State/County field (just uncheck the Enable Field checkbox). Also uncheck all checkboxes in the Display On tab.
    4. Check if the field shows up on the Checkout page or when editing the account.

    Please let me know about the result.

    Thread Starter The Wicked Ninja

    (@wngadmin)

    I will see what we can do on our test setup. Would be nice to sort this out as we are looking to go paid if we can resolve this.

    Thread Starter The Wicked Ninja

    (@wngadmin)

    Hi there I can confirm that following these steps the field still shows up:

    Field visible:

    View post on imgur.com

    General settings:

    View post on imgur.com

    Display on:

    View post on imgur.com

    Plugin Support Tomasz WP Desk

    (@tomaszwp)

    Hello @wngadmin

    The issue is that when the field is turned off (unchecking Enable field) other field settings are also turned off – including setting whether the field should be shown in the My Account tab.
    This is the reason the field appears in the list.

    The workaround is to hide the field in the My Account tab with CSS:

    div.woocommerce-MyAccount-content p#billing_state_field {
        display:none!important;
    }

    … and make this field not required in the functions.php file:

    add_filter( 'woocommerce_billing_fields', 'woo_filter_state_billing', 10, 1 );
    add_filter( 'woocommerce_shipping_fields', 'woo_filter_state_shipping', 10, 1 ); 
    
    function woo_filter_state_billing( $address_fields ) {
                    $address_fields['billing_state']['required'] = false;
                    return $address_fields;
    }
     
    function woo_filter_state_shipping( $address_fields ) {
                    $address_fields['shipping_state']['required'] = false;
                    return $address_fields;
    }
Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Unable to hide fields’ is closed to new replies.