function hook_commerce_product_type_info() {
  // Return the product types defined in the database by the Product UI module.
  return db_query('SELECT * FROM {commerce_product_type}')->fetchAllAssoc('type', PDO::FETCH_ASSOC);
}

No module is going to want to do that. This should show the actual array you should return.

Comments

joachim’s picture

Status: Active » Needs review
StatusFileSize
new790 bytes
rszrama’s picture

Title: sample code for hook_commerce_product_type_info() isn't a good example » Provide a better example for hook_commerce_product_type_info()
Category: bug » task
Status: Needs review » Fixed

Yeah, that example sucked. Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.