(Wordpress)参考代码 - 当类型字段匹配时,从数据库输出信息

Wordpress Reference Code Functionality - Output of Information from the Database when typed field matches

I have programmed some stuff before but am not that familiar with Wordpress and need help with a problem. I have already used the search function but couldn't find any solutions.

So I'm trying to set up an Online Shop with the functionality of providing a specific reference code to the User when he buys a product. When he types in this code into a field on the site, he should get an overview of information stored in the database.

I tried some DOM Triggers in Contact Form 7 and CFDB but it's not the result I want.

Any suggestions on how to implement this within a Wordpress Page?