Contextual link in Product Display type to allow me to edit the referenced Product?
This is a year old question, but worth answering I think.

You can use this hook (hook_menu_contextual_links_alter). The sample does exactly what you want. (I mean altering node's contextual links)

Here's an actual code I did. And it works for multiple products too.

    // Add a link to all contextual links for nodes of type product_display.
    if ($root_path == 'node/%' &amp;&amp; $router_item['page_arguments'][0]-&gt;type == 'product_display') {

      // Loop through all products
      foreach ($router_item['page_arguments'][0]-&gt;field_product[LANGUAGE_NONE] as $element) {
        $product = commerce_product_load($element['product_id']);  

        // Add your contextual link
        $links['edit_prod_'.$element['product_id']] = array(
          'title' =&gt; t('Edit @sku', array('@sku' =&gt; $product-&gt;sku)),
          'href' =&gt; 'admin/commerce/products/'.$element['product_id'].'/edit',
          'localized_options' =&gt; array(
            'query' =&gt; array(
            'destination' =&gt; current_path(),
          ),
        ),
      );      
    }
  }  


This will add contextual links like 'Edit HMWPB' or 'Edit POHPB'