In my Wordpress Woocommerce site I have removed all of the shipping and billing details so the customer only has to enter their first, last and email. I'm selling vertical products, I don't want or need all those details. What I'm still seeing is Additional Information name is still showing up.
Your Information
First Name *
Last Name *
Email Address *
Confirm Email Address *
Additional Information
When I look at the html from the page I see:
</p></div>
</p></div>
<div class="col-2">
<div class="woocommerce-shipping-fields">
<h3>Additional Information</h3>
</p></div>
</p></div>
</p></div>
It's some how plugged in so I can't just delete it. If I can please give insight how to find what file it might be in.
This is the code I've included in my child theme to remove all billing and shipping info:
// Hook in
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
// Our hooked in function - $fields is passed via the filter!
function custom_override_checkout_fields( $fields ) {
unset($fields['order']['order_comments']);
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']);
return $fields;
}
Thanks in advance for helpful advice
try to add this to your functions.php
add_filter('woocommerce_enable_order_notes_field', '__return_false');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With