Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to query licenses by product using an array #104

Open
mcjackson18 opened this issue Sep 12, 2024 · 1 comment
Open

Unable to query licenses by product using an array #104

mcjackson18 opened this issue Sep 12, 2024 · 1 comment

Comments

@mcjackson18
Copy link

Description

Unable to query licenses by product using an array.

For example the following query:

{% set licenses = craft.digitalProducts.licenses.owner(currentUser).product(['not', 'sku1', 'sku2']).with(['products']).all() %}

Give this error:
craft\digitalproducts\elements\db\LicenseQuery::product(): Argument #1 ($value) must be of type craft\digitalproducts\elements\Product|string|null, array given, called in /var/www/html/vendor/twig/twig/src/Extension/CoreExtension.php on line 1740

Additional info

  • Craft version: Craft Pro 4.12.1
  • PHP version: 8.2.13
  • Database driver & version: MySQL 5.7.42
  • Plugins & versions: Digital Products 3.2.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant