Conditional Logic
This document explains how to create conditional T&C checkboxes with if-this-then-that logic.
Woo Additional Terms
Unlimited customizable T&C checkboxesConditional logic allows you to set rules and conditions that alter terms and conditions checkboxes based on the cart and checkout details.
Smart logic helps you reduce the risks associated with legal agreements by automating certain rules and clauses within “I agree” checkboxes to suit specific use cases and concerns.
For example, if users add a specific product item to the cart, conditional logic will trigger specific T&C checkboxes to be either hidden or shown accordingly on a checkout page.
Create Conditional Logic
You can set smart logic while creating or editing a terms field. Creating your rules and conditional checkboxes can make your store’s policies more comprehensible for users.

- Navigate to WooCommerce → Settings → Additional Terms.
- Go to the Terms section within the current tab.
- Hover over the terms checkbox and select Edit.
- Click on the Add condition button in the Conditions table.
- Enter a friendly Name for the condition.
- Choose a Rule to restrict your term and condition checkbox.
- Select which Operator you want to apply for this condition.
- Depending on the rule you have defined for the condition at the top, you will see a variety of options to choose from.
- Click on the Save changes button.
Restrict by Products
You can set conditional logic to a terms and condition checkbox based on the Products in the cart. For instance, using smart logic, the age agreement checkbox could be displayed in the checkout when users add a tobacco product to the cart.

- Navigate to WooCommerce → Settings → Additional Terms → Terms.
- Hover over the terms checkbox and select Edit.
- Click on the Add condition button in the Conditions table.
- Enter a friendly Name for the condition.
- Select Products using the Rule dropdown.
- Use the Operator dropdown to select whether the cart items contain individual products (the chosen products in the following field).
- Contain - If the shopping cart contains at least one of the required products, the terms checkbox will show on the checkout page.
- Does not contain - If the shopping cart doesn’t contain any of the specific products, the terms checkbox will show on the checkout page.
- Choose the Products you want to set for the conditional rule. The combination between multiple products is or, which means if-this-or-this-then-that.
- Click on the Save changes button.
Restrict by Categories
You can set conditional logic to a terms and condition checkbox based on the Categories of the products in the cart. For instance, using smart logic, the warranty agreement checkbox could be displayed in the checkout when users add a product from the appliance category to the cart.

- Navigate to WooCommerce → Settings → Additional Terms → Terms.
- Hover over the terms checkbox and select Edit.
- Click on the Add condition button in the Conditions table.
- Enter a friendly Name for the condition.
- Select Categories using the Rule dropdown.
- Use the Operator dropdown to select whether the cart items contain specific categories (the chosen categories in the following field).
- Contain - If the shopping cart contains at least one item of the required categories, the terms checkbox will show on the checkout page.
- Does not contain - If the shopping cart doesn’t contain any item of the specific categories, the terms checkbox will show on the checkout page.
- Choose the Categories you want to set for the conditional rule. The combination between multiple categories is or, which means if-this-or-this-then-that.
- Click on the Save changes button.
Restrict by Tags
You can set conditional logic to a terms and condition checkbox based on the Tags of the products in the cart. For instance, using smart logic, the damaged goods checkbox could be displayed in the checkout when users add a product from the fragile goods tag to the cart.

- Navigate to WooCommerce → Settings → Additional Terms → Terms.
- Hover over the terms checkbox and select Edit.
- Click on the Add condition button in the Conditions table.
- Enter a friendly Name for the condition.
- Select Tags using the Rule dropdown.
- Use the Operator dropdown to select whether the cart items contain specific tags (the chosen tags in the following field).
- Contain - If the shopping cart contains at least one item of the required tags, the terms checkbox will show on the checkout page.
- Does not contain - If the shopping cart doesn’t contain any item of the specific tags, the terms checkbox will show on the checkout page.
- Choose the Tags you want to set for the conditional rule. The combination between multiple tags is or, which means if-this-or-this-then-that.
- Click on the Save changes button.
Restrict by Product Types
You can set conditional logic to a terms and condition checkbox based on the Types of products added to the cart. For instance, using smart logic, the recurring payment agreement checkbox could be displayed in the checkout when users add a subscription product to the cart.

- Navigate to WooCommerce → Settings → Additional Terms → Terms.
- Hover over the terms checkbox and select Edit.
- Click on the Add condition button in the Conditions table.
- Enter a friendly Name for the condition.
- Select Types using the Rule dropdown.
- Use the Operator dropdown to select whether the cart contains products from specific types (the chosen types in the following field).
- Contain - If the shopping cart contains at least one item of the required product types, the terms checkbox will show on the checkout page.
- Does not contain - If the shopping cart doesn’t contain any item of the specific product types, the terms checkbox will show on the checkout page.
- Choose the product Types you want to set for the conditional rule. The combination between multiple tags is or, which means if-this-or-this-then-that.
- Click on the Save changes button.
Restrict by Shipping Classes
You can set conditional logic to a terms and condition checkbox based on the Shipping Classes of products in the cart. For instance, using smart logic, the bulk commodities agreement checkbox could be displayed in the checkout when users add a product from the bulk shipping class to the cart.

