Look at your function definition, you can see the two parameters that you pass in to the function. I’d quote the line, but for some reason you’ve posted it as an image, so I can’t.
All you need to do is add another parameter to that list, and add it to each time you call the function. The extra variable / array / object will be available inside the function, and you won’t need to make sure that you always call it $post in your external code.
Presuming that woocommerce will allow that kind of thing, of course.