AI Verified

Name

Change the arrangement of fields in the checkout area or delete fields

About

Customize the fields in the checkout. You can change the fields in the checkout area, sort them differently or delete individual fields.

Language

PHP

Rating

Voted: 0 by 0 user(s)

Codevault

jbeer

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

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.

History

Last modified:

14/11/2022

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

Change the arrangement of fields in the checkout area or delete fields

 
                    
1if (!function_exists( 'evolution_reorder_checkout_fields' ) ) :
2/**
3 * Aendere die Reihenfolge der Felder im Kassenbereich oder entferne sie komplett.
4 * @add_filter woocommerce_checkout_fields
5 */
6function evolution_reorder_checkout_fields( $fields ) {
7 
8 //move these around in the order you'd like
9 $fields2['billing']['billing_first_name'] = $fields['billing']['billing_first_name'];
10 $fields2['billing']['billing_last_name'] = $fields['billing']['billing_last_name'];
11 $fields2['billing']['billing_company'] = $fields['billing']['billing_company'];
12 $fields2['billing']['billing_address_1'] = $fields['billing']['billing_address_1'];
13 $fields2['billing']['billing_address_2'] = $fields['billing']['billing_address_2'];
14 $fields2['billing']['billing_city'] = $fields['billing']['billing_city'];
15 $fields2['billing']['billing_postcode'] = $fields['billing']['billing_postcode'];
16 $fields2['billing']['billing_state'] = $fields['billing']['billing_state'];
17 $fields2['billing']['billing_country'] = $fields['billing']['billing_country'];
18 $fields2['billing']['billing_email'] = $fields['billing']['billing_email'];
19 $fields2['billing']['billing_phone'] = $fields['billing']['billing_phone'];
20 
21 // just copying these (keeps the standard order)
22 $fields2['shipping'] = $fields['shipping'];
23 $fields2['account'] = $fields['account'];
24 $fields2['order'] = $fields['order'];
25 
26 return $fields2;
27}
28add_filter( 'woocommerce_checkout_fields', 'evolution_reorder_checkout_fields' );
29endif;

0

Related Snippets

Please see some snippets below related to this snippet..

WooCommerce

AI Verified

0

Hide shipping rates when free shipping is available

Added: 1 year ago

Last Updated: 1 year ago

WooCommerce

AI Verified

0

Order note per product.

Added: 1 year ago

Last Updated: 1 year ago

this code add order note on a single product page and include information in order meta.

WooCommerce

AI Verified

1

Limit the possible items in the shopping cart

Added: 1 year ago

Last Updated: 1 year ago

In certain cases it may make sense to reduce the possible products in the shopping cart to "1". For example, if you sell a subscription product. You can do that quickly and easily with this WooCommerc...

Other Snippets in this Codevault

These are some popular snippets from this users codevault..

WooCommerce

AI Verified

2

Confirm Password Field in Woocommerce

Added: 1 year ago

Last Updated: 1 year ago

WooCommerce

AI Verified

2

Add Product Picture to Orderlist

Added: 1 year ago

Last Updated: 1 year ago

WooCommerce

AI Verified

2

Redirect customers to own thank-you page after order

Added: 1 year ago

Last Updated: 1 year ago

You may want to redirect your customers to a custom thank you page after they place an order. You can do that with the following WooCommerce snippet