Refer to my code in this post that returns a list of all active pricing plan orders placed by a user, without using any backend code:
In the above example, the code returns "ACTIVE"
or "NA"
depending on the subscription status. However you can fetch all the plan IDs by returning the activeOrdersArray
itself.
Then loop through each item in activeOrdersArray
, and store each planId
in another array, and finally pass this planId
array inside a hasSome() filter and apply it to your dataset.
That should do the job.