Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1801964.commerce.hook_commerce_product_type_info-sample.patch | 790 bytes | joachim |
Comments
Comment #1
joachim CreditAttribution: joachim commentedComment #2
rszrama CreditAttribution: rszrama commentedYeah, that example sucked. Committed.