Pro Verified

Name

Deactivate some WooCommerce Checkout Fields

About

Deactivate some WooCommerce Checkout Fields from showing

Language

Javascript

Rating

Voted: 9 by 13 user(s)

How to Setup Snippet

Add to Code Snippets to Run Everywhere. Any items that are active (and do not sit within /* and */ comments) will not be shown on the Checkout Page.

Codevault

WebSquadron

Scroll down to see more snippets from this codevault.

Wordpress Compatability

The author has indicated that this snippet is compatable up to wordpress version: Not Specified

Code Snippet Plugin Sync

Free & Pro

Download this snippet by clicking the download button, then head over to the Code Snippet Plugin settings in your wordpress admin dashboard, select the import menu then upload this file to import into your wordpress site.

Pro Only (Coming Soon)

You will be able to click a button and sync this snippet to your wordpress site automatically and from your dashboard manage all code snippets across all your wordpress sites that have the Code Snippets Pro plugin installed.

History

Last modified:

27/10/2023

Important Note

This snippet has the following status:

Pro Verified

This snippet has been verified by a Code Snippet Pro team member.

Pro Comments:

Deactivate some WooCommerce Checkout Fields

 
                    
1/* WooCommerce: The Code Below Removes Checkout Fields */
2add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
3function custom_override_checkout_fields( $fields ) {
4/*unset($fields['billing']['billing_first_name']);*/
5/*unset($fields['billing']['billing_last_name']);*/
6unset($fields['billing']['billing_company']);
7/*unset($fields['billing']['billing_address_1']);
8unset($fields['billing']['billing_address_2']);
9unset($fields['billing']['billing_city']);
10unset($fields['billing']['billing_postcode']);
11unset($fields['billing']['billing_country']);
12unset($fields['billing']['billing_state']);
13unset($fields['billing']['billing_phone']);*/
14unset($fields['order']['order_comments']);
15/*unset($fields['billing']['billing_email']);*/
16/*unset($fields['account']['account_username']);*/
17/*unset($fields['account']['account_password']);*/
18/*unset($fields['account']['account_password-2']);*/
19return $fields;
20}

9

Featured Snippet

Comments

  • HN

    1 year ago

    I know this comment might come as off one, but please also write how to do guide also. Might get very helpful. 

Related Snippets

Please see some snippets below related to this snippet..

WooCommerce

AI Verified

0

Show Order Deatails on seperate Page

Added: 1 year ago

Last Updated: 1 year ago

WooCommerce

AI Verified

0

WooCommerce Sort Products By Stock Status

Added: 1 year ago

Last Updated: 1 year ago

This quick guide shows you how you can sort products on the archive template by stock status. This means you’ll be able to show In Stock products first, improving the customer experience....

WooCommerce

AI Verified

0

Remove categories from shop and other pages in Woocommerce

Added: 1 year ago

Last Updated: 1 year ago

Other Snippets in this Codevault

These are some popular snippets from this users codevault..

Performance

AI Verified

30

Remove Unused Javascript

Added: 1 year ago

Last Updated: 1 week ago

Remove Unused Javascript - and improve your Page Speed Insight Score

WooCommerce

Pro Verified

9

Deactivate some WooCommerce Checkout Fields

Added: 1 year ago

Last Updated: 6 months ago

Deactivate some WooCommerce Checkout Fields from showing

Elementor

AI Verified

6

CSS Grid Aid

Added: 6 months ago

Last Updated: 3 days ago

This can be used for any WordPress Builder to aid working with CSS Grids.