Skip to content
On this page
Reference Reference 5 min read Updated Sep 28, 2026

Visibility conditions reference

In short

Checkout Ninja has 31 visibility conditions covering the cart, products, customer, address, shipping, payment, discounts, cart attributes and metafields. Each block's conditions are combined with OR: the block shows when any one condition matches. With Enable conditional block visibility turned off, the block always shows.

✓ Applies to

  • Advanced and Deluxe plans
  • Block visibility, under Block Visibility on each block
  • Checkout rules use the same condition list

✕ Doesn't apply to

  • Single block types inside a block. Conditions apply to the whole block
Just want a block for certain products? Follow the how-to →

How matching works

SettingBehaviour
Enable conditional block visibility offThe block always shows. Saved conditions are ignored.
On, with no conditionsThe block always shows.
On, with one or more conditionsThe block shows when any condition matches (OR).
A condition with no condition type selectedIgnored.
A condition with an operator left on ”-“Never matches.

Conditions are checked live in checkout. When the cart, address, shipping method or payment method changes, the block appears or disappears without a page reload.

i

Conditions apply to the whole block, including every block type inside it. To show different content to different buyers, make one block per audience and place each Block ID in its own Custom Block app block.

Operator sets

Most conditions use one of these operator sets. The condition tables below say which.

Number operators

OperatorMatches when the value is
Equalexactly the number
Not Equalanything but the number
Greater Thanabove the number
Greater Than or Equalthe number or above
Less Thanbelow the number
Less Than or Equalthe number or below

A blank or non-numeric value never matches.

Text operators

OperatorMatches when the text
Equalis exactly your value
Not Equalis anything but your value
Containsincludes your value
Not Containsdoesn’t include your value
In listis one of a comma-separated list. Don’t put spaces after the commas: A,B,C
Not In listis none of a comma-separated list
Length is greater thanhas at least this many characters (the check includes equal)
Length is less thanhas at most this many characters (the check includes equal)
Emptyis blank or missing. Leave the value empty
Match regexmatches a regular expression. Blank text never matches
Not Match regexdoesn’t match a regular expression. Blank text never matches

All text operators are case-sensitive.

List operators

OperatorMatches when
In this listthe checkout value is one of the options you select
Not in this listthe checkout value is not one of the options you select

Conditions that check lists of items

Some conditions look at a list: applied discount codes, discount titles or selected payment options. These match when at least one item in the list passes the operator. With no items, they never match, even with a negative operator such as Not Equal.

Cart and product conditions

ConditionWhat it checksValueOperators
Cart TotalThe cart subtotalAmount (number)Number, under When cart total is
Product in cartAny selected product is in the cartProduct (one or more)None
Product not in cartNone of the selected products is in the cartProduct (one or more)None
Variant in cartAny selected variant is in the cartProduct VariantNone
Variant not in cartNone of the selected variants is in the cartProduct VariantNone
Product quantity in cartTotal quantity of all variants of all selected productsProduct (one or more), QuantityNumber
Product type in cartA cart product has exactly this product typeProduct Type (text)None
Product type not in cartNo cart product has this product typeProduct Type (text)None
No of Products (Include quantity for each product)Total number of items in the cart, counting quantitiesValue (number)Number
Vendor Name in cartA cart product is from exactly this vendorValue (text)None
Vendor Name not in cartNo cart product is from this vendorValue (text)None

Product type and vendor values are matched exactly and are case-sensitive.

Customer and address conditions

ConditionWhat it checksValueOperators
Customer billing has phoneThe customer’s phone has at least 8 charactersNoneNone
Customer billing has emailThe customer’s email has at least 2 charactersNoneNone
First NameFirst name on the delivery addressValue (text)Text
Last NameLast name on the delivery addressValue (text)Text
Shipping Address 1Address line 1 of the delivery addressValue (text)Text
Shipping Address 2Address line 2 of the delivery addressValue (text)Text
Shipping CountryCountry of the delivery addressValue (one or more countries)Is, Is Not
Shipping State / ProvinceProvince code of the delivery addressState / Province Codes (type a code, press Enter)Is, Is Not

Address conditions have nothing to compare until the buyer has entered that part of the address. With no country yet, Is doesn’t match and Is Not does.

Delivery and payment conditions

ConditionWhat it checksValueOperators
Shipping Delivery method title Selected by CustomerTitle of the selected shipping methodTitle (text)Text
When delivery type is shop pickupA store pickup option is offered for the orderNoneNone
Payment Method TypeType of the selected payment methodPayment Method type: Credit Card, Deferred, Local, Manual Payment, Offsite, Other, Payment On Delivery, Redeemable, Wallet, Custom OnsiteList
Payment Method HandleHandle of the selected payment methodValue (text)Text

For Payment Method Handle, the in-app help says to contact support for the handle of a payment method.

Discount and gift card conditions

ConditionWhat it checksValueOperators
Discount Code (order and shipping discounts only)Codes entered for order- or shipping-level discountsValue (text)Text
Discount Title (order and shipping discounts only)Titles of order- or shipping-level discounts, including automatic onesValue (text)Text
Product Discount CodeCodes entered for discounts on individual cart itemsValue (text)Text
Product Discount TitleTitles of discounts on individual cart items, including automatic onesValue (text)Text
Gift card is appliedAt least one gift card is appliedNoneNone
No of gift cards appliedNumber of gift cards appliedNumberNumber

Cart attribute and metafield conditions

ConditionWhat it checksValueOperators
Cart attribute key and valueThe value of one cart attributeKey, Valueis equal to, is not equal to, contains, does not contain
Cart metafield key and valueThe value of one cart metafield, for example one saved by an input blockNamespace (default custom), Key, Valueis equal to, is not equal to, contains, does not contain, is empty, is not empty

A cart attribute that isn’t set counts as blank text. So is not equal to and does not contain match when the attribute is missing.

Use Cart metafield key and value to react to buyer input, for example to show a block when a checkbox block saved to a metafield is ticked. See save a field to an order metafield.

Frequently asked

Do all conditions have to match? +

No. For block visibility, the block shows when any one of its conditions matches. There's no setting to require all of them.

What happens to a condition with no operator selected? +

It never matches. Pick an operator for every condition that has one.

Are text comparisons case-sensitive? +

Yes. Equal, Contains, In list and the regex operators compare text exactly as written, including capitals.

What does Cart Total include? +

For block visibility, Cart Total is compared with the cart subtotal that Shopify reports to checkout apps. It doesn't include shipping.

Related guides

Still stuck? Open the app and use Support to chat with the team, or contact us. Don't have the app yet? Install Checkout Ninja.