Thanks for the proper description and details, it helped me a lot.
I was actually able to find a solution. By default this should work if the proper custom field is selected. First, I have fixed your configuration as the product variation custom post type and the attribute custom field was not selected: https://i.imgur.com/NdaUBGS.png
This alone should have solved the issue, however there were no results for some reason. I’ve logged in via FTP and did a few tests, which revealed, that the reference number is not actually stored with the backslash character in the database, so instead of “0039/030046” they are stored as “0039030046”. Weird enough, but there is a solution.
I’ve put the following code to the functions.php file in your active theme directory:
This code removes the backslash character before the search phrase is passed. This is the best possible solution I could come up with, and it’s transparent to the user.
Because no plugin files were modified, the solution will work after a plugin update as well.Best,
If you like my products, don't forget to rate them on codecanyon :)