
How to Create a Custom WooCommerce Checkout Page Without a Plugin
A custom WooCommerce checkout page can improve user experience, boost conversions, and make your store stand out. While plugins make customization easier, they can add unnecessary bloat. This guide will show you how to create a custom WooCommerce checkout page manually without using a plugin.
By modifying your themeโs functions.php file, creating a custom checkout template, and tweaking the checkout fields, you can build a streamlined and optimized checkout experience.
Why Customize the WooCommerce Checkout Page?
โ Reduce Cart Abandonment โ A smooth, distraction-free checkout increases conversions.
โ Optimize for Mobile โ Custom layouts improve the mobile shopping experience.
โ Faster Loading Speed โ Without additional plugins, your checkout will be lightweight.
โ Brand Consistency โ Match the checkout page with your storeโs branding.
โ Add Custom Fields โ Capture essential customer information or remove unnecessary fields.
๐น Pro Tip: Use Google PageSpeed Insights to test how your checkout page loads. Try it here
Step 1: Create a Custom Checkout Page in WooCommerce
WooCommerce uses a default template for checkout. To override and customize it, follow these steps.
1.1 Copy the Default WooCommerce Checkout Template
- Connect to your website via FTP or File Manager in cPanel.
- Navigate to wp-content/themes/your-theme/.
- Create a new folder called woocommerce.
- Inside this folder, create another folder called checkout.
- Copy the default WooCommerce checkout template from:
wp-content/plugins/woocommerce/templates/checkout/form-checkout.php
- Paste it into your new directory:
wp-content/themes/your-theme/woocommerce/checkout/form-checkout.php
๐น Pro Tip: This ensures your changes wonโt be lost during WooCommerce updates.
Step 2: Customize the Checkout Fields
WooCommerce provides hooks and filters to add, remove, or modify checkout fields.
2.1 Remove Unnecessary Checkout Fields
Add the following code to your themeโs functions.php file to remove fields:
function custom_woocommerce_checkout_fields($fields) {
unset($fields['billing']['billing_company']); // Remove Company Name
unset($fields['billing']['billing_phone']); // Remove Phone Number
unset($fields['billing']['billing_address_2']); // Remove Address Line 2
return $fields;
}
add_filter('woocommerce_checkout_fields', 'custom_woocommerce_checkout_fields');
๐น Why? Removing unnecessary fields speeds up checkout and improves UX.
2.2 Add Custom Fields to Checkout
To add a custom field (e.g., a delivery date), use:
function add_custom_checkout_field($fields) {
$fields['billing']['delivery_date'] = array(
'type' => 'date',
'label' => __('Preferred Delivery Date', 'woocommerce'),
'required' => true,
'class' => array('form-row-wide'),
'priority' => 25,
);
return $fields;
}
add_filter('woocommerce_checkout_fields', 'add_custom_checkout_field');
๐น Pro Tip: Always test custom fields on both desktop and mobile devices.
Step 3: Customize the Checkout Layout
If you want to change the design or layout, modify the copied form-checkout.php
file.
3.1 Move Fields into Two Columns
Replace the form structure inside form-checkout.php with:
<div class="custom-checkout">
<div class="left-column">
<?php do_action('woocommerce_checkout_billing'); ?>
</div>
<div class="right-column">
<?php do_action('woocommerce_checkout_shipping'); ?>
<?php do_action('woocommerce_checkout_order_review'); ?>
</div>
</div>
Then, add custom CSS styles in your themeโs style.css
file:
.custom-checkout {
display: flex;
gap: 20px;
}
.left-column, .right-column {
width: 50%;
}
@media (max-width: 768px) {
.custom-checkout {
flex-direction: column;
}
.left-column, .right-column {
width: 100%;
}
}
๐น Why? A two-column layout improves readability and enhances the user experience.
Step 4: Redirect Users After Checkout
To send users to a custom thank-you page after checkout, use:
function custom_order_received_page($order_id) {
wp_redirect('https://yourwebsite.com/thank-you/');
exit;
}
add_action('woocommerce_thankyou', 'custom_order_received_page');
๐น Pro Tip: A custom thank-you page can include order tracking info and upsell offers.
Final Thoughts: Build a Faster, Better WooCommerce Checkout
By customizing WooCommerce checkout without plugins, you can:
โ Remove unnecessary fields to simplify checkout.
โ Add custom fields for better order management.
โ Improve the layout for a seamless user experience.
โ Boost conversions by optimizing for speed & mobile-friendliness.
โ Create a custom thank-you page to enhance post-purchase experience.
Leave a Comment