Skip to content

Unable to query licenses by product using an array #104

@mcjackson18

Description

@mcjackson18

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions