Improved pending_products header and sub