How To Edit WooCommerce Checkout Page in Different Ways

Last updated on June 27, 2021

ECommerce store owners need to learn how to edit a WooCommerce checkout page. Now, why is that? Because it has been estimated that more than half of the customers abandon their carts at the last step, the checkout page. Thus, it is crucial that your WooCommerce checkout page is optimized and provides a streamlined flow of order processing. 

A complex and crowded checkout page is one of the major reasons why customers abandon their shopping carts. Some checkout pages are complex, have too many fields to fill, ask for irrelevant information, or are lengthy. Customizing the checkout page can help you simplify the checkout process and reduce cart abandonment.

Thus, in this article, we will learn how to edit the WooCommerce checkout page, add custom fields, and remove unnecessary fields easily.  

Offer your customers multiple payment options with the best WooCommerce Payment Gateways

WooCommerce Default Checkout Page

The default WooCommerce checkout page consists of all relevant questions like name, company name, shipping address, ZIP code, additional information, etc. But most of these fields are unnecessary if you are selling only digital products, such as shipping information. Whereas, if you are not a wholesale seller, chances are you do not need the “Company name” field. 

Instead of using the default page settings, learn to edit the WooCommerce checkout page to customize and simplify the page according to your business and the type of products you sell, and your clients.  

Therefore, let’s check out some of the best ways to manually alter your WooCommerce checkout page.

Reduce Cart Abandonment with the help of WooCommerce plugins and increase sales.

Different Ways to Customize WooCommerce Checkout Page

Here, we will mention some simple Woo Snippets that can easily edit the WooCommerce checkout page.

Woo Snippets for editing checkout page

1. Add New Fields to Checkout Page

Use the following snippet to add new fields to the checkout page

add_filter( ‘woocommerce_checkout_fields’ , ‘add_woocommerce_checkout_field’ );

function add_woocommerce_checkout_field( $fields ) {

   $fields[‘shipping’][‘shipping_field_value’] = array(

       ‘label’     => __(‘Field Value’, ‘woocommerce’),

       ‘placeholder’   => _x(‘Field Value’, ‘placeholder’, ‘woocommerce’),

       ‘required’  => true

   );

   return $fields;

}

Now, some fields are mandatory for a checkout field. You can easily do that by adding TRUE in front of the required field. This will add an asterisk (*) to be displayed before the field so your customers know it’s a mandatory field. Similarly, if a required argument has FALSE written after it, will not be mandatory. 

2. Remove Fields from Checkout Page

add_filter( ‘woocommerce_checkout_fields’ , ‘remove_woocommerce_checkout_fields’ ); 

function remove_woocommerce_checkout_fields( $fields ) {

   unset($fields[‘shipping’][‘shipping_first_name’]);

   unset($fields[‘shipping’][‘shipping_last_name’]);

   return $fields;

}

This snippet shows you how to remove certain fields from the WooCommerce checkout page. In the above code, we have removed the first and last name fields as an example. 

Learn how to setup Wholesale Pricing on WooCommerce easily.

3. Change the Order of Fields

Use the following code snippet to change the order of fields. 

add_filter( ‘woocommerce_checkout_fields’, ’email_first’ );

function email_first( $checkout_fields ) {

$checkout_fields[‘billing’][‘billing_email’][‘priority’] = 4;

return $checkout_fields;

}

In this example, we made the email address field come before first and last name. Setting the priority to 4 also had its reasons, because each field has its priority, we need to make the priority value less than the lowest value so it can come first and so on. 

4. Modify Required Fields

As stated above, if you want to make certain fields unnecessary or non-compulsory, adding FALSE in front of the required argument works.

add_filter( ‘woocommerce_billing_fields’, ‘remove_required_fields_checkout’);

function remove_required_fields_checkout( $fields ) {

$fields[‘billing_first_name’][‘required’] = false;

$fields[‘billing_last_name’][‘required’] = false;

return $fields;

}

In this example, we have made the billing first name and last name field non-compulsory. 

Win back inactive customers by using the best WooCommerce Follow-Up Email plugins.

5. Modify Checkout Notes

If you want to change the text in the WooCommerce checkout notes section, you can easily edit it with the help of the following snippet.

add_filter( ‘woocommerce_checkout_fields’, ‘modify_woocommerce_checkout_order_note’ );

function modify_woocommerce_checkout_order_note( $fields ) 

{

    $fields[‘order’][‘order_comments’][‘placeholder’] = ‘Special notes’;

    $fields[‘order’][‘order_comments’][‘label’] = ‘Add your special note’;

    return $fields;

}

6. Use Plugins

how to edit woocommerce checkout page with plugins

Instead of using Woo Snippets, you can also do all these WooCommerce checkout edits and more with the help of plugins. For example, with the Checkout Field Editor plugin for WooCommerce, you can easily add, remove, and edit fields with a touch of a button. It also provides multiple field types, such as text, password, text area, date picker, checkbox, radio, and much more.  

Other options are WooCommerce Checkout Manager, WooCommerce One-Page Checkout, etc.

Learn how to set-up a Photography Site on WooCommerce – from pre-requisites to plugins

Final Words

And that’s it! We hope this article helped you learn how to edit a WooCommerce checkout page. The checkout page is the last page your customer interacts with after they leave your site. Thus, it should be optimized. Having unnecessary fields or multiple pages can deter your customers and lead them to abandon their carts. Now you can easily take care of this problem by using Woo Snippets or by plugins and collect user information easily.  

Editorial Team
Have Feedback?

Please click here to contact us and let us know if you see any errors or issues on this page. We welcome any general feedback as well.

Top
This page may contain affiliate links. Learn more.