by rzzzt · 4y ago · 0 comments
The fix is to add a "no features" placeholder feature and look for it when you are trying to find plans without any features.
You can create a plan like:
"plan:nofeatures@0": {
"feature:donotuse": {}
}
and then the customer subscribed to that plan will have a single $0 item in that subscription phase. (Tier could in theory do something like this automatically if there's a plan with no features, but figured since an empty plan is likely a mistake anyway, better to just let it be explicit.)To the parent comment, there's nothing in PriceOps that theoretically says a plan must have features, this is just an implementation detail that's somewhat unavoidable.