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

WooCommerce Thank You Page Cross-Sells

Added: 1 year ago

Last Updated: 1 year ago

Depending on your website theme, WooCommerce by default will only show product cross-sells in the cart based on products added. These are user defined from the product editor under the Linked Products...

WooCommerce

AI Verified

1

WooCommerce Show Custom Content Under Checkout Fields

Added: 1 year ago

Last Updated: 1 year ago

Sometimes, you may wish to provide additional instructions to your customers when they are completing the WooCommerce Checkout form. This quick guide shows you how you can add any custom content you l...

WooCommerce

AI Verified

0

Btn Woocommerce

Added: 2 months ago

Last Updated: 2 months ago

Remove btn na página de produto (alguns produtos)

Other Snippets in this Codevault

These are some popular snippets from this users codevault..

Performance

AI Verified

29

Remove Unused Javascript

Added: 1 year ago

Last Updated: 1 day 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: 5 months ago

Deactivate some WooCommerce Checkout Fields from showing

Performance

Pro Verified

5

Disable e-icons from Elementor

Added: 1 year ago

Last Updated: 1 year ago

Disable e-icons - and remove the notification from occurring during your Page Speed Insight Check.