No products in the cart.
- This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
- AuthorPosts
-
August 27, 2015 at 4:52 am #10034
mohammad-khandordi
ParticipantI have a WordPress site and WooCommerce activated. I have some downloadable products to sell, and I don’t want to display any address field in [woocommerce_checkout] page.
Is it possible?
August 27, 2015 at 6:59 am #10035hareesh-sivasubramanian
ParticipantAdd this code to your
functions.php
file.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; }
Or you could use a plugin to achieve the same result.
- AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.