I have a plugin I am working on, everything is working fine but everything is in my index.php file, all logic is in there. I am currently refactoring and created some classes in separate files. I am unable to currently use these classes inside my plugins functions.
In my index.php file I have a function that handles a pricing shortcode. I also have a pricing class, however I am unable to use it,
$price = new Price();
function pricingShortcodeFunction(){
return $price->showPrice(); //Should return value but not working in the function
}