Hi @pprince3145,
Thank you for sharing the context. That is a method as part of a class that cannot be used as a function in the way you are trying to use it.
Functions that can be used the way you are trying to are defined as
function get_price_of_product() {}
In order to use that method, you need to access it in an instance of the class that is part of it.
I can’t see the name of the class in the screenshot if shared, but the way that would is something like this:
$instance = new PriceClass();
$instance->get_price_of_product( $product );
The above is just an example, you need to find the instance of that class that is likely already loaded and available in a global object or create a new instance yourself in order to use that method.