Woocommerce hide address fields on checkout

I have a tricky client who wants to hide customer address fields from his users on the woocommerce checkout page.

Address fields that need to be hidden but posted:

Read More

Screenshot

Unfortunately, I need the user address posted and appended to the order. My backend automation process relies on an address coming in with the order. The address is always the same so the content is not important.

I have been looking for a hook or filter that can sort this out, but to no avail.

Any help would be saving many bacons.

Related posts

Leave a Reply

1 comment

  1. If the address is always the same I’d suggest using JavaScripts hide function on whichever of those inputs you need hidden, and then hard coding the address prior to back end processes starting.

    So instead of retrieving them via $POST – you could set the values at that point.

    This is a basic example of the jQuery hide functionality that you could use on page load.

    Alternatively do you have access to the input boxes on the form? Could you not use <input type="hidden" value="hardcoded value"></input>

    http://www.w3schools.com/jquery/jquery_hide_show.asp

    Would either of these work for you?