• Skip to primary navigation
  • Skip to main content
  • Skip to footer

Essential Premium WooCommerce Plugins - WP Desk

  • Premium Plugins
  • Support
  • Blog
  • My Account
  • 0
Bartosz Gajewski

Hide checkout fields based on shipping method in WooCommerce

Updated: February 13, 2020 / Checkout, Guides

In many cases, you don’t want to display all the default checkout fields in WooCommerce. In this article, I’ll show you how to hide or show checkout fields based on shipping method in WooCommerce.

To achieve that, you’ll need only one really powerful plugin - Flexible Checkout Fields PRO. It allows you to customize your checkout page, whether it’s adding new custom fields, deleting default ones or using it with conditional logic. Over 177,821 stores use this plugin on a daily basis and it’s well-rated with 4.6 out of 5 stars.

Flexible Checkout Fields PRO WooCommerce £59

Edit, add new or hide unnecessary fields from the checkout form. It's all about conversions and better user experience.

Add to cart or View Details
WP Desk
50,000+ Active Installations
Last Updated: 2021-03-18
Works with WooCommerce 4.8.0 - 5.2.x

You can use this plugin to hide shipping fields for virtual products using conditional logic based on products or categories. But in this case, we are going to use conditional logic based on the shipping method. You can use it to hide checkout fields when your customer chooses Cash on Delivery (COD) shipping method or shipping to access points.

Hide checkout fields based on shipping method in WooCommerce

Let’s go to the practical part of this article. If you have your Flexible Checkout Fields PRO plugin installed and activated, go to WooCommerce > Checkout Fields.

Checkout Fields Settings

Next, choose a section, where you want to hide checkout fields based on shipping method. It can be billing, shipping or any custom section available in Flexible Checkout Fields plugin. 

Then, edit one of the fields that you want to hide. I’ll show it as an example of the City field, but it will work on any other one. When you have your field, go to Advanced settings.

Checkout Fields Settings advanced settings

Next, Enable Shipping Methods Logic and choose Hide this field if. 

Checkout Fields Settings shipping method logic

You can also use this feature to display the checkout field based on the shipping method.

Now, it’s time to add a new rule. Click on Add rule button and you should see the new rule with two select fields. 

Checkout Fields Settings new rule

In the first one, Select Shipping Zone, you can choose the shipping zone that includes your shipping method. Only shipping methods from that shipping zone will be displayed in the second field. In my case, it’s the USA. 

Checkout Fields Settings USA

In the second field, Select Shipping Method, choose your shipping methods. If you are using our Flexible Shipping plugin, you’ll see shipping methods with “Flexible Shipping:” prefix. In my example, I chose Advanced shipping. 

Checkout Fields Settings shipping method

Sometimes it can take a while to load all the shipping methods. Usually clicking again on this field after a few seconds, solves this issue.

Now, you can apply the same rules to other checkout fields that you want to hide. Remember to Save Changes. 

Result

That’s how it looks like in my store.

Hide checkout fields result

As you can see, after I choose the Advanced shipping method, the City field is no longer displayed. It will work also with other fields.

Learn more about WooCommerce Checkout Conditional Fields →

Summary

In this article, I showed you how to hide checkout fields based on shipping method in WooCommerce. You can also use it to display checkout fields only for certain shipping methods. I hope it will be useful.

Tweet

2 minutes read2051 views

Bartosz Gajewski

Content Specialist in WP Desk. He tries to increase the number of plugin users with useful content. Privately an enthusiast of mountains and European cinema.

Powered by WP Desk

WP Desk brings you great WooCommerce plugins. We strive to save your time and money by speeding up your processes. Use our plugins to build a better store. Awesome support included in the package.

Premium WooCommerce Plugins →
WP Desk › Guides › Hide checkout fields based on shipping method in WooCommerce

Footer

WP Desk - WooCommerce Plugins

At WP Desk we create great WooCommerce plugins with awesome support. Save time and money with our e-commerce solutions. See how we can help you improve your e-store →

Secured by Comodo

WP Desk

  • About us
  • Giving Back
  • Blog
  • Contact us

Products

  • Premium Plugins
  • FAQ
  • Docs
  • Get Support

Legal

  • Terms & Conditions
  • Refund Policy
  • Support Policy
  • Privacy Policy

© 2021 WP Desk