WPSlash

WooFood Remove Checkout Fields and Rename on WooCommerce

Friday July 10, 2020

The following sample code snippet will help you remove all the Address fields from both Billing and Shipping Fields . This snippet will also rename the label name from First Name to Table Name


add_filter( 'woocommerce_default_address_fields' , 'wpslash_override_default_address_fields' );
function wpslash_override_default_address_fields( $address_fields ) {

     $address_fields['first_name']['label'] = __('Table Name', 'woocommerce');

	unset( $address_fields['postcode']);
	unset( $address_fields['city']);
	unset( $address_fields['state']);
	unset( $address_fields['company']);
	unset( $address_fields['address_1']);
	unset( $address_fields['address_2']);
	unset( $address_fields['country']);
	unset( $address_fields['postcode']);
       unset( $address_fields['last_name']);

    return $address_fields;
}

The following snippet will remove Email and Phone fields from Checkout

add_filter( 'woocommerce_billing_fields', 'wpslash_remove_billing_fields', 20, 1 );
function wpslash_remove_billing_fields($fields) {
    unset( $fields ['billing_email'] );
	unset( $fields ['billing_phone'] );
    return $fields;
}

Leave a Comment

Your email address will not be published. Required fields are marked *

Related Articles

Restaurants Tutorials

The Cheapest Food Delivery App for Restaurants Isn’t an App at All — It’s WooFood

When restaurant owners start looking for the cheapest food delivery app, they quickly discover a frustrating truth: most “cheap” delivery platforms aren’t cheap at all. They either take commissions, charge high monthly fees, lock you into their payment processors, or limit how much control you have over your own customer base. But what if the […]
December 1, 2025
Restaurants WooFood

Why “Free” GloriaFood Might Not Be The Best Long-Term Bet For Your Restaurant

When you’re building an online ordering system for your restaurant, it’s tempting to go for a “free” solution. That’s exactly what GloriaFood offers: a ready-to-go, easy-to-install WordPress plugin for online ordering, delivery, and reservations with no setup fees or commissions But “free” doesn’t always mean “best,” especially when you’re serious about owning your brand, your […]
December 1, 2025
Tutorials WooCommerce

How to Choose the Best Food Ordering System for Your Restaurant (And Why WooFood is the Ultimate Solution)

If you’re running a restaurant, café, or fast-food business in today’s digital age, offering online food ordering is no longer optional — it’s essential. Customers expect the convenience of browsing your menu, customizing their orders, and checking out seamlessly from their phone or computer. But with so many plugins and systems available, how do you choose the right […]
April 21, 2025