Best way to use variables in multiple functions?


So I am running into issues in Query Monitor – duplicate queries. The reason being that I have functions that need to get say, a customer’s order status or the like.

What is the cleanest, correct way to ensure I only make that query once, but can use the results of that query in another function?

Sorry, I know its a very noob question, I just want to start cleaning up code and do things properly.

, , , Colin G 1 year 2020-07-11T14:10:20-05:00 0 Answers 73 views 0

Leave an answer