Hi everybody,
In my project I have many products with licensed roles.
After adding several products to the cart separately, licenses are created properly, as we expect.

When I add (by Discount module) one of these products as a "Free product" to the order with another product/s, license of the "Free product" is not created. All another licenses are created properly.

Of course, the license that has not been created can not be activated.
I have no idea what to do about it...

I'm not sure if this is a bug of the Commerce Discount module, or Commerce License module?

Comments

mglaman’s picture

I wonder if the issue here is that the free product is missing metadata that triggers the creation of the license. I'll try to get someone familiar with License to investigate.

KarlShea’s picture

For anyone else encountering this, the issue is that when Commerce Discount adds the free product to the order, it uses the product_discount line item type. You'll need to ensure that you enable licensing for that line item type otherwise the license won't be created.