In Drupal Commerce, using programming, what is the way to grab the product SKU of the product entity that is about to fire off and display on the page in a product display node, as early as possible? I'm looking for something that is before panes and views are executed and drawn.
I know the SKU lives in $form_state['default_product']->sku within a hook_form_alter, but that is too late.
In panels, I know there is a time in hook_panels_pane_content_alter where I can scrape the SKU out of $content->content['#markup']. That doesn't seem to update though as I change the selectors that affect which product is currently displaying. So that's no good.
I need it as early as possible, because I want to pass that value into a view during hook_views_pre_view, which is executed very early.