How to programmatically add a field to all product types?
The entity as defined by drupal commerce should be commerce_product:

function commerce_product_entity_info() {
  $return = array(
    'commerce_product' =&gt; array(
      'label' =&gt; t('Commerce Product'),
      ...
    ),
  );
  ...

  return $return;
}