Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1112184
    Tony M
    Participant

    My site is pitdadon.com. I was trying to remove the billing address fields from the checkout page. From all the info I read it was saying to add some code to the functions.php file for my child theme, but it doesn’t seem to work. Am I missing something? Here’s the code I added.

    add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
    
    function custom_override_checkout_fields( $fields ) {
    unset($fields['billing']['billing_state']);
    unset($fields['billing']['billing_phone']);
    unset($fields['order']['order_comments']);
    return $fields;
    }
    #1112212
    Thai
    Moderator

    Hi There,

    Your code seems to work fine on my end.

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link login to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thanks.

    #1113189
    Tony M
    Participant
    This reply has been marked as private.
    #1113386
    Paul R
    Moderator

    Hi Tony,

    Upon checking, I can see the code works in your site.

    This is how your checkout page looks like on my end

    http://screencast.com/t/3Y61Qlbz3Snz

    If you wouldn’t mind providing us with a little more clarification on what it is you’re wanting to do (a link to a similar example site would be very helpful, or perhaps some screenshots), we’ll be happy to provide you with a response once we have a better understanding of the situation.

    #1113861
    Tony M
    Participant

    I wanted to remove the address, town/city, and zip code fields from that checkout page. All the products are going to be digital downloads so I don’t need the customer’s address. I was just trying to make it more simple for the customer.

    #1113943
    Rupok
    Member

    Hi there,

    Thanks for clarifying. Unfortunately we can’t assist on such customization as it would be out of our support scope. You can reach to WooCommerce support.

    Cheers!

  • <script> jQuery(function($){ $("#no-reply-1112184 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>