Display Rules Display rules are a set of conditions which can be set for fields & sections to control their display in the checkout page. You can display fields and sections conditionally. Which means you can set certain rules for showing or hiding fields & sections. There are multiple types of conditions available which can be applied for your checkout field and sections. Below are the available options to set conditions, each of these options is explained in detail with examples later in this article. Based on user roles: This option allows you to set conditions based on the user role.

This option allows you to set conditions based on the user role. Based on cart totals: This option allows you to set conditions based on Cart Total and Cart Subtotal.

This option allows you to set conditions based on Cart Total and Cart Subtotal. Based on product category: Set conditions based on product categories.

Set conditions based on product categories. Based on product tags: Set conditions based on product tags.

Set conditions based on product tags. Based on product: Set conditions based on products.

Set conditions based on products. Based on product variation: Set conditions based on products variations.

Set conditions based on products variations. Based on other field values: Set conditions based on the other field's values.

Set conditions based on the other field's values. Custom condition: When the above options are not enough for your requirement, you can define your own conditions with the help of the provided hook.

General instructions to set display rules. This section will explain you the common steps to set display rules. To set display ruled for checkout fields or sections: Navigate to WooCommerce → Checkout Form → Checkout Fields page. Open the field/section property form popup. Click on the Add Field button to open the popup form if you are setting display rules for a new field.

button to open the popup form if you are setting display rules for a new field. Click on the Edit Field button to open the popup form if you are setting display rules for an existing field.

button to open the popup form if you are setting display rules for an existing field. Click on the Add New Section button to open the popup form if you are setting display rules for a new section that you are creating.

button to open the popup form if you are setting display rules for a new section that you are creating. Click on the Edit Section button to open the popup form if you are setting display rules for an existing section. Navigate to the Display Rules tab from the popup. From this tab you can define display rules. Here you can see two sets of rules, the first one will be validated before loading the checkout page. And the other one will be validated once the page is loaded. You can add multiple conditions to each rule. Click on the AND or OR operator button to add multiple conditions and use these operators properly based on your requirement. Once the required conditions are added, click on the Save Field button to save the settings.

Conditions based on user role Show or hide fields & sections based on user role. Below are the list of conditions available to display fields & sections based on the user role. User role equal to User role not equal to Example #1: Show field xyz only for "Shop Manager" Example #2: Hide field xyz for "Shop Manager" and "Administrator"

Conditions based on cart totals Show or hide fields & sections based on cart totals. Below are the list of conditions available to display fields & sections based on the cart totals. Cart total equal to Cart total greater than Cart total less than Cart subtotal equal to Cart subtotal greater than Cart subtotal less than Example #1: Show field xyz if the cart total amount is between $100 & $500

Conditions based on products Show or hide fields & sections based on products. Below are the list of conditions available to display fields & sections based on products in the cart. Cart contains Cart not contains Cart only contains Example #1: Show field xyz if cart contains the product Cap

Conditions based on product variations Show or hide fields & sections based on product variations. Below are the list of conditions available to display fields & sections based on product variations in the cart. Cart contains Cart not contains Cart only contains Example #1: Show field xyz if cart contains the product T-Shirt of size Medium Please refer below screenshot to find the Variation Id.

Conditions based on product categories Show or hide fields & sections based on product categories. Below are the list of conditions available to display fields & sections based on the categories of the products in the cart. Cart contains Cart not contains Cart only contains Example #1: Show field xyz if cart has a product of the category Hoodies

Conditions based on product tags Show or hide fields & sections based on product tags. Below are the list of conditions available to display fields & sections based on the tags of the products in the cart. Cart contains Cart not contains Cart only contains Example #1: Show field xyz if cart has a product under the tag Party Wear

Conditions based on other field’s value This option allows you to set conditions based on other field’s value. Below are the list of conditions available to display fields & sections based on other fields’s value. Is empty Is not empty Value equals to Value not equals to Value in Contains Not contains Value greater than Value less than Value starts with Value not starts with Date equals to Date not equals to Date after Date before Day equals to Day not equals to Is checked Is not checked Match expression

Conditions for Country field Setting display rules for Country field is exactly the same as for other checkout fields. But this option is disabled by default, you have to enable it first. To enable display rules for Country field: Navigate to Advanced Settings tab. Head to Other Settings section. Check the box Enable display of Country field based on Conditional rules.

Conditions for state field Setting display rules for State/ Province field is exactly the same as for other checkout fields. But this option is disabled by default, you have to enable it first. To enable display rules for State/ Province field: Navigate to Advanced Settings tab. Head to Other Settings section. Check the box Enable display of State/ Province field based on Conditional rules.

Conditions based on country field Show or hide fields & sections based on the country field value. Below are the list of conditions available to display fields & sections based on country field value. Value equals to Value not equals to The option to set conditions based on Country Field value is disabled by default. To enable this option: Navigate to Advanced Settings tab. Head to Other Settings section. Check the box Enable conditional rules based on Country selected. Note: Use the two letter Country Code instead of Country Name for the conditions (Example: Use US for United States of America) Example #1: Show field xyz only for United States of America (US)

Conditions based on payment & shipping methods Show or hide fields & sections based on payment & shipping methods. Below are the list of conditions available to display fields & sections based on payment & shipping methods. Value equals to Value not equals to The option to set conditions based on Payment & Shipping method is disabled by default. To enable this option: Navigate to Advanced Settings tab. Head to Other Settings section. Check the box Enable conditional rules based on Payment & Shipping methods. Example #1: Show field xyz only if the selected shipping methode is Free Shipping Tip: You can inspect the page and point on the required payment method or shipping method to find its corresponding value in the source code.