Skip to main content
1 of 3

Programmatically create a product using Craft Commerce 2?

The docs for v1 mention a method craft()->commerce_purchasables->saveElement().

This is omitted in the docs for v2. Does anyone know how I can create a product programmatically in PHP?