- Navigate to WooCommerce → Settings → Additional Terms → Terms.
- Hover over the terms checkbox and select Edit.
- Click on the Add condition button in the Conditions table.
- Enter a friendly Name for the condition.
- Select Shipping Classes using the Rule dropdown.
- Use the Operator dropdown to select whether the cart contains products from specific shipping classes (the chosen shipping classes in the following field).
- Contain - If the shopping cart contains at least one item of the required shipping classes, the terms checkbox will show on the checkout page.
- Does not contain - If the shopping cart doesn’t contain any item of the specific shipping classes, the terms checkbox will show on the checkout page.
- Choose the Shipping Classes you want to set for the conditional rule. The combination between multiple shipping classes is or, which means if-this-or-this-then-that.
- Click on the Save changes button.
Restrict by Shipping Locations
You can set conditional logic to a terms and condition checkbox based on the users' Shipping Locations. For instance, using smart logic, the California Consumer Privacy Act (CCPA) terms checkbox could be displayed in the checkout when users make purchases from California.

- Navigate to WooCommerce → Settings → Additional Terms → Terms.
- Hover over the terms checkbox and select Edit.
- Click on the Add condition button in the Conditions table.
- Enter a friendly Name for the condition.
- Select Shipping Locations using the Rule dropdown.
- Use the Operator dropdown to select whether a user purchases from specific Locations (the chosen shipping locations in the following field).
- Contain - The terms checkbox will show on the checkout page if the user’s shipping location is one of the selected locations.
- Does not contain - If the user’s shipping location is not included in the selected locations, the checkout page will display the terms checkbox.
- Choose the Shipping Locations you want to set for the conditional rule. The combination between multiple shipping locations is or, which means if-this-or-this-then-that.
- Click on the Save changes button.
Restrict by WooCommerce Brands
The Woo Additional Terms (PRO) plugin is integrated with WooCommerce Brands plugin. You can set conditional logic to a terms and condition checkbox based on the Brands of products in the cart. For instance, using smart logic, the license terms checkbox could be displayed in the checkout when users add a product from a certain brand to the cart.

- Navigate to WooCommerce → Settings → Additional Terms → Terms.
- Hover over the terms checkbox and select Edit.
- Click on the Add condition button in the Conditions table.
- Enter a friendly Name for the condition.
- Select Brands using the Rule dropdown.
- Use the Operator dropdown to select whether the cart contains products from specific brands (the chosen brands in the following field).
- Contain - If the shopping cart contains at least one item of the required brands, the terms checkbox will show on the checkout page.
- Does not contain - If the shopping cart doesn’t contain any item of the specific brands, the terms checkbox will show on the checkout page.
- Choose the Brands you want to set for the conditional rule. The combination between multiple brands is or, which means if-this-or-this-then-that.
- Click on the Save changes button.
Complex Conditional Logic
You can create complex logic to display a terms checkbox by adding multiple conditional rules. For example, you could use a conditional rule to display a checkbox if a certain state is met, such as if users add products from a specific product type to the cart, the terms checkbox will show in the checkout. You could also use multiple rules to combine various conditions, such as displaying a terms checkbox if users add products from a specific product type and category to the cart. Additionally, you could use “not” operators to negate certain conditions, such as displaying a terms checkbox only if users don’t add a specific product to the cart.
Conditions Table
You can review the list of defined conditions for each term checkbox at a table on the edit term page.

- Name - Displays the name of your condition. A horizontal line (—) displays for empty naming if you haven't entered a custom name when creating the condition.
- Status - Displays the activation status of your condition. You can change the status by clicking on the toggle in this column.
- Rule - Displays the condition statement or "if-then" statement that defines the condition under which a certain action or result will occur.
Edit Conditions
After you add a condition to a terms checkbox, you can edit its details to apply new changes.

- Navigate to WooCommerce → Settings → Additional Terms → Terms.
- Hover over the terms checkbox and select Edit.
- Go to the Conditions table.
- Hover over the terms condition and select Edit.
- Apply your new changes as you wish.
- Click on the Save changes button.
Remove Condition
You can remove and delete a condition at any moment.

- Navigate to WooCommerce → Settings → Additional Terms → Terms.
- Hover over the terms checkbox and select Edit.
- Go to the Conditions table.
- Hover over the terms condition and select Delete permanently.
- On the message, click the Ok button and confirm to remove your conditional logic from the terms checkbox.
- Click on the Save changes button.
Disable Condition
You can enable or disable the conditional logic for a terms checkbox by toggling the switch in the Status column.

- Navigate to WooCommerce → Settings → Additional Terms → Terms.
- Hover over the terms checkbox and select Edit.
- Go to the Conditions table.
- Click the toggle in the Status column to disable or activate a condition.
- Click on the Save changes button.
Sorting Conditions
When you have multiple conditions for a terms checkbox, you can reorder those via drag and drop in the correct order to ensure that the conditional logic is executed correctly and produces the desired outcome.

- Navigate to WooCommerce → Settings → Additional Terms → Terms.
- Hover over the terms checkbox and select Edit.
- Go to the Conditions table.
- Using the left handle, Grab the condition.
- Hold the condition and drag it up and down and change the order.
- Drop the condition at a new position.
- Click on the Save changes button.