How to check if customer have active subscription or not in ReCharge app on Shopify
Customer profiles in Shopify are also tagged depending on the status of the customer in ReCharge:
- Active Subscriber: Denotes a customer with an active subscription on file.
- Inactive Subscriber: Denotes a customer who has actively canceled all subscriptions on file.
- Subscription card declined: Denotes a customer who is in an error state.
Thanks to these tags we can use the following code to check if customer have active subscription or not:
1 2 3 4 5 6 7 8 9 10 | {% assign is_subscription_customer = false %} {% for tag in customer.tags %} {% if tag == 'Active Subscriber' %}{% assign is_subscription_customer = true %}{% break %}{% endif %} {% endfor %} {% if is_subscription_customer %} <!-- Code for subscriber --> {% else %} <!-- Code for normal customer --> {% endif %} |
ReCharge is a recurring billing app built exclusively for Shopify. It’s tailor-made for stores with physical subscription products for a seamless customer checkout. Using subscription rulesets for the configuration, you can control how often the customer is charged, and on which specific day if you like. |