AI Verified

Name

Remove WooCommerce Checkout Fields

About

This code removes certain checkout fields from a WooCommerce checkout page, including billing company, billing address, billing city, billing postcode, billing country, billing state, billing phone, account username, and account password.

Language

PHP

Rating

Voted: 0 by 0 user(s)

Codevault

FP---Codevault

Scroll down to see more snippets from this codevault.

Wordpress Compatability

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

Our AI bot has checked this snippet is compatable up to wordpress version: 6.1

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.

Website/ Profile URL:

https://frankpurcell.co.za

History

Last modified:

26/03/2023

Important Note

This snippet has the following status:

AI Verified

This snippet has been tested by our AI bot, see any comments below.

AI Bot Comments:

Found 0 vulnerabilities

Remove 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 ) {
4unset($fields['billing']['billing_company']);
5unset($fields['billing']['billing_address_1']);
6unset($fields['billing']['billing_address_2']);
7unset($fields['billing']['billing_city']);
8unset($fields['billing']['billing_postcode']);
9unset($fields['billing']['billing_country']);
10unset($fields['billing']['billing_state']);
11unset($fields['billing']['billing_phone']);
12unset($fields['account']['account_username']);
13unset($fields['account']['account_password-2']);
14return $fields;
15}

0

Related Snippets

Please see some snippets below related to this snippet..

WooCommerce

AI Verified

0

Change tekst add to cart woocommerce to Offerte

Added: 2 weeks ago

Last Updated: 2 weeks ago

Changes tekst "add to cart" woocommerce to "Offerte".

WooCommerce

AI Verified

1

WooCommerce Custom Checkbox On Product

Added: 1 year ago

Last Updated: 2 weeks ago

This snippet generates a custom checkbox on the product page, which if checked, adds meta to the order. You’ll notice if the checkbox is ticked and the product is added to the cart and purchased, the...

WooCommerce

AI Verified

0

WooCommerce Redirect Product Links On Archive Page

Added: 1 year ago

Last Updated: 1 year ago

This snippet stops the user from being able to the view the single product template and instead redirects them to a user defined URL. In this specific example, we redirect users to our guides page if...

Other Snippets in this Codevault

These are some popular snippets from this users codevault..

WooCommerce

AI Verified

1

Remove WooCommerce Lightbox Zoom

Added: 1 year ago

Last Updated: 2 weeks ago

Remove the zoom and lightbox features from the WooCommerce product gallery.

WooCommerce

AI Verified

0

WooCommerce Shipping Method Button

Added: 1 year ago

Last Updated: 1 year ago

WooCommerce

AI Verified

0

WooCommerce - My Account - Edit Address - Fix

Added: 1 year ago

Last Updated: 1 year ago

Fixes the issue with the "Edit Address" text missing from the user's My Account menu. This happens due to a language conflict when using English (South African/US), however using English (UK) also res...