alovio

WooCommerce / Alovio Checkout Fields

Conditional logic

Show, hide or require WooCommerce checkout fields based on cart, role, shipping, payment, country or other fields — free in Alovio Checkout Fields.

The conditional engine is the heart of Alovio Checkout Fields — and it’s free. Show a field only when it’s relevant, require it only when it matters, and react to real checkout context.

How a rule works

Open a field’s conditional logic and add one or more conditions. A rule has:

  • An actionshow, hide or require this field.
  • One or more conditions — each compares a source against a value.
  • A matchall conditions (AND) or any of them (OR).

What you can react to

Conditions can read live checkout context as well as your own fields:

  • Cart contents — whether the cart contains a specific product or category.
  • Cart quantity — the total number of items.
  • Cart subtotal — the amount before tax and shipping.
  • Customer role — guest, customer, subscriber, or any role.
  • Payment method — the gateway the customer chose.
  • Shipping method — the shipping option selected.
  • Billing country / shipping country.
  • Another field — react to what the customer entered in one of your other checkout fields.

Operators

OperatorTrue when the source…
isequals the value
is notdoesn’t equal the value
containscontains the text
greater thanis numerically larger (cart quantity, subtotal…)
less thanis numerically smaller

Examples

Show “Gift message” when “Is this a gift?” is Yes

Require “VAT number” when the customer role is wholesale

Show “Delivery instructions” when the shipping method is Local delivery

Show “Engraving text” when the cart contains category Jewellery

Required only when visible

A field set to require only enforces when it’s actually shown. Hidden fields never block an order — so a conditional “VAT number” won’t stop a retail customer from checking out.

Chaining

Rules resolve together: if field A shows field B, and B shows C, then hiding A hides the whole chain. Circular references are handled safely.

Same on both checkouts

Conditions evaluate live as the customer fills in the form, and are re-checked on the server when the order is placed — identically on the classic and Block checkout. See Classic & Block checkout.