I’m trying to use Craft Commerce with the Digital Products plugin for a site where users can pay for being listed on that site.
Therefore I need to query for all users with certain criterias plus a valid license.
I’m not sure how to tackle this. I tried something like this, but it doesn’t work.
{% for user in craft.users({
group: 'profiles',
relatedTo: craft.digitalProducts.products({type: 'access'})
}) %}
Another approach would be to list all licenses, collect the related users and then list them. But that doesn’t seem like a good idea either, in terms of performance.
Any hint is much appreciated.