See this pastebin for the code:
https://pastebin.com/RKvDiuqP
This code snippet customizes the WooCommerce breadcrumb behavior for single product pages, particularly focusing on dynamically building the breadcrumb trail based on the user's navigation path (referer) and excluding the default category from all breadcrumbs.