Hi. Thanks for this post. It helped me!
I use this function to add the prefix into the value and it works on category pages, where there is more than one product.
But when is the product page, the function “split” each number of the ID, transforming each one in a product ID, as you can see in the image.

The product ID correct is woocommerce_gpf_9653
Is there anyway to fix this?
Thanks in advance!