If you landed on this page you’re probably using one of my ‘Advanced’ plugins. All the plugins where I use ‘Advanced’ in the plugin name allows you to use conditional logic to setup when something should happen. This blog post is here to help you understand how the conditions work and get things working to your needs.

Plugins using these conditional options

This is the current list of plugins that use the conditional logic to where this blog post applies to. It could be some newer ones won’t be listed (yet) if you’re reading this in the future.


Easy Digital Downloads

Available conditions

The available conditions depend on the plugin and what makes sense for it. I won’t be listing the conditions per plugin here, but with the plugins there’s a screenshot on their respective page showing the available conditions.

The conditions meta box

Lets really dive into the explanation of how things really work, starting with the conditions meta box.

This is the conditions area where all the conditions are listed in. This meta box is usually listed at the top of the page. The conditions in this meta box determine IF the action of the plugin should be applied. For example, for the Advanced Fees plugin it determines when a fee should be applied or not.

In order to have it apply the fee, ALL conditions in at least one condition group should be matched.

Condition groups

The conditions meta box can hold multiple condition groups. A condition group is the collection of one or multiple conditions in the grey boxed area as shown below.

All the conditions inside the same condition group are matched as ‘AND’. Condition groups themselves are matches as ‘OR’.

Adding a new condition group

Adding a new condition group can be done using the “Add ‘Or’ group’ button at the bottom of the conditions meta box.


In the screenshot below the fee will be applied when;

– The ‘subtotal is less then $100’ AND is their ‘country is United States’


– When their ‘subtotal is less then $200’ AND their ‘country is Canada’

Duplicating and deleting condition groups

When you over over a condition group, in the top right corner you’ll get see two action links: ‘Delete’ and ‘Duplicate’. Use these action to manage your condition groups more easily and quicker.

Adding conditions to a condition group

Use the ‘+ Add condition’ button at the bottom to add a new condition to that specific condition group.

Removing conditions

The ‘-‘ button on the right of a condition is used to remove a condition. Note that these will only be visible when you hover over a condition.


A single condition consists out of three parts; the condition key, operator and value.

Condition key is a list of field you can choose to match against. For example the user role, country, subtotal, payment gateway etc.
Operator is how the condition will be matched, this can be ‘Equal to’, ‘Not equal to’, ‘Greater or equal to’, ‘Less or equal to’. Note that the latter two options include the value amount itself, so if you want to make ranges, make sure you do it like ‘1~10’, ‘10.01~20’, ‘20.01~30’ etc.
Value is a dropdown or text field where you enter the value you want to match against.

As noted earlier, all the conditions in a condition group are matched in a ‘AND’ fashion, this means all conditions in a condition group must match. This doesn’t mean that the conditions are combined together. The conditions are matched separately from one another.

For example, if you setup a ‘Quantity – greater or equal – 5’ condition and a ‘Contains category – equal to – A’ condition in one condition group, it does not mean that the cart should contain 5 products of category A. It means that the cart should contain a Category A product, and at least 5 quantity in total.

Question icon

Most conditions have a question mark icon to the right of it. When hovering over this a popup will show explaining how the selected condition works.


Custom conditions

It is possible to add your own custom conditions to the plugin. This does require some programming skills to do so.

If you’d like to hire me to create a custom condition for you, you can reach out to me through the contact form.



Post a comment below if you have any improvements in mind for the conditions, or if something is missing in this post. You can also mail me directly through the contact form.

Jeroen Sormani

I'm a professional WordPress plugin developer on a mission to create the best plugins for my clients. I'm specialised in developing general WordPress, WooCommerce and Easy Digital Downloads plugins.

Interested in talking about a WordPress project? Get in touch!

Follow me on Twitter

3 thoughts on “How the ‘Advanced’ plugin conditions work

Redouane December 17, 2017 at 7:00 pm

Thank you for the information.

DJIO May 5, 2018 at 8:51 pm

My Scenario is a bit typical to me, but i believe it can help others too.

My country has 27 states and I can offer “Free Shipping” to only 5 of them.
My clientes also usually set a minimum subtotal to offer free shipping, let’s say $200

In your current AND / OR conditions I need to include the Subtotal + 22 conditions to remove the states I can’t offer free shiping to.

Is there any way to improve the plugin conditions to set AND / OR groups at will.

Subtotal >= $200 (mandatory)
AND one of the following
State = RS
OR State = SC
OR State = PR
OR State = SP
OR State = RJ

That would fit my needs (and I believe others too)

Thanks in advance

Jeroen Sormani May 6, 2018 at 1:55 pm

Hi Djio,

You can configure the conditions also using the condition groups so that you only have to ‘whitelist’ the 5 states. The condition groups match in a ‘OR’ kind of way so that will work. You’d have to setup the subtotal condition in each condition group accordingly though.

Setting multiple ‘State’ – equal to – conditions in one group doesn’t work and probably will never work due to the conditions not being aware of one another, and all matching separately.

I’m thinking of other ways to select multiple states within one condition to allow for something like this to be setup more easily, but thats not a easy task either as there’s limit space to work with (so a simple multi-select as you see on the WC General settings isn’t possible)


Leave a Reply