keepcalculator

06 Numbers and Powers

Customize WooCommerce Checkout: Blocks & Classic

Card No. 06·53840 · Updated · Standard formula, shown below

This guide shows you how to customize both the modern WooCommerce Checkout block and the classic checkout page. You’ll learn where to find the settings, how to add or remove fields, change labels and placeholders, and make the checkout match your store’s needs. No coding is required for the basic steps, though a little CSS knowledge helps for advanced styling.

What You’ll Need

  • A WordPress site with WooCommerce installed and active.
  • Admin access to the WordPress dashboard.
  • For code snippets: access to your theme’s functions.php file or a code snippets plugin (like Code Snippets).
  • A staging site to test changes is highly recommended.

Step-by-Step

Part 1: Customizing the Checkout Block

  1. Open the Checkout page in the block editor. Go to Pages in your WordPress admin, find the page titled “Checkout” (usually it has the [woocommerce_checkout] shortcode or is set as the checkout page in WooCommerce settings), and click Edit with Gutenberg.
  2. Select the Checkout block. Click on the Checkout block in the editor. You’ll see a toolbar and a sidebar with block settings.
  3. Toggle between “Checkout” and “Thank you” views. In the block toolbar, you can switch to see the order confirmation page. This is useful for previewing changes.
  4. Add or remove fields. In the block sidebar, you’ll see a list of sections: Contact information, Shipping address, Billing address, and Order summary. Click on any section to expand it. You’ll see a list of fields with toggles. Turn off fields you don’t need (e.g., “Company” or “Phone”). To add a custom field, click the “Add a field” button (usually a plus icon) and choose a field type (text, checkbox, select, etc.).
  5. Edit field labels and placeholders. Click on a field within the block. In the block settings sidebar, you can change the Label, Placeholder, and whether it’s Required.
  6. Reorder fields. Drag and drop fields within a section to reorder them. Note that some fields are locked in position (like email vs. first name) for usability.
  7. Style the block. In the block sidebar, go to the Styles tab (top right). You can change the color scheme, border radius, and typography. For more advanced styling, use the Additional CSS class in the block’s advanced settings.

Part 2: Customizing the Classic Checkout

  1. Identify which checkout you’re using. WooCommerce uses the classic checkout by default unless you’ve explicitly added the Checkout block to a page. If you see the traditional form with “Billing Details” and “Your Order”, you’re on the classic checkout.
  2. Use a plugin for easy customization. Install and activate a plugin like Checkout Field Editor (by WooCommerce or third-party). Go to WooCommerce → Checkout in the admin menu. You’ll see tabs for Billing, Shipping, and Additional fields.
  3. Edit existing fields. In the plugin’s interface, you can click on any field (e.g., “First name”) to edit its label, placeholder, required status, and class. You can also reorder fields by dragging them.
  4. Add new fields. Click “Add field” to create a custom field. Choose a field type (text, select, radio, etc.), give it a label, and optionally set a default value. Save your changes.
  5. Remove fields. To remove a field, hover over it and click the trash icon. Be careful not to remove required fields like email or shipping address if you need them.
  6. For advanced changes (code). If you prefer coding, add a snippet to your theme’s functions.php or a code snippets plugin. For example, to remove the company field:
    add_filter( 'woocommerce_billing_fields', 'custom_remove_billing_company' );
    function custom_remove_billing_company( $fields ) {
        unset( $fields['billing_company'] );
        return $fields;
    }

Common Mistakes

  • Editing the wrong checkout. Many users think they’re editing the block checkout when they’re actually on the classic checkout, or vice versa. Check the page source or the admin page list to confirm.
  • Removing required fields. Removing fields like “Email” or “Shipping address” can break the checkout process. Always keep essential fields.
  • Not testing the thank-you page. Changes to the checkout block can affect the order confirmation page. Always preview both.
  • Overriding theme styles. Adding custom CSS without understanding the theme’s structure can lead to a broken layout. Use a child theme or custom CSS panel.
  • Forgetting to save and clear cache. After edits, clear any caching plugins and your browser cache to see changes.

Tips

  • Use conditional logic. Some field editor plugins allow you to show fields only when certain conditions are met (e.g., show a “Gift message” field only if the customer checks “Gift order”).
  • Keep it short. The fewer fields, the higher the conversion rate. Only ask for what you truly need.
  • Use placeholders wisely. Placeholders can guide users, but they disappear when typing. Use them for examples like “e.g., 12345”.
  • Test on mobile. Checkout fields should be responsive. Use the browser’s mobile view or a real device.
  • Back up your site. Before making code changes, always have a full backup.

Troubleshooting

  • Changes not showing. Clear all caches (WordPress, plugin, server, browser). If using a caching plugin, purge the cache. Also, check if you’re editing the correct page.
  • Checkout block not appearing. If you’ve added the block but it doesn’t render, make sure you’re on a page that is set as the checkout page in WooCommerce → Settings → Advanced. Also, ensure the block is not hidden by a page builder.
  • Fields not saving. If you’re using a field editor plugin and changes don’t persist, check for JavaScript errors in the browser console. Try deactivating other plugins that might conflict.
  • Custom code causing fatal error. If you add a snippet and your site goes blank, access your site via FTP or file manager, find the functions.php file, and remove the snippet. Alternatively, use a code snippets plugin that has a “safe mode”.
  • Checkout page looks broken. This is often a theme conflict. Switch to a default theme (like Storefront) to see if the issue persists. If it does, it’s a plugin conflict—deactivate plugins one by one.

Frequently Asked Questions

Q: Can I add a custom field to the checkout block without coding?
A: Yes, the Checkout block has a built-in “Add a field” button that lets you add text, checkbox, select, and other fields directly in the editor.

Q: How do I make a field required in the classic checkout?
A: In a field editor plugin, edit the field and check the “Required” option. If coding, add 'required' => true to the field’s arguments in the filter.

Q: Why can’t I reorder fields in the classic checkout?
A: The classic checkout is not drag-and-drop by default. You need a plugin or code to reorder fields. Plugins like “Checkout Field Editor” provide a drag-and-drop interface.

Q: Will my custom fields appear in the order details?
A: Yes, if you save the field data properly. For the block, custom fields are saved as order meta. For classic checkout, you may need to add a snippet to display them in the admin order page and emails.

Q: Can I use the Checkout block and the classic checkout at the same time?
A: Yes, you can have both on different pages, but WooCommerce will only use the page set as the checkout page. You can create a second page with the block and link to it manually, but it may cause confusion.

Q: How do I style the checkout block to match my brand?
A: In the block settings, go to the Styles tab and adjust colors, borders, and typography. For more control, add custom CSS targeting the block’s class (e.g., .wc-block-checkout).

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →