Lantern
Liquid API

is_blocked

Check if a customer is blocked from participating in the loyalty program.

Syntax

customer.metafields.lantern.is_blocked

Description

The is_blocked metafield indicates whether a customer has been blocked from participating in the loyalty program. This boolean value prevents customers from earning points, redeeming rewards, or accessing loyalty benefits. Customers can be blocked for various reasons including fraud prevention, terms of service violations, or administrative actions.

Properties

Type: Boolean Namespace: lantern

Return Values

ScenarioValueType
Customer is blockedtrueBoolean
Customer is not blockedfalseBoolean
Block status not determinednullnull
Logged outnullnull

Examples

Basic Block Check

{% assign is_blocked = customer.metafields.lantern.is_blocked %}
{% if is_blocked %}
  <div class="loyalty-blocked alert alert-warning">
    <h4>Loyalty Program Access Restricted</h4>
    <p>Your loyalty account has been temporarily restricted. Please contact customer service for assistance.</p>
    <a href="/pages/contact" class="btn btn-secondary">Contact Support</a>
  </div>
{% else %}
  {% comment %} Show normal loyalty features {% endcomment %}
  {% assign points = customer.metafields.lantern.loyalty_points %}
  {% if points %}
    <div class="loyalty-status">
      <p>Available Points: {{ points }}</p>
    </div>
  {% endif %}
{% endif %}