# Shipping Classes Conditional Logic

## Overview

Shipping classes conditional logic allows store owners to use different shipping methods and/or set shipping cost of their products created in Uni CPO with custom options. It levels up the possibility of product customization, including different shipping possibilities.

## Examples of use cases

* Offer different shipping cost depending on the weight calculated based on dimension options chosen.
* Differentiate shipping costs based on some material option.
* Etc.

## How it works

There is a new icon on the panel. It looks like this:

<figure><img src="https://3552609976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M50Y01TKemmHpSl6feB%2Fuploads%2FnlNLT9gw0Z3iKyg1QuMV%2FCleanShot%202023-11-23%20at%2018.35.34%402x.png?alt=media&#x26;token=d3cfb1b5-1857-4b27-84d6-cd4860b16ac5" alt=""><figcaption><p>Shipping classes conditional logic icon</p></figcaption></figure>

This icon opens a new modal window where you can enable the conditional logic and add conditions:

<figure><img src="https://3552609976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M50Y01TKemmHpSl6feB%2Fuploads%2Fl6hQNkBeb6c3ly5q7hYL%2FCleanShot%202023-11-23%20at%2018.35.43%402x.png?alt=media&#x26;token=aa6bcd5e-63ad-424f-890c-7657eaabca88" alt=""><figcaption><p>Shipping classes conditional logic modal window</p></figcaption></figure>

Adding conditions for shipping classes logic works exactly like adding conditions for formula logic or weight calculation logic. This is the example:

<figure><img src="https://3552609976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M50Y01TKemmHpSl6feB%2Fuploads%2Fi3SJkftkPmGwroQYHhXs%2FCleanShot%202023-11-23%20at%2018.43.16%402x.png?alt=media&#x26;token=ef8e8ed5-7981-4201-b339-748d3d9bf7ee" alt=""><figcaption><p>Adding a condition</p></figcaption></figure>

Important! Shipping classes must be added in advance in WooCommerce -> Settings -> Shipping -> Shipping classes. Example:

<figure><img src="https://3552609976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M50Y01TKemmHpSl6feB%2Fuploads%2FU8B5dXMHflBrrF56Iawc%2FCleanShot%202023-11-23%20at%2018.45.07%402x.png?alt=media&#x26;token=52ed2779-8b37-4a6f-b5fd-003c7a60db67" alt=""><figcaption><p>Shipping classes added in WooCommerce</p></figcaption></figure>

All shipping classes created in WooCommerce will be available in the select for the condition, as shown above. You can create simple or quite complex rules based on which a specific chosen shipping class will be added to the cart item dynamically!

Same as for any conditional logic builders in Uni CPO, this one works like this: the first match will stop iteration through conditions. **Based on this knowledge: only ONE shipping class can be added using shipping class conditional logic.**&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kb.moomoo.agency/uni-cpo-4-documentation/usage/panel/shipping-classes-logic.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
