Error: Call to a member function getPurchasableEntityTypeId() on null in Drupal\commerce_order\Entity\OrderItem::bundleFieldDefinitions()

Error occurs when trying to programmatically create an order.

Solution: enable commerce_product

 

Saved you some valuable time?

Buy me a drink 🍺 to keep me motivated to create free content like this!