The [docs for v1][1] mention a method `craft()->commerce_purchasables->saveElement()`.

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


  [1]: https://craftcommerce.com/docs/purchasables
  [2]: https://github.com/craftcms/commerce-docs