storefront_single_post hook pertains only to single posts and not products although products are considered posts of type ‘product’
This is the hook you need:
add_action( 'woocommerce_single_product_summary', 'storefront_post_header_categories', 6 );
function storefront_post_header_categories() {
echo "code to display categories here";
}
You will find it in plugins/woocommerce/content-single-product.php:
/**
* woocommerce_single_product_summary hook
*
* @hooked woocommerce_template_single_title - 5
* @hooked woocommerce_template_single_rating - 10
* @hooked woocommerce_template_single_price - 10
* @hooked woocommerce_template_single_excerpt - 20
* @hooked woocommerce_template_single_add_to_cart - 30
* @hooked woocommerce_template_single_meta - 40
* @hooked woocommerce_template_single_sharing - 50
*/
do_action( 'woocommerce_single_product_summary' );